diff options
author | Stef van Os <stef.van.os@Prodrive.nl> | 2013-02-13 09:09:00 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2013-02-15 14:54:10 -0500 |
commit | e0e8398e3a06580583b08ed756567a0c66fd725b (patch) | |
tree | f3003b6d1a5565f3127b31cd287c2772c3d6b94e | |
parent | d4d801d13b522099493f56b5909b1c44e63e3e2f (diff) |
powerpc/85xx: Board support for ppa8548
Initial board support for the Prodrive PPA8548 AMC module. Board
is an MPC8548 AMC platform used in RapidIO systems. This module is
also used to test/work on mainline linux RapidIO software.
PPA8548 overview:
- 1.3 GHz Freescale PowerQUICC III MPC8548 processor
- 1 GB DDR2 @ 266 MHz
- 8 MB NOR flash
- Serial RapidIO 1.2
- 1 x 10/100/1000 BASE-T front ethernet
- 1 x 1000 BASE-BX ethernet on AMC connector
Signed-off-by: Stef van Os <stef.van.os@prodrive.nl>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/boot/dts/ppa8548.dts | 166 | ||||
-rw-r--r-- | arch/powerpc/configs/85xx/ppa8548_defconfig | 65 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/Kconfig | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/ppa8548.c | 98 |
5 files changed, 337 insertions, 0 deletions
diff --git a/arch/powerpc/boot/dts/ppa8548.dts b/arch/powerpc/boot/dts/ppa8548.dts new file mode 100644 index 000000000000..f97eceed610a --- /dev/null +++ b/arch/powerpc/boot/dts/ppa8548.dts | |||
@@ -0,0 +1,166 @@ | |||
1 | /* | ||
2 | * PPA8548 Device Tree Source (36-bit address map) | ||
3 | * Copyright 2013 Prodrive B.V. | ||
4 | * | ||
5 | * Based on: | ||
6 | * MPC8548 CDS Device Tree Source (36-bit address map) | ||
7 | * Copyright 2012 Freescale Semiconductor Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | /include/ "fsl/mpc8548si-pre.dtsi" | ||
16 | |||
17 | / { | ||
18 | model = "ppa8548"; | ||
19 | compatible = "ppa8548"; | ||
20 | #address-cells = <2>; | ||
21 | #size-cells = <2>; | ||
22 | interrupt-parent = <&mpic>; | ||
23 | |||
24 | memory { | ||
25 | device_type = "memory"; | ||
26 | reg = <0 0 0x0 0x40000000>; | ||
27 | }; | ||
28 | |||
29 | lbc: localbus@fe0005000 { | ||
30 | reg = <0xf 0xe0005000 0 0x1000>; | ||
31 | ranges = <0x0 0x0 0xf 0xff800000 0x00800000>; | ||
32 | }; | ||
33 | |||
34 | soc: soc8548@fe0000000 { | ||
35 | ranges = <0 0xf 0xe0000000 0x100000>; | ||
36 | }; | ||
37 | |||
38 | pci0: pci@fe0008000 { | ||
39 | /* ppa8548 board doesn't support PCI */ | ||
40 | status = "disabled"; | ||
41 | }; | ||
42 | |||
43 | pci1: pci@fe0009000 { | ||
44 | /* ppa8548 board doesn't support PCI */ | ||
45 | status = "disabled"; | ||
46 | }; | ||
47 | |||
48 | pci2: pcie@fe000a000 { | ||
49 | /* ppa8548 board doesn't support PCI */ | ||
50 | status = "disabled"; | ||
51 | }; | ||
52 | |||
53 | rio: rapidio@fe00c0000 { | ||
54 | reg = <0xf 0xe00c0000 0x0 0x11000>; | ||
55 | port1 { | ||
56 | ranges = <0x0 0x0 0x0 0x80000000 0x0 0x40000000>; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
60 | |||
61 | &lbc { | ||
62 | nor@0 { | ||
63 | #address-cells = <1>; | ||
64 | #size-cells = <1>; | ||
65 | compatible = "cfi-flash"; | ||
66 | reg = <0x0 0x0 0x00800000>; | ||
67 | bank-width = <2>; | ||
68 | device-width = <2>; | ||
69 | |||
70 | partition@0 { | ||
71 | reg = <0x0 0x7A0000>; | ||
72 | label = "user"; | ||
73 | }; | ||
74 | |||
75 | partition@7A0000 { | ||
76 | reg = <0x7A0000 0x20000>; | ||
77 | label = "env"; | ||
78 | read-only; | ||
79 | }; | ||
80 | |||
81 | partition@7C0000 { | ||
82 | reg = <0x7C0000 0x40000>; | ||
83 | label = "u-boot"; | ||
84 | read-only; | ||
85 | }; | ||
86 | }; | ||
87 | }; | ||
88 | |||
89 | &soc { | ||
90 | i2c@3000 { | ||
91 | rtc@6f { | ||
92 | compatible = "intersil,isl1208"; | ||
93 | reg = <0x6f>; | ||
94 | }; | ||
95 | }; | ||
96 | |||
97 | i2c@3100 { | ||
98 | }; | ||
99 | |||
100 | /* | ||
101 | * Only ethernet controller @25000 and @26000 are used. | ||
102 | * Use alias enet2 and enet3 for the remainig controllers, | ||
103 | * to stay compatible with mpc8548si-pre.dtsi. | ||
104 | */ | ||
105 | enet2: ethernet@24000 { | ||
106 | status = "disabled"; | ||
107 | }; | ||
108 | |||
109 | mdio@24520 { | ||
110 | phy0: ethernet-phy@0 { | ||
111 | interrupts = <7 1 0 0>; | ||
112 | reg = <0x0>; | ||
113 | device_type = "ethernet-phy"; | ||
114 | }; | ||
115 | phy1: ethernet-phy@1 { | ||
116 | interrupts = <8 1 0 0>; | ||
117 | reg = <0x1>; | ||
118 | device_type = "ethernet-phy"; | ||
119 | }; | ||
120 | tbi0: tbi-phy@11 { | ||
121 | reg = <0x11>; | ||
122 | device_type = "tbi-phy"; | ||
123 | }; | ||
124 | }; | ||
125 | |||
126 | enet0: ethernet@25000 { | ||
127 | tbi-handle = <&tbi1>; | ||
128 | phy-handle = <&phy0>; | ||
129 | }; | ||
130 | |||
131 | mdio@25520 { | ||
132 | tbi1: tbi-phy@11 { | ||
133 | reg = <0x11>; | ||
134 | device_type = "tbi-phy"; | ||
135 | }; | ||
136 | }; | ||
137 | |||
138 | enet1: ethernet@26000 { | ||
139 | tbi-handle = <&tbi2>; | ||
140 | phy-handle = <&phy1>; | ||
141 | }; | ||
142 | |||
143 | mdio@26520 { | ||
144 | tbi2: tbi-phy@11 { | ||
145 | reg = <0x11>; | ||
146 | device_type = "tbi-phy"; | ||
147 | }; | ||
148 | }; | ||
149 | |||
150 | enet3: ethernet@27000 { | ||
151 | status = "disabled"; | ||
152 | }; | ||
153 | |||
154 | mdio@27520 { | ||
155 | tbi3: tbi-phy@11 { | ||
156 | reg = <0x11>; | ||
157 | device_type = "tbi-phy"; | ||
158 | }; | ||
159 | }; | ||
160 | |||
161 | crypto@30000 { | ||
162 | status = "disabled"; | ||
163 | }; | ||
164 | }; | ||
165 | |||
166 | /include/ "fsl/mpc8548si-post.dtsi" | ||
diff --git a/arch/powerpc/configs/85xx/ppa8548_defconfig b/arch/powerpc/configs/85xx/ppa8548_defconfig new file mode 100644 index 000000000000..a11337de8aa2 --- /dev/null +++ b/arch/powerpc/configs/85xx/ppa8548_defconfig | |||
@@ -0,0 +1,65 @@ | |||
1 | CONFIG_PPC_85xx=y | ||
2 | CONFIG_PPA8548=y | ||
3 | CONFIG_DTC=y | ||
4 | CONFIG_DEFAULT_UIMAGE=y | ||
5 | CONFIG_IKCONFIG=y | ||
6 | CONFIG_IKCONFIG_PROC=y | ||
7 | # CONFIG_PCI is not set | ||
8 | # CONFIG_USB_SUPPORT is not set | ||
9 | CONFIG_ADVANCED_OPTIONS=y | ||
10 | CONFIG_LOWMEM_SIZE_BOOL=y | ||
11 | CONFIG_LOWMEM_SIZE=0x40000000 | ||
12 | CONFIG_LOWMEM_CAM_NUM_BOOL=y | ||
13 | CONFIG_LOWMEM_CAM_NUM=4 | ||
14 | CONFIG_PAGE_OFFSET_BOOL=y | ||
15 | CONFIG_PAGE_OFFSET=0xb0000000 | ||
16 | CONFIG_KERNEL_START_BOOL=y | ||
17 | CONFIG_KERNEL_START=0xb0000000 | ||
18 | # CONFIG_PHYSICAL_START_BOOL is not set | ||
19 | CONFIG_PHYSICAL_START=0x00000000 | ||
20 | CONFIG_PHYSICAL_ALIGN=0x04000000 | ||
21 | CONFIG_TASK_SIZE_BOOL=y | ||
22 | CONFIG_TASK_SIZE=0xb0000000 | ||
23 | |||
24 | CONFIG_FSL_LBC=y | ||
25 | CONFIG_FSL_DMA=y | ||
26 | CONFIG_FSL_RIO=y | ||
27 | |||
28 | CONFIG_RAPIDIO=y | ||
29 | CONFIG_RAPIDIO_DMA_ENGINE=y | ||
30 | CONFIG_RAPIDIO_TSI57X=y | ||
31 | CONFIG_RAPIDIO_TSI568=y | ||
32 | CONFIG_RAPIDIO_CPS_XX=y | ||
33 | CONFIG_RAPIDIO_CPS_GEN2=y | ||
34 | CONFIG_SERIAL_8250=y | ||
35 | CONFIG_SERIAL_8250_CONSOLE=y | ||
36 | CONFIG_PROC_DEVICETREE=y | ||
37 | |||
38 | CONFIG_MTD=y | ||
39 | CONFIG_MTD_BLKDEVS=y | ||
40 | CONFIG_MTD_BLOCK=y | ||
41 | CONFIG_MTD_CFI=y | ||
42 | CONFIG_MTD_CFI_AMDSTD=y | ||
43 | CONFIG_MTD_CFI_INTELEXT=y | ||
44 | CONFIG_MTD_CHAR=y | ||
45 | CONFIG_MTD_CMDLINE_PARTS=y | ||
46 | CONFIG_MTD_CONCAT=y | ||
47 | CONFIG_MTD_PARTITIONS=y | ||
48 | CONFIG_MTD_PHYSMAP_OF=y | ||
49 | |||
50 | CONFIG_I2C=y | ||
51 | CONFIG_I2C_MPC=y | ||
52 | CONFIG_I2C_CHARDEV | ||
53 | CONFIG_RTC_CLASS=y | ||
54 | CONFIG_RTC_HCTOSYS=y | ||
55 | CONFIG_RTC_DRV_ISL1208=y | ||
56 | |||
57 | CONFIG_NET=y | ||
58 | CONFIG_INET=y | ||
59 | CONFIG_IP_PNP=y | ||
60 | CONFIG_NETDEVICES=y | ||
61 | CONFIG_MII=y | ||
62 | CONFIG_GIANFAR=y | ||
63 | CONFIG_MARVELL_PHY=y | ||
64 | CONFIG_NFS_FS=y | ||
65 | CONFIG_ROOT_NFS=y | ||
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index 651788cbc6e6..bcc53aa09bf7 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -191,6 +191,13 @@ config SBC8548 | |||
191 | help | 191 | help |
192 | This option enables support for the Wind River SBC8548 board | 192 | This option enables support for the Wind River SBC8548 board |
193 | 193 | ||
194 | config PPA8548 | ||
195 | bool "Prodrive PPA8548" | ||
196 | help | ||
197 | This option enables support for the Prodrive PPA8548 board. | ||
198 | select DEFAULT_UIMAGE | ||
199 | select HAS_RAPIDIO | ||
200 | |||
194 | config GE_IMP3A | 201 | config GE_IMP3A |
195 | bool "GE Intelligent Platforms IMP3A" | 202 | bool "GE Intelligent Platforms IMP3A" |
196 | select DEFAULT_UIMAGE | 203 | select DEFAULT_UIMAGE |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 9db31dcbd320..07d0dbb141c0 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -25,6 +25,7 @@ obj-$(CONFIG_P5040_DS) += p5040_ds.o corenet_ds.o | |||
25 | obj-$(CONFIG_STX_GP3) += stx_gp3.o | 25 | obj-$(CONFIG_STX_GP3) += stx_gp3.o |
26 | obj-$(CONFIG_TQM85xx) += tqm85xx.o | 26 | obj-$(CONFIG_TQM85xx) += tqm85xx.o |
27 | obj-$(CONFIG_SBC8548) += sbc8548.o | 27 | obj-$(CONFIG_SBC8548) += sbc8548.o |
28 | obj-$(CONFIG_PPA8548) += ppa8548.o | ||
28 | obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o | 29 | obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o |
29 | obj-$(CONFIG_KSI8560) += ksi8560.o | 30 | obj-$(CONFIG_KSI8560) += ksi8560.o |
30 | obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx.o | 31 | obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx.o |
diff --git a/arch/powerpc/platforms/85xx/ppa8548.c b/arch/powerpc/platforms/85xx/ppa8548.c new file mode 100644 index 000000000000..6a7704b92c3b --- /dev/null +++ b/arch/powerpc/platforms/85xx/ppa8548.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * ppa8548 setup and early boot code. | ||
3 | * | ||
4 | * Copyright 2009 Prodrive B.V.. | ||
5 | * | ||
6 | * By Stef van Os (see MAINTAINERS for contact information) | ||
7 | * | ||
8 | * Based on the SBC8548 support - Copyright 2007 Wind River Systems Inc. | ||
9 | * Based on the MPC8548CDS support - Copyright 2005 Freescale Inc. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/stddef.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/reboot.h> | ||
21 | #include <linux/seq_file.h> | ||
22 | #include <linux/of_platform.h> | ||
23 | |||
24 | #include <asm/machdep.h> | ||
25 | #include <asm/udbg.h> | ||
26 | #include <asm/mpic.h> | ||
27 | |||
28 | #include <sysdev/fsl_soc.h> | ||
29 | |||
30 | static void __init ppa8548_pic_init(void) | ||
31 | { | ||
32 | struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN, | ||
33 | 0, 256, " OpenPIC "); | ||
34 | BUG_ON(mpic == NULL); | ||
35 | mpic_init(mpic); | ||
36 | } | ||
37 | |||
38 | /* | ||
39 | * Setup the architecture | ||
40 | */ | ||
41 | static void __init ppa8548_setup_arch(void) | ||
42 | { | ||
43 | if (ppc_md.progress) | ||
44 | ppc_md.progress("ppa8548_setup_arch()", 0); | ||
45 | } | ||
46 | |||
47 | static void ppa8548_show_cpuinfo(struct seq_file *m) | ||
48 | { | ||
49 | uint32_t svid, phid1; | ||
50 | |||
51 | svid = mfspr(SPRN_SVR); | ||
52 | |||
53 | seq_printf(m, "Vendor\t\t: Prodrive B.V.\n"); | ||
54 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | ||
55 | |||
56 | /* Display cpu Pll setting */ | ||
57 | phid1 = mfspr(SPRN_HID1); | ||
58 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | ||
59 | } | ||
60 | |||
61 | static struct of_device_id __initdata of_bus_ids[] = { | ||
62 | { .name = "soc", }, | ||
63 | { .type = "soc", }, | ||
64 | { .compatible = "simple-bus", }, | ||
65 | { .compatible = "gianfar", }, | ||
66 | { .compatible = "fsl,srio", }, | ||
67 | {}, | ||
68 | }; | ||
69 | |||
70 | static int __init declare_of_platform_devices(void) | ||
71 | { | ||
72 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
73 | |||
74 | return 0; | ||
75 | } | ||
76 | machine_device_initcall(ppa8548, declare_of_platform_devices); | ||
77 | |||
78 | /* | ||
79 | * Called very early, device-tree isn't unflattened | ||
80 | */ | ||
81 | static int __init ppa8548_probe(void) | ||
82 | { | ||
83 | unsigned long root = of_get_flat_dt_root(); | ||
84 | |||
85 | return of_flat_dt_is_compatible(root, "ppa8548"); | ||
86 | } | ||
87 | |||
88 | define_machine(ppa8548) { | ||
89 | .name = "ppa8548", | ||
90 | .probe = ppa8548_probe, | ||
91 | .setup_arch = ppa8548_setup_arch, | ||
92 | .init_IRQ = ppa8548_pic_init, | ||
93 | .show_cpuinfo = ppa8548_show_cpuinfo, | ||
94 | .get_irq = mpic_get_irq, | ||
95 | .restart = fsl_rstcr_restart, | ||
96 | .calibrate_decr = generic_calibrate_decr, | ||
97 | .progress = udbg_progress, | ||
98 | }; | ||