From 5d8d544aa9ac3bf3b503063729d70f4261c99b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= Date: Thu, 17 Mar 2022 16:10:08 +0300 Subject: [PATCH] ramips: mt7621-dts: fix claiming rgmii2 pin group for EdgeRouter X SFP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For a TX->TX connected external phy to transmit/receive data, the rgmii2 pin group needs to be claimed with gpio function, at least for EdgeRouter X SFP. We already claim the pin group under the pinctrl node with gpio function on the gpio node on mt7621_ubnt_edgerouter-x.dtsi. However, we should claim a pin group under its consumer node. It's the ethernet node in this case, which we already claim the rgmii2 pin group under it on mt7621.dtsi. Therefore, set the function as gpio on the rgmii2 node for EdgeRouter X SFP and get rid of claiming the rgmii2 pin group under the pinctrl node. With this change, we also get to remove a definition from mt7621_ubnt_edgerouter-x.dtsi which is specific to EdgeRouter X SFP. This change is tested on an EdgeRouter X SFP. Signed-off-by: Arınç ÜNAL --- target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts | 6 ++++++ target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts index 9f9217890..2e9f3c39d 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts @@ -59,6 +59,12 @@ }; }; +&rgmii2_pins { + rgmii2 { + function = "gpio"; + }; +}; + &switch0 { ports { port@5 { diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi index 60de53ba0..116a8d404 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi @@ -19,10 +19,6 @@ }; }; -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - &gmac0 { mtd-mac-address = <&factory 0x22>; label = "dsa"; @@ -109,7 +105,7 @@ &state_default { gpio { - groups = "uart2", "uart3", "pcie", "rgmii2", "jtag"; + groups = "uart2", "uart3", "pcie", "jtag"; function = "gpio"; }; };