[OpenWrt-Devel,RFC,3/3] ramips: enable sdxc driver for hc5661a
diff mbox series

Message ID 20190714163428.26303-4-gch981213@gmail.com
State Under Review
Delegated to: Chuanhong Guo
Headers show
Series
  • ramips: fix SDXC for HiWiFi HC5661A
Related show

Commit Message

Chuanhong Guo July 14, 2019, 4:34 p.m. UTC
Since we've fixed AGPIO_MODE setup in sdxc driver, we can enable
SDXC interface for HC5661A now.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---

pinctrl disallows "double enable" for a function (meaning can't set a
group to gpio twice), so the gpio group needs to be specified for every
dts and can't be put into mt7628.dtsi

 .../ramips/dts/mt7628an_hiwifi_hc5661a.dts      | 17 +++++++++++++++++
 target/linux/ramips/image/mt76x8.mk             |  1 +
 2 files changed, 18 insertions(+)

Patch
diff mbox series

diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5661a.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5661a.dts
index df239e1fb8..3ba3774f1c 100644
--- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5661a.dts
+++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5661a.dts
@@ -50,6 +50,18 @@ 
 };
 
 &pinctrl {
+	sdxc_router_pins: sdxc_router_mode {
+		gpio {
+			ralink,group = "i2s", "sdmode", "uart1", "gpio";
+			ralink,function = "gpio";
+		};
+
+		esdmode {
+			ralink,group = "esdmode";
+			ralink,function = "sdxc";
+		};
+	};
+
 	state_default: pinctrl0 {
 		gpio {
 			ralink,group = "i2c", "refclk", "wled_an";
@@ -58,6 +70,11 @@ 
 	};
 };
 
+&sdhci {
+	status = "okay";
+	pinctrl-0 = <&sdxc_router_pins>;
+};
+
 &spi0 {
 	status = "okay";
 
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index fae9fb03cf..033cc7527d 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -97,6 +97,7 @@  define Device/hiwifi_hc5661a
   DEVICE_VENDOR := HiWiFi
   DEVICE_MODEL := HC5661A
   SUPPORTED_DEVICES += hc5661a
+  DEVICE_PACKAGES := kmod-sdhci-mt7620
 endef
 TARGET_DEVICES += hiwifi_hc5661a