From: Caesar Wang <wxt@rock-chips.com>
Date: Fri, 15 Jan 2016 13:49:54 +0000 (+0800)
Subject: UPSTREAM: ARM: dts: rockchip: add the sdmmc for kylin board
X-Git-Tag: firefly_0821_release~2550
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=95e1e7e7572b3ec97dba1e4caa06f06294d4b5dd;p=firefly-linux-kernel-4.4.55.git

UPSTREAM: ARM: dts: rockchip: add the sdmmc for kylin board

Although We can add the sdmmc node, shouldn't enable it.
Since the sdmmc is reusing the same pin with uart2.
Unfortunately, the uart2 is used by the debug port, so that will cause
the debug information can't display on console if enabling the sdmmc.

As we have supported the sdmmc (sd card) on hardware for kylin board.
So, maybe we can have the sdmmc node in kylin dts, not to enable it.

Anyway, you only need add the okay status if someone want to enable the
sdmmc.

e.g.
if you use the adb to debug with android os.
You can add the
status = "okay" to enable the sdmmc for sd card working.
The default status is disabling it.

Change-Id: I5b22571bbf81a43f3cb8f666be59596bbd3a5bfc
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org next/linux-next.git master
 commit 6cff705b2dd944a14768e6a63c0773831583488e)
---

diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
index 6a32b234525a..190f22cc95ef 100644
--- a/arch/arm/boot/dts/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rk3036-kylin.dts
@@ -331,6 +331,17 @@
 	sd-uhs-sdr104;
 };
 
+&sdmmc {
+	bus-width = <4>;
+	cap-mmc-highspeed;
+	cap-sd-highspeed;
+	card-detect-delay = <200>;
+	disable-wp;
+	num-slots = <1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
+};
+
 &uart0 {
 	status = "okay";
 };
@@ -360,6 +371,12 @@
 		};
 	};
 
+	sdmmc {
+		sdmmc_pwr: sdmmc-pwr {
+			rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	sleep {
 		global_pwroff: global-pwroff {
 			rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;