]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: dts: mt7981: remove internal phy LED pinctrl
authorShiji Yang <yangshiji66@outlook.com>
Sat, 3 Jan 2026 04:59:19 +0000 (12:59 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 21 Jan 2026 23:10:56 +0000 (00:10 +0100)
This default pinctrl doesn't work at all. We must add pinctrl phandle
to the ethernet-phy node or mac node. This patch removed the internal
phy LED pinctrl group definitions from the SOC dtsi because it is
currently only used by one device. Some incorrect LED pinctrls also
have been removed because these devices do not have hardware phy LED.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21108
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts
target/linux/mediatek/dts/mt7981b-iptime-ax3000m.dts
target/linux/mediatek/dts/mt7981b-totolink-x6000r.dts
target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi
target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch

index d922b0ad1f2db22bad14da14224b3050f9ba41f5..dd6f6aa5e6de47710fc6ef1e1d30c1037bbdca1e 100644 (file)
 };
 
 &eth {
-       pinctrl-names = "default";
-       pinctrl-0 = <&gbe_led0_pins>, <&gbe_led1_pins>;
        status = "okay";
 
        gmac0: mac@0 {
        };
 };
 
+&int_gbe_phy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gbe_led0_pins>, <&gbe_led1_pins>;
+};
+
 &int_gbe_phy_led0{
        function = LED_FUNCTION_WAN;
        color = <LED_COLOR_ID_AMBER>;
 };
 
 &pio {
+       gbe_led0_pins: gbe-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe_led0";
+               };
+       };
+
+       gbe_led1_pins: gbe-led1-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe_led1";
+               };
+       };
+
        spi0_flash_pins: spi0-pins {
                mux {
                        function = "spi";
index 83c833d6d46dfa78049ac510d9e51abd37ba867a..6025135a33d4d11db7093d8eaccc13a1cdd3dd7d 100644 (file)
@@ -94,7 +94,7 @@
 
 &eth {
        pinctrl-names = "default";
-       pinctrl-0 = <&mdio_pins &gbe_led0_pins>;
+       pinctrl-0 = <&mdio_pins>;
 
        status = "okay";
 
index ab110d57fca7a0c52429e482aa68a10e44c91930..56b165857dc97afcfed2c16e20b49065bce9b02a 100644 (file)
@@ -74,7 +74,7 @@
 
 &eth {
        pinctrl-names = "default";
-       pinctrl-0 = <&mdio_pins &gbe_led0_pins &gbe_led1_pins>;
+       pinctrl-0 = <&mdio_pins>;
        status = "okay";
 
        gmac0: mac@0 {
index b9f0bcd7e6571496a88671089fc52be745b8992d..7751e2f9773a7f76146cb0561b51da5c68f08405 100644 (file)
@@ -33,7 +33,7 @@
 
 &eth {
        pinctrl-names = "default";
-       pinctrl-0 = <&mdio_pins &gbe_led0_pins &gbe_led1_pins>;
+       pinctrl-0 = <&mdio_pins>;
        status = "okay";
 
        gmac0: mac@0 {
index f68b0d83c9bf1ceec21046a5aff5ecf42fe5c81e..a877cdca40ef08d8db53c9b30474507c8d0283fd 100644 (file)
@@ -254,7 +254,7 @@ working:
                pio: pinctrl@11d00000 {
                        compatible = "mediatek,mt7981-pinctrl";
                        reg = <0 0x11d00000 0 0x1000>,
-@@ -204,6 +337,49 @@
+@@ -204,6 +337,35 @@
                        gpio-controller;
                        #gpio-cells = <2>;
                        #interrupt-cells = <2>;
@@ -286,25 +286,11 @@ working:
 +                                             "WF_CBA_RESETB", "WF_DIG_RESETB";
 +                                      drive-strength = <MTK_DRIVE_4mA>;
 +                              };
-+                      };
-+
-+                      gbe_led0_pins: gbe-led0-pins {
-+                              mux {
-+                                      function = "led";
-+                                      groups = "gbe_led0";
-+                              };
-+                      };
-+
-+                      gbe_led1_pins: gbe-led1-pins {
-+                              mux {
-+                                      function = "led";
-+                                      groups = "gbe_led1";
-+                              };
 +                      };
                };
  
                efuse@11f20000 {
-@@ -211,17 +387,301 @@
+@@ -211,17 +373,297 @@
                        reg = <0 0x11f20000 0 0x1000>;
                        #address-cells = <1>;
                        #size-cells = <1>;
@@ -417,16 +403,12 @@ working:
 +                                              int_gbe_phy_led0: int-gbe-phy-led0@0 {
 +                                                      reg = <0>;
 +                                                      function = LED_FUNCTION_LAN;
-+                                                      pinctrl-0 = <&gbe_led0_pins>;
-+                                                      pinctrl-names = "default";
 +                                                      status = "disabled";
 +                                              };
 +
 +                                              int_gbe_phy_led1: int-gbe-phy-led1@1 {
 +                                                      reg = <1>;
 +                                                      function = LED_FUNCTION_LAN;
-+                                                      pinctrl-0 = <&gbe_led1_pins>;
-+                                                      pinctrl-names = "default";
 +                                                      status = "disabled";
 +                                              };
 +                                      };
@@ -608,7 +590,7 @@ working:
                        reg = <0 0x18000000 0 0x1000000>,
                              <0 0x10003000 0 0x1000>,
                              <0 0x11d10000 0 0x1000>;
-@@ -234,6 +694,67 @@
+@@ -234,6 +676,67 @@
                        clock-names = "mcu", "ap2conn";
                        resets = <&watchdog MT7986_TOPRGU_CONSYS_SW_RST>;
                        reset-names = "consys";
@@ -676,7 +658,7 @@ working:
                };
        };
  
-@@ -245,4 +766,8 @@
+@@ -245,4 +748,8 @@
                             <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
                             <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
        };