]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: shmobile: SDHI and MMCIF interfaces to kzm9g-reference
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Fri, 8 Feb 2013 18:38:27 +0000 (19:38 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 13 Feb 2013 03:49:54 +0000 (12:49 +0900)
Add SDHI0 and SDHI2 interfaces to kzm9g-reference. With no pinctrl DT
support we cannot use GPIO card-detection and regulator switching.
Also update the MMCIF DT node to use all 8 data lines and avoid
redundant information in DT.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
arch/arm/mach-shmobile/board-kzm9g-reference.c

index 06f52f98f90d072bfe60f5dd394f1cb9324c64ec..7fad4b9b2f439e9aaaeb75aa483e8373e02bb8f8 100644 (file)
                reg = <0x41000000 0x1e800000>;
        };
 
-       fixedregulator1v8: fixedregulator@0 {
+       reg_1p8v: regulator@0 {
                compatible = "regulator-fixed";
                regulator-name = "fixed-1.8V";
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       reg_2p8v: regulator@1 {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-2.8V";
+               regulator-min-microvolt = <2800000>;
+               regulator-max-microvolt = <2800000>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       sdhi0: sdhi@0xee100000 {
+               compatible = "renesas,shmobile-sdhi";
+               reg = <0xee100000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 83 4
+                               0 84 4
+                               0 85 4>;
+               vmmc-supply = <&reg_2p8v>;
+               bus-width = <4>;
+               toshiba,mmc-has-idle-wait;
+       };
+
+       sdhi2: sdhi@0xee140000 {
+               compatible = "renesas,shmobile-sdhi";
+               reg = <0xee140000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 104 4
+                               0 105 4>;
+               vmmc-supply = <&reg_2p8v>;
+               bus-width = <4>;
+               broken-cd;
+               toshiba,mmc-wrprotect-disable;
+               toshiba,mmc-has-idle-wait;
        };
 };
 
 &mmcif {
-       vmmc-supply = <&fixedregulator1v8>;
-       vqmmc-supply = <&fixedregulator1v8>;
+       bus-width = <8>;
+       vmmc-supply = <&reg_1p8v>;
 };
index e3341529439e53e41f36d053fa9eb66b41524d79..a677d615fe23698d30add2a4fbd66f5cf410f4ea 100644 (file)
@@ -55,6 +55,27 @@ static void __init kzm_init(void)
        gpio_request(GPIO_FN_MMCD0_6_PU,        NULL);
        gpio_request(GPIO_FN_MMCD0_7_PU,        NULL);
 
+       /* enable SD */
+       gpio_request(GPIO_FN_SDHIWP0,           NULL);
+       gpio_request(GPIO_FN_SDHICD0,           NULL);
+       gpio_request(GPIO_FN_SDHICMD0,          NULL);
+       gpio_request(GPIO_FN_SDHICLK0,          NULL);
+       gpio_request(GPIO_FN_SDHID0_3,          NULL);
+       gpio_request(GPIO_FN_SDHID0_2,          NULL);
+       gpio_request(GPIO_FN_SDHID0_1,          NULL);
+       gpio_request(GPIO_FN_SDHID0_0,          NULL);
+       gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL);
+       gpio_request_one(GPIO_PORT15, GPIOF_OUT_INIT_HIGH, NULL); /* power */
+
+       /* enable Micro SD */
+       gpio_request(GPIO_FN_SDHID2_0,          NULL);
+       gpio_request(GPIO_FN_SDHID2_1,          NULL);
+       gpio_request(GPIO_FN_SDHID2_2,          NULL);
+       gpio_request(GPIO_FN_SDHID2_3,          NULL);
+       gpio_request(GPIO_FN_SDHICMD2,          NULL);
+       gpio_request(GPIO_FN_SDHICLK2,          NULL);
+       gpio_request_one(GPIO_PORT14, GPIOF_OUT_INIT_HIGH, NULL); /* power */
+
        /* I2C 3 */
        gpio_request(GPIO_FN_PORT27_I2C_SCL3, NULL);
        gpio_request(GPIO_FN_PORT28_I2C_SDA3, NULL);