diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-03-31 18:24:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:23 -0400 |
commit | 754582853120a9ec8b8293b5147b605b1c6a39f1 (patch) | |
tree | 38495bf24d655d49dd26a14e3cfb7b75f9ddef14 /arch/powerpc | |
parent | 3f1c6ebf57b815ad709e89291e446935fee78f75 (diff) |
powerpc/83xx: add mmc-spi support via the device tree for MPC8323E-RDB
- Add gpio-controller node to manage QE GPIO Bank D;
- Add mmc-spi node;
- Modify board file so that it won't use legacy SPI support with the new
device trees.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/boot/dts/mpc832x_rdb.dts | 24 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc832x_rdb.c | 6 |
2 files changed, 30 insertions, 0 deletions
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts index dea30910c136..4319bd70a580 100644 --- a/arch/powerpc/boot/dts/mpc832x_rdb.dts +++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts | |||
@@ -152,10 +152,21 @@ | |||
152 | }; | 152 | }; |
153 | 153 | ||
154 | par_io@1400 { | 154 | par_io@1400 { |
155 | #address-cells = <1>; | ||
156 | #size-cells = <1>; | ||
155 | reg = <0x1400 0x100>; | 157 | reg = <0x1400 0x100>; |
158 | ranges = <3 0x1448 0x18>; | ||
159 | compatible = "fsl,mpc8323-qe-pario"; | ||
156 | device_type = "par_io"; | 160 | device_type = "par_io"; |
157 | num-ports = <7>; | 161 | num-ports = <7>; |
158 | 162 | ||
163 | qe_pio_d: gpio-controller@1448 { | ||
164 | #gpio-cells = <2>; | ||
165 | compatible = "fsl,mpc8323-qe-pario-bank"; | ||
166 | reg = <3 0x18>; | ||
167 | gpio-controller; | ||
168 | }; | ||
169 | |||
159 | ucc2pio:ucc_pin@02 { | 170 | ucc2pio:ucc_pin@02 { |
160 | pio-map = < | 171 | pio-map = < |
161 | /* port pin dir open_drain assignment has_irq */ | 172 | /* port pin dir open_drain assignment has_irq */ |
@@ -225,12 +236,25 @@ | |||
225 | }; | 236 | }; |
226 | 237 | ||
227 | spi@4c0 { | 238 | spi@4c0 { |
239 | #address-cells = <1>; | ||
240 | #size-cells = <0>; | ||
228 | cell-index = <0>; | 241 | cell-index = <0>; |
229 | compatible = "fsl,spi"; | 242 | compatible = "fsl,spi"; |
230 | reg = <0x4c0 0x40>; | 243 | reg = <0x4c0 0x40>; |
231 | interrupts = <2>; | 244 | interrupts = <2>; |
232 | interrupt-parent = <&qeic>; | 245 | interrupt-parent = <&qeic>; |
246 | gpios = <&qe_pio_d 13 0>; | ||
233 | mode = "cpu-qe"; | 247 | mode = "cpu-qe"; |
248 | |||
249 | mmc-slot@0 { | ||
250 | compatible = "fsl,mpc8323rdb-mmc-slot", | ||
251 | "mmc-spi-slot"; | ||
252 | reg = <0>; | ||
253 | gpios = <&qe_pio_d 14 1 | ||
254 | &qe_pio_d 15 0>; | ||
255 | voltage-ranges = <3300 3300>; | ||
256 | spi-max-frequency = <50000000>; | ||
257 | }; | ||
234 | }; | 258 | }; |
235 | 259 | ||
236 | spi@500 { | 260 | spi@500 { |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index 28e23cde64a1..e1e7eeb7d3a3 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
@@ -68,6 +68,12 @@ static int __init mpc832x_spi_init(void) | |||
68 | par_io_config_pin(3, 14, 2, 0, 0, 0); /* SD_INSERT, I */ | 68 | par_io_config_pin(3, 14, 2, 0, 0, 0); /* SD_INSERT, I */ |
69 | par_io_config_pin(3, 15, 2, 0, 0, 0); /* SD_PROTECT,I */ | 69 | par_io_config_pin(3, 15, 2, 0, 0, 0); /* SD_PROTECT,I */ |
70 | 70 | ||
71 | /* | ||
72 | * Don't bother with legacy stuff when device tree contains | ||
73 | * mmc-spi-slot node. | ||
74 | */ | ||
75 | if (of_find_compatible_node(NULL, NULL, "mmc-spi-slot")) | ||
76 | return 0; | ||
71 | return fsl_spi_init(&mpc832x_spi_boardinfo, 1, mpc83xx_spi_cs_control); | 77 | return fsl_spi_init(&mpc832x_spi_boardinfo, 1, mpc83xx_spi_cs_control); |
72 | } | 78 | } |
73 | machine_device_initcall(mpc832x_rdb, mpc832x_spi_init); | 79 | machine_device_initcall(mpc832x_rdb, mpc832x_spi_init); |