Part Number: AM5726
Hello,
We developed a custom board with AM5726.
We are using ti-processor-sdk kernel linux-4.19.79-rt28 commit 5baf382c8f566e7ab46a144eed51b639dec32841.
We are having problems with the ethernet interfaces of the cpsw in dual_emac configuration and phy-mode rmii.
U-Boot pinmux & Linux dts:
/* PHY0 Reset */
{GPMC_A1, (M14 | PIN_OUTPUT_PULLDOWN)}, /* gpmc_a1.gpio7_4 */
/* PHY1 Reset */
{GPMC_A15, (M14 | PIN_OUTPUT_PULLDOWN)}, /* gpmc_a15.gpio2_5 */
{MDIO_MCLK, (M0 | PIN_OUTPUT | SLEWCONTROL)},/* EPHY_0_1 mdio_mclk.mdio_mclk */
{MDIO_D, (M0 | PIN_INPUT | SLEWCONTROL)}, /* EPHY_0_1 mdio_d.mdio_d */
{RGMII0_TXD3, (M1 | PIN_INPUT_PULLDOWN)}, /* EPHY0 rgmii0_txd3.rmii0_crs */
{RGMII0_TXD2, (M1 | PIN_INPUT_PULLDOWN )}, /* EPHY0 rgmii0_txd2.rmii0_rxer */
{RGMII0_TXD1, (M1 | PIN_INPUT_PULLDOWN )}, /* EPHY0 rgmii0_txd1.rmii0_rxd1 */
{RGMII0_TXD0, (M1 | PIN_INPUT_PULLDOWN )}, /* EPHY0 rgmii0_txd0.rmii0_rxd0 */
{RGMII0_RXD2, (M1 | PIN_OUTPUT_PULLDOWN )}, /* EPHY0 rgmii0_rxd2.rmii0_txen */
{RGMII0_RXD1, (M1 | PIN_OUTPUT_PULLDOWN )}, /* EPHY0 rgmii0_rxd1.rmii0_txd1 */
{RGMII0_RXD0, (M1 | PIN_OUTPUT_PULLDOWN )}, /* EPHY0 rgmii0_rxd0.rmii0_txd0 */
{UART3_RXD, (M2 | PIN_INPUT_PULLDOWN)}, /* EPHY1 uart3_rxd.rmii1_crs */
{UART3_TXD, (M2 | PIN_INPUT_PULLDOWN)}, /* EPHY1 uart3_txd.rmii1_rxer */
{RGMII0_TXC, (M2 | PIN_INPUT_PULLDOWN)}, /* EPHY1 rgmii0_txc.rmii1_rxd1 */
{RGMII0_TXCTL, (M2 | PIN_INPUT_PULLDOWN)}, /* EPHY1 rgmii0_txctl.rmii1_rxd0 */
{RGMII0_RXC, (M2 | PIN_OUTPUT_PULLDOWN )}, /* EPHY1 rgmii0_rxc.rmii1_txd1 */
{RGMII0_RXCTL, (M2 | PIN_OUTPUT_PULLDOWN )}, /* EPHY1 rgmii0_rxctl.rmii1_txd1 */
{RGMII0_RXD3, (M2 | PIN_OUTPUT_PULLDOWN )}, /* EPHY1 rgmii0_rxd3.rmii1_txd0 */
&mac {
status = "okay";
dual_emac;
};
&davinci_mdio {
reset-gpios = <&gpio7 4 GPIO_ACTIVE_LOW>, <&gpio2 5 GPIO_ACTIVE_LOW>;
reset-delay-us = <2>; /* PHY datasheet states 1us min */
phy0: ethernet-phy@0 {
reg = <0>;
max-speed = <100>;
};
phy1: ethernet-phy@1 {
reg = <1>;
max-speed = <100>;
};
};
&cpsw_emac0 {
phy-handle = <&phy0>;
phy-mode = "rmii";
dual_emac_res_vlan = <1>;
};
&cpsw_emac1 {
phy-handle = <&phy1>;
phy-mode = "rmii";
dual_emac_res_vlan = <2>;
};
Link detection and interface configuration work fine.
Both eth0 and eth1 seem to work fine until you take a closer look. I first noticed it when I had weird response times for input and output in a ssh session.
ethtool -S after some incoming traffic on any of eth0/eth1 shows increased amount of "Rx CRC Errors" and "Rx Align/Code Errors".
For testing I settled for using "ping -c100 -f -s64000 192.168.0.99" from my development machine to flood our custom board (after cold start) which results in almost reproducible number of errors in ethtool -S.
There are deviations in the number of "Rx CRC Errors" or "Rx Align/Code Errors", but overall they are mostly the same after above command was run.
Example:
1)
Rx CRC Errors: 1107
Rx Align/Code Errors: 353
2)
Rx CRC Errors: 1001
Rx Align/Code Errors: 313
At this point we are out of ideas and would welcome any suggestions or ideas on how to narrow this down.
On a side note, we successfully developed an AM335x custom board using the cpsw in the same configuration.
The only difference in hardware on the AM5726 board is the usage of RJ45 connectors (10/100/1000 BaseT) with integrated filters compared to the AM355x board with RJ45 connectors (10/100 BaseT) with external filters.
Thanks in advance for your support!
Best regards
Andreas