diff options
author | Bryan O'Donoghue <bodonoghue@codehermit.ie> | 2008-05-08 08:47:00 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-06-02 15:44:25 -0400 |
commit | 59d13f9dba56c444e5356b42d3d57b46e44ef975 (patch) | |
tree | 320b02fb36d0fe68575e740b5053cdca6288b5c4 /arch/powerpc/boot | |
parent | 64f9b5ee17ee7974d7cc58d75221432d86960ba3 (diff) |
[POWERPC] 83xx: Add support for Analogue & Micro ASP837E board
The following adds support for the Analogue & Micro ASP 8347E, running
Redboot.
http://www.analogue-micro.com/ASP8347.html
Signed-off-by: Bryan O'Donoghue <bodonoghue@codehermit.ie>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r-- | arch/powerpc/boot/Makefile | 3 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/asp834x-redboot.dts | 247 | ||||
-rw-r--r-- | arch/powerpc/boot/redboot-83xx.c | 60 | ||||
-rwxr-xr-x | arch/powerpc/boot/wrapper | 6 |
4 files changed, 314 insertions, 2 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index f5e0b2a5af57..c40fb82d575c 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -66,7 +66,7 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c | |||
66 | fixed-head.S ep88xc.c ep405.c \ | 66 | fixed-head.S ep88xc.c ep405.c \ |
67 | cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ | 67 | cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ |
68 | cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ | 68 | cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ |
69 | virtex405-head.S | 69 | virtex405-head.S redboot-83xx.c |
70 | src-boot := $(src-wlib) $(src-plat) empty.c | 70 | src-boot := $(src-wlib) $(src-plat) empty.c |
71 | 71 | ||
72 | src-boot := $(addprefix $(obj)/, $(src-boot)) | 72 | src-boot := $(addprefix $(obj)/, $(src-boot)) |
@@ -242,6 +242,7 @@ image-$(CONFIG_MPC834x_ITX) += cuImage.mpc8349emitx \ | |||
242 | cuImage.mpc8349emitxgp | 242 | cuImage.mpc8349emitxgp |
243 | image-$(CONFIG_MPC834x_MDS) += cuImage.mpc834x_mds | 243 | image-$(CONFIG_MPC834x_MDS) += cuImage.mpc834x_mds |
244 | image-$(CONFIG_MPC836x_MDS) += cuImage.mpc836x_mds | 244 | image-$(CONFIG_MPC836x_MDS) += cuImage.mpc836x_mds |
245 | image-$(CONFIG_ASP834x) += dtbImage.asp834x-redboot | ||
245 | 246 | ||
246 | # Board ports in arch/powerpc/platform/85xx/Kconfig | 247 | # Board ports in arch/powerpc/platform/85xx/Kconfig |
247 | image-$(CONFIG_MPC8540_ADS) += cuImage.mpc8540ads | 248 | image-$(CONFIG_MPC8540_ADS) += cuImage.mpc8540ads |
diff --git a/arch/powerpc/boot/dts/asp834x-redboot.dts b/arch/powerpc/boot/dts/asp834x-redboot.dts new file mode 100644 index 000000000000..972cf78fff65 --- /dev/null +++ b/arch/powerpc/boot/dts/asp834x-redboot.dts | |||
@@ -0,0 +1,247 @@ | |||
1 | /* | ||
2 | * Analogue & Micro ASP8347 Device Tree Source | ||
3 | * | ||
4 | * Copyright 2008 Codehermit | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | |||
14 | / { | ||
15 | model = "Analogue & Micro ASP8347E"; | ||
16 | compatible = "analogue-and-micro,asp8347e"; | ||
17 | #address-cells = <1>; | ||
18 | #size-cells = <1>; | ||
19 | |||
20 | aliases { | ||
21 | ethernet0 = &enet0; | ||
22 | ethernet1 = &enet1; | ||
23 | serial0 = &serial0; | ||
24 | serial1 = &serial1; | ||
25 | }; | ||
26 | |||
27 | cpus { | ||
28 | #address-cells = <1>; | ||
29 | #size-cells = <0>; | ||
30 | |||
31 | PowerPC,8347@0 { | ||
32 | device_type = "cpu"; | ||
33 | reg = <0x0>; | ||
34 | d-cache-line-size = <32>; | ||
35 | i-cache-line-size = <32>; | ||
36 | d-cache-size = <32768>; | ||
37 | i-cache-size = <32768>; | ||
38 | timebase-frequency = <0>; // from bootloader | ||
39 | bus-frequency = <0>; // from bootloader | ||
40 | clock-frequency = <0>; // from bootloader | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | memory { | ||
45 | device_type = "memory"; | ||
46 | reg = <0x00000000 0x8000000>; // 128MB at 0 | ||
47 | }; | ||
48 | |||
49 | localbus@ff005000 { | ||
50 | #address-cells = <2>; | ||
51 | #size-cells = <1>; | ||
52 | compatible = "fsl,mpc8347e-localbus", | ||
53 | "fsl,pq2pro-localbus", | ||
54 | "simple-bus"; | ||
55 | reg = <0xff005000 0x1000>; | ||
56 | interrupts = <77 0x8>; | ||
57 | interrupt-parent = <&ipic>; | ||
58 | |||
59 | ranges = < | ||
60 | 0 0 0xf0000000 0x02000000 | ||
61 | >; | ||
62 | |||
63 | flash@0,0 { | ||
64 | compatible = "cfi-flash"; | ||
65 | reg = <0 0 0x02000000>; | ||
66 | bank-width = <2>; | ||
67 | device-width = <2>; | ||
68 | }; | ||
69 | }; | ||
70 | |||
71 | soc8349@ff000000 { | ||
72 | #address-cells = <1>; | ||
73 | #size-cells = <1>; | ||
74 | device_type = "soc"; | ||
75 | ranges = <0x0 0xff000000 0x00100000>; | ||
76 | reg = <0xff000000 0x00000200>; | ||
77 | bus-frequency = <0>; | ||
78 | |||
79 | wdt@200 { | ||
80 | device_type = "watchdog"; | ||
81 | compatible = "mpc83xx_wdt"; | ||
82 | reg = <0x200 0x100>; | ||
83 | }; | ||
84 | |||
85 | i2c@3000 { | ||
86 | #address-cells = <1>; | ||
87 | #size-cells = <0>; | ||
88 | cell-index = <0>; | ||
89 | compatible = "fsl-i2c"; | ||
90 | reg = <0x3000 0x100>; | ||
91 | interrupts = <14 0x8>; | ||
92 | interrupt-parent = <&ipic>; | ||
93 | dfsrr; | ||
94 | |||
95 | rtc@68 { | ||
96 | compatible = "dallas,ds1374"; | ||
97 | reg = <0x68>; | ||
98 | }; | ||
99 | }; | ||
100 | |||
101 | i2c@3100 { | ||
102 | #address-cells = <1>; | ||
103 | #size-cells = <0>; | ||
104 | cell-index = <1>; | ||
105 | compatible = "fsl-i2c"; | ||
106 | reg = <0x3100 0x100>; | ||
107 | interrupts = <15 0x8>; | ||
108 | interrupt-parent = <&ipic>; | ||
109 | dfsrr; | ||
110 | }; | ||
111 | |||
112 | spi@7000 { | ||
113 | cell-index = <0>; | ||
114 | compatible = "fsl,spi"; | ||
115 | reg = <0x7000 0x1000>; | ||
116 | interrupts = <16 0x8>; | ||
117 | interrupt-parent = <&ipic>; | ||
118 | mode = "cpu"; | ||
119 | }; | ||
120 | |||
121 | /* phy type (ULPI or SERIAL) are only types supported for MPH */ | ||
122 | /* port = 0 or 1 */ | ||
123 | usb@22000 { | ||
124 | compatible = "fsl-usb2-mph"; | ||
125 | reg = <0x22000 0x1000>; | ||
126 | #address-cells = <1>; | ||
127 | #size-cells = <0>; | ||
128 | interrupt-parent = <&ipic>; | ||
129 | interrupts = <39 0x8>; | ||
130 | phy_type = "ulpi"; | ||
131 | port1; | ||
132 | }; | ||
133 | /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ | ||
134 | usb@23000 { | ||
135 | compatible = "fsl-usb2-dr"; | ||
136 | reg = <0x23000 0x1000>; | ||
137 | #address-cells = <1>; | ||
138 | #size-cells = <0>; | ||
139 | interrupt-parent = <&ipic>; | ||
140 | interrupts = <38 0x8>; | ||
141 | dr_mode = "otg"; | ||
142 | phy_type = "ulpi"; | ||
143 | }; | ||
144 | |||
145 | mdio@24520 { | ||
146 | #address-cells = <1>; | ||
147 | #size-cells = <0>; | ||
148 | compatible = "fsl,gianfar-mdio"; | ||
149 | reg = <0x24520 0x20>; | ||
150 | |||
151 | phy0: ethernet-phy@0 { | ||
152 | interrupt-parent = <&ipic>; | ||
153 | interrupts = <17 0x8>; | ||
154 | reg = <0x1>; | ||
155 | device_type = "ethernet-phy"; | ||
156 | }; | ||
157 | phy1: ethernet-phy@1 { | ||
158 | interrupt-parent = <&ipic>; | ||
159 | interrupts = <18 0x8>; | ||
160 | reg = <0x2>; | ||
161 | device_type = "ethernet-phy"; | ||
162 | }; | ||
163 | }; | ||
164 | |||
165 | enet0: ethernet@24000 { | ||
166 | cell-index = <0>; | ||
167 | device_type = "network"; | ||
168 | model = "TSEC"; | ||
169 | compatible = "gianfar"; | ||
170 | reg = <0x24000 0x1000>; | ||
171 | local-mac-address = [ 00 08 e5 11 32 33 ]; | ||
172 | interrupts = <32 0x8 33 0x8 34 0x8>; | ||
173 | interrupt-parent = <&ipic>; | ||
174 | phy-handle = <&phy0>; | ||
175 | linux,network-index = <0>; | ||
176 | }; | ||
177 | |||
178 | enet1: ethernet@25000 { | ||
179 | cell-index = <1>; | ||
180 | device_type = "network"; | ||
181 | model = "TSEC"; | ||
182 | compatible = "gianfar"; | ||
183 | reg = <0x25000 0x1000>; | ||
184 | local-mac-address = [ 00 08 e5 11 32 34 ]; | ||
185 | interrupts = <35 0x8 36 0x8 37 0x8>; | ||
186 | interrupt-parent = <&ipic>; | ||
187 | phy-handle = <&phy1>; | ||
188 | linux,network-index = <1>; | ||
189 | }; | ||
190 | |||
191 | serial0: serial@4500 { | ||
192 | cell-index = <0>; | ||
193 | device_type = "serial"; | ||
194 | compatible = "ns16550"; | ||
195 | reg = <0x4500 0x100>; | ||
196 | clock-frequency = <400000000>; | ||
197 | interrupts = <9 0x8>; | ||
198 | interrupt-parent = <&ipic>; | ||
199 | }; | ||
200 | |||
201 | serial1: serial@4600 { | ||
202 | cell-index = <1>; | ||
203 | device_type = "serial"; | ||
204 | compatible = "ns16550"; | ||
205 | reg = <0x4600 0x100>; | ||
206 | clock-frequency = <400000000>; | ||
207 | interrupts = <10 0x8>; | ||
208 | interrupt-parent = <&ipic>; | ||
209 | }; | ||
210 | |||
211 | /* May need to remove if on a part without crypto engine */ | ||
212 | crypto@30000 { | ||
213 | device_type = "crypto"; | ||
214 | model = "SEC2"; | ||
215 | compatible = "talitos"; | ||
216 | reg = <0x30000 0x10000>; | ||
217 | interrupts = <11 0x8>; | ||
218 | interrupt-parent = <&ipic>; | ||
219 | num-channels = <4>; | ||
220 | channel-fifo-len = <24>; | ||
221 | exec-units-mask = <0x0000007e>; | ||
222 | /* desc mask is for rev2.0, | ||
223 | * we need runtime fixup for >2.0 */ | ||
224 | descriptor-types-mask = <0x01010ebf>; | ||
225 | }; | ||
226 | |||
227 | /* IPIC | ||
228 | * interrupts cell = <intr #, sense> | ||
229 | * sense values match linux IORESOURCE_IRQ_* defines: | ||
230 | * sense == 8: Level, low assertion | ||
231 | * sense == 2: Edge, high-to-low change | ||
232 | */ | ||
233 | ipic: pic@700 { | ||
234 | interrupt-controller; | ||
235 | #address-cells = <0>; | ||
236 | #interrupt-cells = <2>; | ||
237 | reg = <0x700 0x100>; | ||
238 | device_type = "ipic"; | ||
239 | }; | ||
240 | }; | ||
241 | |||
242 | chosen { | ||
243 | bootargs = "console=ttyS0,38400 root=/dev/mtdblock3 rootfstype=jffs2"; | ||
244 | linux,stdout-path = &serial0; | ||
245 | }; | ||
246 | |||
247 | }; | ||
diff --git a/arch/powerpc/boot/redboot-83xx.c b/arch/powerpc/boot/redboot-83xx.c new file mode 100644 index 000000000000..79aa9e151fa7 --- /dev/null +++ b/arch/powerpc/boot/redboot-83xx.c | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * RedBoot firmware support | ||
3 | * | ||
4 | * Author: Scott Wood <scottwood@freescale.com> | ||
5 | * | ||
6 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
7 | * Copyright (c) 2008 Codehermit | ||
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 version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include "ops.h" | ||
15 | #include "stdio.h" | ||
16 | #include "redboot.h" | ||
17 | #include "fsl-soc.h" | ||
18 | #include "io.h" | ||
19 | |||
20 | static bd_t bd; | ||
21 | BSS_STACK(4096); | ||
22 | |||
23 | #define MHZ(x) ((x + 500000) / 1000000) | ||
24 | |||
25 | static void platform_fixups(void) | ||
26 | { | ||
27 | void *node; | ||
28 | |||
29 | dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); | ||
30 | dt_fixup_mac_addresses(bd.bi_enetaddr); | ||
31 | dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 16, bd.bi_busfreq); | ||
32 | |||
33 | node = finddevice("/soc/cpm/brg"); | ||
34 | if (node) { | ||
35 | printf("BRG clock-frequency <- 0x%x (%dMHz)\r\n", | ||
36 | bd.bi_busfreq, MHZ(bd.bi_busfreq)); | ||
37 | setprop(node, "clock-frequency", &bd.bi_busfreq, 4); | ||
38 | } | ||
39 | |||
40 | } | ||
41 | |||
42 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
43 | unsigned long r6, unsigned long r7) | ||
44 | { | ||
45 | memcpy(&bd, (char *)r3, sizeof(bd)); | ||
46 | |||
47 | if (bd.bi_tag != 0x42444944) | ||
48 | return; | ||
49 | |||
50 | simple_alloc_init(_end, | ||
51 | bd.bi_memstart + bd.bi_memsize - (unsigned long)_end, | ||
52 | 32, 64); | ||
53 | |||
54 | fdt_init(_dtb_start); | ||
55 | serial_console_init(); | ||
56 | platform_ops.fixups = platform_fixups; | ||
57 | |||
58 | loader_info.cmdline = (char *)bd.bi_cmdline; | ||
59 | loader_info.cmdline_len = strlen((char *)bd.bi_cmdline); | ||
60 | } | ||
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index d6c96d9ab291..4832be880998 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -171,7 +171,7 @@ cuboot*) | |||
171 | *-mpc824*) | 171 | *-mpc824*) |
172 | platformo=$object/cuboot-824x.o | 172 | platformo=$object/cuboot-824x.o |
173 | ;; | 173 | ;; |
174 | *-mpc83*) | 174 | *-mpc83*|*-asp834x*) |
175 | platformo=$object/cuboot-83xx.o | 175 | platformo=$object/cuboot-83xx.o |
176 | ;; | 176 | ;; |
177 | *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*) | 177 | *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*) |
@@ -203,6 +203,10 @@ simpleboot-virtex405-*) | |||
203 | platformo="$object/virtex405-head.o $object/simpleboot.o" | 203 | platformo="$object/virtex405-head.o $object/simpleboot.o" |
204 | binary=y | 204 | binary=y |
205 | ;; | 205 | ;; |
206 | asp834x-redboot) | ||
207 | platformo="$object/fixed-head.o $object/redboot-83xx.o" | ||
208 | binary=y | ||
209 | ;; | ||
206 | esac | 210 | esac |
207 | 211 | ||
208 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" | 212 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" |