OK3568 4.19.206 Buildroot Delayline Parameter Scanning and Modification

Document classification: □ Top secret □ Secret □ Internal information ■ Open

Revision History

Date

Version

Revision History

04/08/2022

V1.0

Initial Version

Delayline Parameter Scanning and Modification

Note: If a self-made carrier board is used and designed based on the schematic diagram provided by us (with only differences in hardware routing), when issues such as network port connectivity failure or frequent packet loss occur, you can try scanning and adjusting the relevant parameters to troubleshoot the problem.

Specific Steps:

  1. Node Confirmation

Taking RK3568 as an example, you can see the following nodes under the directory /sys/devices/platform/fe300000.ethernet:

  1. Usage Instructions

Please note that if you are using an RTL8211E phy, you need to unplug the network cable before testing.

  1. Scanning the Delayline Window

Scan for a window using the phy_lb_scan node, and you will obtain an intermediate coordinate. This scan should be performed using a gigabit speed of 1000.

echo 1000 > phy_lb_scan

Two parameters, tx_delay and rx_delay, will be outputted at the end.

  1. Testing the Scanned Intermediate Values

Configure the scanned values to the rgmii_delayline node using commands, and then test whether TX/RX data transmission is normal under this configuration.

Conduct the test through the phy_lb node, and at least this test must pass.

echo (tx delayline) (rx delayline) > rgmii_delayline

cat rgmii_delayline

echo 1000 > phy_lb

After test pass, fill delayline into dts respectively: tx_delay = <0x2e>; rx_delay = <0x0f>; reburn the firmware, and then continue to test the ping or iperf performance test. In general, this step is enough.

&gmac {

assigned-clocks = <&cru SCLK_RMII_SRC>;

assigned-clock-parents = <&clkin_gmac>;

clock_in_out = ”input”;

phy-supply = <&vcc_lan>;

phy-mode = ”rgmii”;

pinctrl-names = ”default”;

pinctrl-0 = <&rgmii_pins>;

snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;

snps,reset-active-low;

snps,reset-delays-us = <0 10000 50000>;

tx_delay = <0x2e>;

rx_delay = <0x0f>;

status = ”okay”;

};