diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-02-12 23:29:24 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-02-13 00:27:09 -0500 |
commit | 40e6a51e0cf44e944eed29697eb849140bf8258f (patch) | |
tree | 24ac5225f128827b0b2ef4b94bcbd1beb01a5760 | |
parent | d12e699f44b8277b7b72b546c69948a2f20514f8 (diff) |
ARM: shmobile: lager: add SDHI0/2 support
SDHI0 (CN8) needs JP/SW settings
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | arch/arm/mach-shmobile/board-lager.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 317574864e7b..90d7e812d97b 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -26,8 +26,10 @@ | |||
26 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/leds.h> | 28 | #include <linux/leds.h> |
29 | #include <linux/mfd/tmio.h> | ||
29 | #include <linux/mmc/host.h> | 30 | #include <linux/mmc/host.h> |
30 | #include <linux/mmc/sh_mmcif.h> | 31 | #include <linux/mmc/sh_mmcif.h> |
32 | #include <linux/mmc/sh_mobile_sdhi.h> | ||
31 | #include <linux/pinctrl/machine.h> | 33 | #include <linux/pinctrl/machine.h> |
32 | #include <linux/platform_data/camera-rcar.h> | 34 | #include <linux/platform_data/camera-rcar.h> |
33 | #include <linux/platform_data/gpio-rcar.h> | 35 | #include <linux/platform_data/gpio-rcar.h> |
@@ -68,6 +70,19 @@ | |||
68 | * # amixer set "LINEOUT Mixer DACL" on | 70 | * # amixer set "LINEOUT Mixer DACL" on |
69 | */ | 71 | */ |
70 | 72 | ||
73 | /* | ||
74 | * SDHI0 (CN8) | ||
75 | * | ||
76 | * JP3: pin1 | ||
77 | * SW20: pin1 | ||
78 | |||
79 | * GP5_24: 1: VDD 3.3V (defult) | ||
80 | * 0: VDD 0.0V | ||
81 | * GP5_29: 1: VccQ 3.3V (defult) | ||
82 | * 0: VccQ 1.8V | ||
83 | * | ||
84 | */ | ||
85 | |||
71 | /* DU */ | 86 | /* DU */ |
72 | static struct rcar_du_encoder_data lager_du_encoders[] = { | 87 | static struct rcar_du_encoder_data lager_du_encoders[] = { |
73 | { | 88 | { |
@@ -595,6 +610,34 @@ static void __init lager_add_rsnd_device(void) | |||
595 | platform_device_register_full(&cardinfo); | 610 | platform_device_register_full(&cardinfo); |
596 | } | 611 | } |
597 | 612 | ||
613 | /* SDHI0 */ | ||
614 | static struct sh_mobile_sdhi_info sdhi0_info __initdata = { | ||
615 | .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | | ||
616 | MMC_CAP_POWER_OFF_CARD, | ||
617 | .tmio_caps2 = MMC_CAP2_NO_MULTI_READ, | ||
618 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | | ||
619 | TMIO_MMC_WRPROTECT_DISABLE, | ||
620 | }; | ||
621 | |||
622 | static struct resource sdhi0_resources[] __initdata = { | ||
623 | DEFINE_RES_MEM(0xee100000, 0x200), | ||
624 | DEFINE_RES_IRQ(gic_spi(165)), | ||
625 | }; | ||
626 | |||
627 | /* SDHI2 */ | ||
628 | static struct sh_mobile_sdhi_info sdhi2_info __initdata = { | ||
629 | .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | | ||
630 | MMC_CAP_POWER_OFF_CARD, | ||
631 | .tmio_caps2 = MMC_CAP2_NO_MULTI_READ, | ||
632 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | | ||
633 | TMIO_MMC_WRPROTECT_DISABLE, | ||
634 | }; | ||
635 | |||
636 | static struct resource sdhi2_resources[] __initdata = { | ||
637 | DEFINE_RES_MEM(0xee140000, 0x100), | ||
638 | DEFINE_RES_IRQ(gic_spi(167)), | ||
639 | }; | ||
640 | |||
598 | static const struct pinctrl_map lager_pinctrl_map[] = { | 641 | static const struct pinctrl_map lager_pinctrl_map[] = { |
599 | /* DU (CN10: ARGB0, CN13: LVDS) */ | 642 | /* DU (CN10: ARGB0, CN13: LVDS) */ |
600 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", | 643 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", |
@@ -612,6 +655,20 @@ static const struct pinctrl_map lager_pinctrl_map[] = { | |||
612 | /* SCIF1 (CN20: DEBUG SERIAL1) */ | 655 | /* SCIF1 (CN20: DEBUG SERIAL1) */ |
613 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790", | 656 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790", |
614 | "scif1_data", "scif1"), | 657 | "scif1_data", "scif1"), |
658 | /* SDHI0 */ | ||
659 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790", | ||
660 | "sdhi0_data4", "sdhi0"), | ||
661 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790", | ||
662 | "sdhi0_ctrl", "sdhi0"), | ||
663 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790", | ||
664 | "sdhi0_cd", "sdhi0"), | ||
665 | /* SDHI2 */ | ||
666 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790", | ||
667 | "sdhi2_data4", "sdhi2"), | ||
668 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790", | ||
669 | "sdhi2_ctrl", "sdhi2"), | ||
670 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790", | ||
671 | "sdhi2_cd", "sdhi2"), | ||
615 | /* SSI (CN17: sound) */ | 672 | /* SSI (CN17: sound) */ |
616 | PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790", | 673 | PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790", |
617 | "ssi0129_ctrl", "ssi"), | 674 | "ssi0129_ctrl", "ssi"), |
@@ -716,6 +773,13 @@ static void __init lager_add_standard_devices(void) | |||
716 | lager_register_usbhs(); | 773 | lager_register_usbhs(); |
717 | 774 | ||
718 | lager_add_rsnd_device(); | 775 | lager_add_rsnd_device(); |
776 | |||
777 | platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0, | ||
778 | sdhi0_resources, ARRAY_SIZE(sdhi0_resources), | ||
779 | &sdhi0_info, sizeof(struct sh_mobile_sdhi_info)); | ||
780 | platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 2, | ||
781 | sdhi2_resources, ARRAY_SIZE(sdhi2_resources), | ||
782 | &sdhi2_info, sizeof(struct sh_mobile_sdhi_info)); | ||
719 | } | 783 | } |
720 | 784 | ||
721 | /* | 785 | /* |