Skip to content

Commit

Permalink
ramips: mt7621-dts: fix claiming rgmii2 pin group for EdgeRouter X SFP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
arinc9 authored and chunkeey committed Jun 24, 2022
1 parent c6f16b6 commit a1ad837
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
Expand Up @@ -59,6 +59,12 @@
};
};

&rgmii2_pins {
rgmii2 {
function = "gpio";
};
};

&switch0 {
ports {
port@5 {
Expand Down
6 changes: 1 addition & 5 deletions target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
Expand Up @@ -19,10 +19,6 @@
};
};

&ethernet {
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
};

&gmac0 {
nvmem-cells = <&macaddr_factory_22>;
nvmem-cell-names = "mac-address";
Expand Down Expand Up @@ -114,7 +110,7 @@

&state_default {
gpio {
groups = "uart2", "uart3", "pcie", "rgmii2", "jtag";
groups = "uart2", "uart3", "pcie", "jtag";
function = "gpio";
};
};
Expand Down

0 comments on commit a1ad837

Please sign in to comment.