diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-06-25 06:35:11 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-06-30 09:30:31 -0400 |
commit | 425d6940b967c874dd76f4e5b9c81e201b83bc3b (patch) | |
tree | a2f381d960312c7536b84a9dc1b4b404e1bd6bac /arch/arm/mach-shmobile | |
parent | 77bcefd90c52b6806046b71212dcd5983475265b (diff) |
ARM: shmobile: kzm9g: enable MicroSD
This patch enable MicroSD on CN20
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-kzm9g.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 27194bc6ee3c..b056b7af9879 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
@@ -396,6 +396,50 @@ static struct platform_device sdhi0_device = { | |||
396 | }, | 396 | }, |
397 | }; | 397 | }; |
398 | 398 | ||
399 | /* Micro SD */ | ||
400 | static struct sh_mobile_sdhi_info sdhi2_info = { | ||
401 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | | ||
402 | TMIO_MMC_USE_GPIO_CD | | ||
403 | TMIO_MMC_WRPROTECT_DISABLE, | ||
404 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | ||
405 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, | ||
406 | .cd_gpio = GPIO_PORT13, | ||
407 | }; | ||
408 | |||
409 | static struct resource sdhi2_resources[] = { | ||
410 | [0] = { | ||
411 | .name = "SDHI2", | ||
412 | .start = 0xee140000, | ||
413 | .end = 0xee1400ff, | ||
414 | .flags = IORESOURCE_MEM, | ||
415 | }, | ||
416 | [1] = { | ||
417 | .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT, | ||
418 | .start = gic_spi(103), | ||
419 | .flags = IORESOURCE_IRQ, | ||
420 | }, | ||
421 | [2] = { | ||
422 | .name = SH_MOBILE_SDHI_IRQ_SDCARD, | ||
423 | .start = gic_spi(104), | ||
424 | .flags = IORESOURCE_IRQ, | ||
425 | }, | ||
426 | [3] = { | ||
427 | .name = SH_MOBILE_SDHI_IRQ_SDIO, | ||
428 | .start = gic_spi(105), | ||
429 | .flags = IORESOURCE_IRQ, | ||
430 | }, | ||
431 | }; | ||
432 | |||
433 | static struct platform_device sdhi2_device = { | ||
434 | .name = "sh_mobile_sdhi", | ||
435 | .id = 2, | ||
436 | .num_resources = ARRAY_SIZE(sdhi2_resources), | ||
437 | .resource = sdhi2_resources, | ||
438 | .dev = { | ||
439 | .platform_data = &sdhi2_info, | ||
440 | }, | ||
441 | }; | ||
442 | |||
399 | /* KEY */ | 443 | /* KEY */ |
400 | #define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 } | 444 | #define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 } |
401 | 445 | ||
@@ -511,6 +555,7 @@ static struct platform_device *kzm_devices[] __initdata = { | |||
511 | &lcdc_device, | 555 | &lcdc_device, |
512 | &mmc_device, | 556 | &mmc_device, |
513 | &sdhi0_device, | 557 | &sdhi0_device, |
558 | &sdhi2_device, | ||
514 | &gpio_keys_device, | 559 | &gpio_keys_device, |
515 | &fsi_device, | 560 | &fsi_device, |
516 | &fsi_ak4648_device, | 561 | &fsi_ak4648_device, |
@@ -648,6 +693,16 @@ static void __init kzm_init(void) | |||
648 | gpio_request(GPIO_PORT15, NULL); | 693 | gpio_request(GPIO_PORT15, NULL); |
649 | gpio_direction_output(GPIO_PORT15, 1); /* power */ | 694 | gpio_direction_output(GPIO_PORT15, 1); /* power */ |
650 | 695 | ||
696 | /* enable Micro SD */ | ||
697 | gpio_request(GPIO_FN_SDHID2_0, NULL); | ||
698 | gpio_request(GPIO_FN_SDHID2_1, NULL); | ||
699 | gpio_request(GPIO_FN_SDHID2_2, NULL); | ||
700 | gpio_request(GPIO_FN_SDHID2_3, NULL); | ||
701 | gpio_request(GPIO_FN_SDHICMD2, NULL); | ||
702 | gpio_request(GPIO_FN_SDHICLK2, NULL); | ||
703 | gpio_request(GPIO_PORT14, NULL); | ||
704 | gpio_direction_output(GPIO_PORT14, 1); /* power */ | ||
705 | |||
651 | /* I2C 3 */ | 706 | /* I2C 3 */ |
652 | gpio_request(GPIO_FN_PORT27_I2C_SCL3, NULL); | 707 | gpio_request(GPIO_FN_PORT27_I2C_SCL3, NULL); |
653 | gpio_request(GPIO_FN_PORT28_I2C_SDA3, NULL); | 708 | gpio_request(GPIO_FN_PORT28_I2C_SDA3, NULL); |