Skip to content

Commit

Permalink
LoongArch: Fix GMAC's phy-mode definitions in dts
Browse files Browse the repository at this point in the history
The GMAC of Loongson chips cannot insert the correct 1.5-2ns delay. So
we need the PHY to insert internal delays for both transmit and receive
data lines from/to the PHY device. Fix this by changing the "phy-mode"
from "rgmii" to "rgmii-id" in dts.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
  • Loading branch information
Huacai Chen committed Jun 3, 2024
1 parent 1098efd commit eb36e52
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions arch/loongarch/boot/dts/loongson-2k0500-ref.dts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
&gmac0 {
status = "okay";

phy-mode = "rgmii";
phy-mode = "rgmii-id";
bus_id = <0x0>;
};

&gmac1 {
status = "okay";

phy-mode = "rgmii";
phy-mode = "rgmii-id";
bus_id = <0x1>;
};

Expand Down
4 changes: 2 additions & 2 deletions arch/loongarch/boot/dts/loongson-2k1000-ref.dts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
&gmac0 {
status = "okay";

phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-handle = <&phy0>;
mdio {
compatible = "snps,dwmac-mdio";
Expand All @@ -58,7 +58,7 @@
&gmac1 {
status = "okay";

phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-handle = <&phy1>;
mdio {
compatible = "snps,dwmac-mdio";
Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/boot/dts/loongson-2k2000-ref.dts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
&gmac2 {
status = "okay";

phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-handle = <&phy2>;
mdio {
compatible = "snps,dwmac-mdio";
Expand Down

0 comments on commit eb36e52

Please sign in to comment.