ramips: fix SDXC function for mt76x8 one eth port devices
authorShiji Yang <yangshiji66@qq.com>
Wed, 1 Jan 2025 08:16:29 +0000 (16:16 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 4 Jan 2025 13:47:53 +0000 (14:47 +0100)
There are only 5 devices in mt76x8 sub-target selected the MTK SDXC
driver package. And they are all single ethernet port routers or dev
boards:

* LinkIt Smart 7688
* Onion Omega2+
* RAVPower RP-WD009
* VoCore VoCore2
* VoCore VoCore2-Lite

For these devices, they are using the ephy p1 - p4 as the SDXC IO
pins. Therefore, these GPIO pads must be configured in "digital"
IO mode.

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_mediatek_linkit-smart-7688.dts
target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi

index 34ef15eca0b722655ad6e0d47e49c097c768b9e1..fab70dc7b7fc9b87c298086fa6a724f3c69ce948 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&pinctrl {
+       ephy-digital;
+
+       sdxc_iot_mode: sdxc_iot_mode {
+               esd {
+                       groups = "esd";
+                       function = "iot";
+               };
+
+               sdxc {
+                       groups = "sdmode";
+                       function = "sdxc";
+               };
+       };
+};
+
 &sdhci {
        status = "okay";
+
+       pinctrl-0 = <&sdxc_iot_mode>;
+       pinctrl-1 = <&sdxc_iot_mode>;
        cd-inverted;
 };
 
index d279cbcfb8e81ada5e215ea325d593b9395158d6..2d45e0385f125b5ad1eb901ecfb59cd068ccc772 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&pinctrl {
+       ephy-digital;
+
+       sdxc_iot_mode: sdxc_iot_mode {
+               esd {
+                       groups = "esd";
+                       function = "iot";
+               };
+
+               sdxc {
+                       groups = "sdmode";
+                       function = "sdxc";
+               };
+       };
+};
+
 &sdhci {
        status = "okay";
+
+       pinctrl-0 = <&sdxc_iot_mode>;
+       pinctrl-1 = <&sdxc_iot_mode>;
 };
 
 &wmac {
index 607787f68e13fd451d776bddfc103ea2e7212aad..71c77d7ae671a0e10fee56a5cc6b00f4c66b54c3 100644 (file)
        };
 };
 
+&pinctrl {
+       ephy-digital;
+
+       sdxc_iot_mode: sdxc_iot_mode {
+               esd {
+                       groups = "esd";
+                       function = "iot";
+               };
+
+               sdxc {
+                       groups = "sdmode";
+                       function = "sdxc";
+               };
+       };
+};
+
 &state_default {
        gpio {
                groups = "uart1", "wled_an", "p0led_an", "p2led_an", "p3led_an",
 
 &sdhci {
        status = "okay";
+
+       pinctrl-0 = <&sdxc_iot_mode>;
+       pinctrl-1 = <&sdxc_iot_mode>;
 };
 
 &i2c {
index 4982d8bccc9d7e51866e5884fadfb4be4a4c875a..da2026ec7d30c39b7c23695e5c3d3af9d7179678 100644 (file)
        };
 };
 
+&pinctrl {
+       ephy-digital;
+
+       sdxc_iot_mode: sdxc_iot_mode {
+               esd {
+                       groups = "esd";
+                       function = "iot";
+               };
+
+               sdxc {
+                       groups = "sdmode";
+                       function = "sdxc";
+               };
+       };
+};
+
 &state_default {
        gpio {
                groups = "wled_an", "refclk", "wdt";
        };
 };
 
+&sdhci {
+       status = "okay";
+
+       pinctrl-0 = <&sdxc_iot_mode>;
+       pinctrl-1 = <&sdxc_iot_mode>;
+};
+
 &wmac {
        status = "okay";