[openwrt/openwrt] mediatek: dts: mt7981: remove internal phy LED pinctrl

LEDE Commits lede-commits at lists.infradead.org
Wed Jan 21 15:13:23 PST 2026


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3462789923189489630729300544ead4c584c0c4

commit 3462789923189489630729300544ead4c584c0c4
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sat Jan 3 12:59:19 2026 +0800

    mediatek: dts: mt7981: remove internal phy LED pinctrl
    
    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 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/21108
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../mediatek/dts/mt7981a-teltonika-rutc50.dts      | 21 +++++++++++++++--
 .../linux/mediatek/dts/mt7981b-iptime-ax3000m.dts  |  2 +-
 .../linux/mediatek/dts/mt7981b-totolink-x6000r.dts |  2 +-
 .../mediatek/dts/mt7981b-unielec-u7981-01.dtsi     |  2 +-
 .../patches-6.12/117-complete-mt7981b-dtsi.patch   | 26 ++++------------------
 5 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts b/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts
index d922b0ad1f..dd6f6aa5e6 100644
--- a/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts
+++ b/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts
@@ -173,8 +173,6 @@
 };
 
 &eth {
-	pinctrl-names = "default";
-	pinctrl-0 = <&gbe_led0_pins>, <&gbe_led1_pins>;
 	status = "okay";
 
 	gmac0: mac at 0 {
@@ -202,6 +200,11 @@
 	};
 };
 
+&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>;
@@ -447,6 +450,20 @@
 };
 
 &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";
diff --git a/target/linux/mediatek/dts/mt7981b-iptime-ax3000m.dts b/target/linux/mediatek/dts/mt7981b-iptime-ax3000m.dts
index 83c833d6d4..6025135a33 100644
--- a/target/linux/mediatek/dts/mt7981b-iptime-ax3000m.dts
+++ b/target/linux/mediatek/dts/mt7981b-iptime-ax3000m.dts
@@ -94,7 +94,7 @@
 
 &eth {
 	pinctrl-names = "default";
-	pinctrl-0 = <&mdio_pins &gbe_led0_pins>;
+	pinctrl-0 = <&mdio_pins>;
 
 	status = "okay";
 
diff --git a/target/linux/mediatek/dts/mt7981b-totolink-x6000r.dts b/target/linux/mediatek/dts/mt7981b-totolink-x6000r.dts
index ab110d57fc..56b165857d 100644
--- a/target/linux/mediatek/dts/mt7981b-totolink-x6000r.dts
+++ b/target/linux/mediatek/dts/mt7981b-totolink-x6000r.dts
@@ -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 at 0 {
diff --git a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi
index b9f0bcd7e6..7751e2f977 100644
--- a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi
@@ -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 at 0 {
diff --git a/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch b/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch
index f68b0d83c9..a877cdca40 100644
--- a/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch
+++ b/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch
@@ -254,7 +254,7 @@ working:
  		pio: pinctrl at 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 at 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 at 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 at 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>;
  	};




More information about the lede-commits mailing list