From: Guennadi Liakhovetski Date: Fri, 8 Feb 2013 18:38:27 +0000 (+0100) Subject: ARM: shmobile: SDHI and MMCIF interfaces to kzm9g-reference X-Git-Tag: next-20130218~14^2^4~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=14ede250e83d700d158909882d71994e1526dffd;p=karo-tx-linux.git ARM: shmobile: SDHI and MMCIF interfaces to kzm9g-reference 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 Signed-off-by: Simon Horman --- diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts index 06f52f98f90d..7fad4b9b2f43 100644 --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts @@ -27,15 +27,51 @@ 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 = <®_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 = <®_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 = <®_1p8v>; }; diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index e3341529439e..a677d615fe23 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c @@ -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);