Skip to content

Commit e16d3dc

Browse files
cristiccConchuOD
authored andcommitted
riscv: dts: starfive: visionfive-v1: Setup ethernet phy
The StarFive VisionFive V1 SBC uses a Motorcomm YT8521 PHY supporting RGMII-ID, but requires manual adjustment of the RX internal delay to work properly. The default RX delay provided by the driver is 1.95 ns, which proves to be too high. Applying a 50% reduction seems to mitigate the issue. Also note this adjustment is not necessary on BeagleV Starlight SBC, which uses a Microchip PHY. Hence, there is no indication of a misbehaviour on the GMAC side, but most likely the issue stems from the Motorcomm PHY. While at it, drop the redundant gpio include, which is already provided by jh7100-common.dtsi. Co-developed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Emil Renner Berthing <[email protected]> Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
1 parent 6e204aa commit e16d3dc

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
/dts-v1/;
88
#include "jh7100-common.dtsi"
9-
#include <dt-bindings/gpio/gpio.h>
109

1110
/ {
1211
model = "StarFive VisionFive V1";
@@ -18,3 +17,24 @@
1817
priority = <224>;
1918
};
2019
};
20+
21+
&gmac {
22+
phy-handle = <&phy>;
23+
};
24+
25+
/*
26+
* The board uses a Motorcomm YT8521 PHY supporting RGMII-ID, but requires
27+
* manual adjustment of the RX internal delay to work properly. The default
28+
* RX delay provided by the driver (1.95ns) is too high, but applying a 50%
29+
* reduction seems to mitigate the issue.
30+
*
31+
* It is worth noting the adjustment is not necessary on BeagleV Starlight SBC,
32+
* which uses a Microchip PHY. Hence, most likely the Motorcomm PHY is the one
33+
* responsible for the misbehaviour, not the GMAC.
34+
*/
35+
&mdio {
36+
phy: ethernet-phy@0 {
37+
reg = <0>;
38+
rx-internal-delay-ps = <900>;
39+
};
40+
};

0 commit comments

Comments
 (0)