Skip to content
Snippets Groups Projects
Commit 1f8e22dd authored by Alessandro Pecugi's avatar Alessandro Pecugi
Browse files

[C31][DTS] fix ethernet delays

The current ethernet configuration sets delays in both MAC and PHY. This requires
to alter the drivers to allow forcing both delays, which is unnecessary.

This commit sets mode to rgmii-id and sets internal delays to tx=2.75ns and
rx=1.75ns. How these values were calculated: the RK3399 gmac is capable of a ~5ns delay.
The rx_delay and tx_delay properties can have values 0-100, so one step is ~0.05ns.

The new values have been tested using iperf3 (0 retr in both rx and tx).
parent eb5787a5
No related branches found
No related tags found
No related merge requests found
......@@ -855,7 +855,7 @@ pcal6416: gpio@20 {
&gmac {
phy-supply = <&vcc_phy>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-handle = <&eth_phy>;
clock_in_out = "output";
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
......@@ -866,12 +866,10 @@ &gmac {
assigned-clock-rates = <125000000>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins &phy_rst>;
tx_delay = <0x28>;
rx_delay = <0x11>;
/* keep these phy properties below for u-boot
* as DP83867 driver can't get them from phy node */
ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_NS>;
ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_NS>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
status = "okay";
......@@ -882,8 +880,8 @@ mdio {
eth_phy: eth-phy@9 {
reg = <9>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_NS>;
ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_NS>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment