ARM: dts: dra72-evm: Add MMC nodes
authorNishanth Menon <nm@ti.com>
Tue, 21 Oct 2014 14:35:56 +0000 (09:35 -0500)
committerTony Lindgren <tony@atomide.com>
Mon, 10 Nov 2014 22:27:35 +0000 (14:27 -0800)
Add MMC1 and 2 nodes. MMC1 is SDcard and MMC2 is eMMC.

NOTE on MMC1 card detect: Ideally, we should be using in-built SDCD
support, but we dont have it yet. So, use the fact that control module
of DRA7 is setup such that no matter what mode one configures it, GPIO
option is always hardwired in - use GPIO mode for SDcard detection.

[peter.ujfalusi@ti.com]
The power line feeding the SD card is also used by other devices on the EVM.
Use generic name instead of mmc2_3v3 so when other devices want to use the
same regulator it will look a bit better.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/dra72-evm.dts

index e5a4227aa7ebcbbe5d469ae38fb1c4986ae9d61a..812f7b44c7509269d13cb58e59c6737a445c4091 100644 (file)
                device_type = "memory";
                reg = <0x80000000 0x40000000>; /* 1024 MB */
        };
+
+       evm_3v3: fixedregulator-evm_3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "evm_3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
 };
 
 &dra7_pmx_core {
                        0x424 (PIN_INPUT_PULLUP | MUX_MODE1) /* wakeup3.sys_nirq1 */
                >;
        };
+
+       mmc1_pins_default: mmc1_pins_default {
+               pinctrl-single,pins = <
+                       0x36c (PIN_INPUT | MUX_MODE14)  /* mmc1sdcd.gpio219 */
+                       0x354 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_clk.clk */
+                       0x358 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_cmd.cmd */
+                       0x35c (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat0.dat0 */
+                       0x360 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat1.dat1 */
+                       0x364 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat2.dat2 */
+                       0x368 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat3.dat3 */
+               >;
+       };
+
+       mmc2_pins_default: mmc2_pins_default {
+               pinctrl-single,pins = <
+                       0x9c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */
+                       0xb0 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
+                       0xa0 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
+                       0xa4 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
+                       0xa8 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
+                       0xac (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
+                       0x8c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
+                       0x90 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
+                       0x94 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
+                       0x98 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
+               >;
+       };
 };
 
 &i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&usb2_pins>;
 };
+
+&mmc1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_default>;
+
+       vmmc-supply = <&ldo1_reg>;
+       bus-width = <4>;
+       /*
+        * SDCD signal is not being used here - using the fact that GPIO mode
+        * is a viable alternative
+        */
+       cd-gpios = <&gpio6 27 0>;
+};
+
+&mmc2 {
+       /* SW5-3 in ON position */
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_pins_default>;
+
+       vmmc-supply = <&evm_3v3>;
+       bus-width = <8>;
+       ti,non-removable;
+};