ramips: mt7621-dts: fix claiming rgmii2 pin group for EdgeRouter X SFP
authorArınç ÜNAL <arinc.unal@arinc9.com>
Thu, 17 Mar 2022 13:10:08 +0000 (16:10 +0300)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 24 Jun 2022 22:05:21 +0000 (00:05 +0200)
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 <arinc.unal@arinc9.com>
(cherry picked from commit a1ad8377355c41a7cc3012b707fcecab923cbc90)

target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi

index 897aa90ea39684fd9780469d6c290c4d17cc4afb..c00eb52c7cc48ba04f3e74987b19b70979ac10c5 100644 (file)
        };
 };
 
+&rgmii2_pins {
+       rgmii2 {
+               function = "gpio";
+       };
+};
+
 &switch0 {
        ports {
                port@5 {
index dcc84d7ccc15e25afd95d5350495b6064685501f..95cf3d2ccdecaff00a6be3e4db56f83dcd90090b 100644 (file)
        };
 };
 
-&ethernet {
-       pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
-};
-
 &gmac0 {
        nvmem-cells = <&macaddr_factory_22>;
        nvmem-cell-names = "mac-address";
 
 &state_default {
        gpio {
-               groups = "uart2", "uart3", "pcie", "rgmii2", "jtag";
+               groups = "uart2", "uart3", "pcie", "jtag";
                function = "gpio";
        };
 };