ramips: add back SDXC card reader support for HiWiFi HC5x61A
authorShiji Yang <yangshiji66@qq.com>
Wed, 1 Jan 2025 08:06:38 +0000 (16:06 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 4 Jan 2025 13:47:53 +0000 (14:47 +0100)
After adding the correct package and pin group configurations,
the SDXC card slot can now function properly.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ramips/dts/mt7628an_hiwifi_hc5661a.dts
target/linux/ramips/dts/mt7628an_hiwifi_hc5761a.dts
target/linux/ramips/image/mt76x8.mk

index 9e4068ce8c7241c3931d52e11c12d43eabc0444e..52cd3afac89a3fcfa2750e2c97e2141addc18d41 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
 #include "mt7628an_hiwifi_hc5x61a.dtsi"
 
 / {
        };
 };
 
+&pinctrl {
+       ephy-analog;
+
+       sdxc_router_mode: sdxc_router_mode {
+               groups = "esd", "gpio", "i2c", "sdmode", "uart1";
+               function = "gpio";
+       };
+};
+
+&sdhci {
+       status = "okay";
+
+       pinctrl-0 = <&sdxc_router_mode>;
+       pinctrl-1 = <&sdxc_router_mode>;
+};
+
 &state_default {
        gpio {
-               groups = "i2c", "refclk", "wdt", "wled_an";
+               groups = "i2s", "refclk", "wdt", "wled_an";
                function = "gpio";
        };
 };
index 5ec041c8048e9800c4b9fa86c873ab5f3a73bc3d..940df6e19a7a8b4a9a377e731f1a0242b1d087ab 100644 (file)
        };
 };
 
+&pinctrl {
+       ephy-analog;
+
+       sdxc_router_mode: sdxc_router_mode {
+               groups = "esd", "gpio", "i2c", "sdmode", "uart1";
+               function = "gpio";
+       };
+};
+
+&sdhci {
+       status = "okay";
+
+       pinctrl-0 = <&sdxc_router_mode>;
+       pinctrl-1 = <&sdxc_router_mode>;
+};
+
 &state_default {
        gpio {
-               groups = "i2c", "refclk", "wdt", "p2led_an", "p3led_an", "wled_an";
+               groups = "i2s", "refclk", "wdt", "p2led_an", "p3led_an", "wled_an";
                function = "gpio";
        };
 };
index 25a7344afbe5e138e98fe072e41bcda332d417de..da44b0005c5404f2245dac5ff9f1657f0ffbc66e 100644 (file)
@@ -289,6 +289,7 @@ define Device/hiwifi_hc5661a
   IMAGE_SIZE := 15808k
   DEVICE_VENDOR := HiWiFi
   DEVICE_MODEL := HC5661A
+  DEVICE_PACKAGES := kmod-mmc-mtk
   SUPPORTED_DEVICES += hc5661a
 endef
 TARGET_DEVICES += hiwifi_hc5661a
@@ -297,7 +298,7 @@ define Device/hiwifi_hc5761a
   IMAGE_SIZE := 15808k
   DEVICE_VENDOR := HiWiFi
   DEVICE_MODEL := HC5761A
-  DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci
+  DEVICE_PACKAGES := kmod-mmc-mtk kmod-mt76x0e kmod-usb2 kmod-usb-ohci
 endef
 TARGET_DEVICES += hiwifi_hc5761a