diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2009-10-20 10:32:53 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2009-11-16 10:57:50 -0500 |
commit | 0f74296a0f818d8ae52d9b77ec531e8dd804dda3 (patch) | |
tree | 0ef487e756e7956f8c41fd083bc5ed072f6bf2d3 | |
parent | a9366e61b03f55a6e009e687ad10e706714c9907 (diff) |
at91: at91sam9g20ek modify dual slot evaluation kit
at91sam9g20ek rev. C and onwards embed two SD/MMC slots. This patch modify the
previous dual slot board definition to match the official rev. C board. It also
allows the use of at91_mci SD/MMC driver in addition to the atmel-mci one.
Some pins have been re-affected from leds or Ethernet phy IRQ to the SD/MMC
slot A. This lead to a modification of those definitions.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
-rw-r--r-- | arch/arm/mach-at91/Kconfig | 20 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c | 23 |
2 files changed, 26 insertions, 17 deletions
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index e35d54d43e70..2fd88437348b 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -289,13 +289,6 @@ config MACH_NEOCORE926 | |||
289 | help | 289 | help |
290 | Select this if you are using the Adeneo Neocore 926 board. | 290 | Select this if you are using the Adeneo Neocore 926 board. |
291 | 291 | ||
292 | config MACH_AT91SAM9G20EK_2MMC | ||
293 | bool "Atmel AT91SAM9G20-EK Evaluation Kit modified for 2 MMC Slots" | ||
294 | depends on ARCH_AT91SAM9G20 | ||
295 | help | ||
296 | Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit | ||
297 | Rev A or B modified for 2 MMC Slots. | ||
298 | |||
299 | endif | 292 | endif |
300 | 293 | ||
301 | # ---------------------------------------------------------- | 294 | # ---------------------------------------------------------- |
@@ -322,7 +315,16 @@ config MACH_AT91SAM9G20EK | |||
322 | bool "Atmel AT91SAM9G20-EK Evaluation Kit" | 315 | bool "Atmel AT91SAM9G20-EK Evaluation Kit" |
323 | depends on ARCH_AT91SAM9G20 | 316 | depends on ARCH_AT91SAM9G20 |
324 | help | 317 | help |
325 | Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit. | 318 | Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit |
319 | that embeds only one SD/MMC slot. | ||
320 | |||
321 | config MACH_AT91SAM9G20EK_2MMC | ||
322 | bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots" | ||
323 | depends on ARCH_AT91SAM9G20 | ||
324 | help | ||
325 | Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit | ||
326 | with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and | ||
327 | onwards. | ||
326 | 328 | ||
327 | config MACH_CPU9G20 | 329 | config MACH_CPU9G20 |
328 | bool "Eukrea CPU9G20 board" | 330 | bool "Eukrea CPU9G20 board" |
@@ -392,7 +394,7 @@ config MTD_AT91_DATAFLASH_CARD | |||
392 | 394 | ||
393 | config MTD_NAND_ATMEL_BUSWIDTH_16 | 395 | config MTD_NAND_ATMEL_BUSWIDTH_16 |
394 | bool "Enable 16-bit data bus interface to NAND flash" | 396 | bool "Enable 16-bit data bus interface to NAND flash" |
395 | depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK) | 397 | depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G20EK_2MMC || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK) |
396 | help | 398 | help |
397 | On AT91SAM926x boards both types of NAND flash can be present | 399 | On AT91SAM926x boards both types of NAND flash can be present |
398 | (8 and 16 bit data bus width). | 400 | (8 and 16 bit data bus width). |
diff --git a/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c b/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c index a28e53faf71d..a4102d72cc9b 100644 --- a/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c +++ b/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c | |||
@@ -90,7 +90,7 @@ static struct at91_udc_data __initdata ek_udc_data = { | |||
90 | * SPI devices. | 90 | * SPI devices. |
91 | */ | 91 | */ |
92 | static struct spi_board_info ek_spi_devices[] = { | 92 | static struct spi_board_info ek_spi_devices[] = { |
93 | #if !defined(CONFIG_MMC_ATMELMCI) | 93 | #if !(defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_AT91)) |
94 | { /* DataFlash chip */ | 94 | { /* DataFlash chip */ |
95 | .modalias = "mtd_dataflash", | 95 | .modalias = "mtd_dataflash", |
96 | .chip_select = 1, | 96 | .chip_select = 1, |
@@ -113,7 +113,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
113 | * MACB Ethernet device | 113 | * MACB Ethernet device |
114 | */ | 114 | */ |
115 | static struct at91_eth_data __initdata ek_macb_data = { | 115 | static struct at91_eth_data __initdata ek_macb_data = { |
116 | .phy_irq_pin = AT91_PIN_PC12, | 116 | .phy_irq_pin = AT91_PIN_PB0, |
117 | .is_rmii = 1, | 117 | .is_rmii = 1, |
118 | }; | 118 | }; |
119 | 119 | ||
@@ -194,24 +194,27 @@ static void __init ek_add_device_nand(void) | |||
194 | 194 | ||
195 | /* | 195 | /* |
196 | * MCI (SD/MMC) | 196 | * MCI (SD/MMC) |
197 | * det_pin and wp_pin are not connected | 197 | * wp_pin is not connected |
198 | */ | 198 | */ |
199 | #if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) | 199 | #if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) |
200 | static struct mci_platform_data __initdata ek_mmc_data = { | 200 | static struct mci_platform_data __initdata ek_mmc_data = { |
201 | .slot[0] = { | 201 | .slot[0] = { |
202 | .bus_width = 4, | 202 | .bus_width = 4, |
203 | .detect_pin = -ENODEV, | 203 | .detect_pin = AT91_PIN_PC2, |
204 | .wp_pin = -ENODEV, | 204 | .wp_pin = -ENODEV, |
205 | }, | 205 | }, |
206 | .slot[1] = { | 206 | .slot[1] = { |
207 | .bus_width = 4, | 207 | .bus_width = 4, |
208 | .detect_pin = -ENODEV, | 208 | .detect_pin = AT91_PIN_PC9, |
209 | .wp_pin = -ENODEV, | 209 | .wp_pin = -ENODEV, |
210 | }, | 210 | }, |
211 | 211 | ||
212 | }; | 212 | }; |
213 | #else | 213 | #else |
214 | static struct amci_platform_data __initdata ek_mmc_data = { | 214 | static struct at91_mmc_data __initdata ek_mmc_data = { |
215 | .slot_b = 1, /* Only one slot so use slot B */ | ||
216 | .wire4 = 1, | ||
217 | .det_pin = AT91_PIN_PC9, | ||
215 | }; | 218 | }; |
216 | #endif | 219 | #endif |
217 | 220 | ||
@@ -221,13 +224,13 @@ static struct amci_platform_data __initdata ek_mmc_data = { | |||
221 | static struct gpio_led ek_leds[] = { | 224 | static struct gpio_led ek_leds[] = { |
222 | { /* "bottom" led, green, userled1 to be defined */ | 225 | { /* "bottom" led, green, userled1 to be defined */ |
223 | .name = "ds5", | 226 | .name = "ds5", |
224 | .gpio = AT91_PIN_PB12, | 227 | .gpio = AT91_PIN_PB8, |
225 | .active_low = 1, | 228 | .active_low = 1, |
226 | .default_trigger = "none", | 229 | .default_trigger = "none", |
227 | }, | 230 | }, |
228 | { /* "power" led, yellow */ | 231 | { /* "power" led, yellow */ |
229 | .name = "ds1", | 232 | .name = "ds1", |
230 | .gpio = AT91_PIN_PB13, | 233 | .gpio = AT91_PIN_PB9, |
231 | .default_trigger = "heartbeat", | 234 | .default_trigger = "heartbeat", |
232 | } | 235 | } |
233 | }; | 236 | }; |
@@ -254,7 +257,11 @@ static void __init ek_board_init(void) | |||
254 | /* Ethernet */ | 257 | /* Ethernet */ |
255 | at91_add_device_eth(&ek_macb_data); | 258 | at91_add_device_eth(&ek_macb_data); |
256 | /* MMC */ | 259 | /* MMC */ |
260 | #if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) | ||
257 | at91_add_device_mci(0, &ek_mmc_data); | 261 | at91_add_device_mci(0, &ek_mmc_data); |
262 | #else | ||
263 | at91_add_device_mmc(0, &ek_mmc_data); | ||
264 | #endif | ||
258 | /* I2C */ | 265 | /* I2C */ |
259 | at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); | 266 | at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); |
260 | /* LEDs */ | 267 | /* LEDs */ |