[OpenWrt-Devel] [PATCH RFC 3/3] ramips: enable sdxc driver for hc5661a

Chuanhong Guo gch981213 at gmail.com
Sun Jul 14 12:34:28 EDT 2019


Since we've fixed AGPIO_MODE setup in sdxc driver, we can enable
SDXC interface for HC5661A now.

Signed-off-by: Chuanhong Guo <gch981213 at 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(+)

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
 
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list