Dear Champs,
My customer is developing custom board using AM5728 and they connected Micron PHY LAN8710a for Ethernet PHY to AM5728 CPSW through RMII.
When they plug-in LAN cable, there was no response and it looks link failed. Could you please help and recommend how they can debug it further?
Their SDK is Linux SDK v6.3.
Kernel booting messages are as below.
root@am57xx-evm:~# dmesg | grep mdio [ 2.366142] mdio_bus fixed-0: GPIO lookup for consumer reset [ 2.371861] mdio_bus fixed-0: using lookup tables for GPIO lookup [ 2.377983] mdio_bus fixed-0: No GPIO consumer reset found [ 2.398188] mdio_bus 48485000.mdio: GPIO lookup for consumer reset [ 2.404423] mdio_bus 48485000.mdio: using device tree for GPIO lookup [ 2.410905] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]' [ 2.422028] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]' [ 2.433050] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup [ 2.439695] mdio_bus 48485000.mdio: No GPIO consumer reset found [ 2.531646] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 20000 [ 2.539165] libphy: 48485000.mdio: probed [ 2.623213] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@0[0]' [ 2.727018] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@1[0]' [ 2.739547] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver SMSC LAN8710/LAN8720 [ 2.748744] davinci_mdio 48485000.mdio: phy[2]: device 48485000.mdio:02, driver unknown [ 12.559003] SMSC LAN8710/LAN8720 48485000.mdio:01: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL) [ 12.974807] Generic PHY 48485000.mdio:02: attached PHY driver [Generic PHY] (mii_bus:phy_addr=48485000.mdio:02, irq=POLL) |
root@am57xx-evm:~# dmesg | grep phy [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (phys). [ 2.383533] libphy: Fixed MDIO Bus: probed [ 2.539165] libphy: 48485000.mdio: probed [ 2.623213] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@0[0]' [ 2.727018] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@1[0]' [ 2.739547] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver SMSC LAN8710/LAN8720 [ 2.748744] davinci_mdio 48485000.mdio: phy[2]: device 48485000.mdio:02, driver unknown [ 2.757240] [drivers/net/ethernet/ti/cpsw-phy-sel.c: 302:cpsw_phy_sel_probe] Enable rmii-clock-ext [ 7.130418] phy phy-4a084000.phy.3: Linked as a consumer to regulator.23 [ 7.161044] phy phy-4a085000.phy.4: Linked as a consumer to regulator.23 [ 12.559003] SMSC LAN8710/LAN8720 48485000.mdio:01: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL) [ 12.571758] cpsw-phy-sel 4a002554.cpsw-phy-sel: RMII External clock is not supported [ 12.974807] Generic PHY 48485000.mdio:02: attached PHY driver [Generic PHY] (mii_bus:phy_addr=48485000.mdio:02, irq=POLL) [ 12.985982] cpsw-phy-sel 4a002554.cpsw-phy-sel: RMII External clock is not supported |
Device Tree is as below.
~/kernel/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
&phy_sel { status = "okay"; rmii-clock-ext; };
&mac { status = "okay"; dual_emac; };
&cpsw_emac0 { status = "okay"; phy-handle = <&phy0>; phy-mode = "rmii; dual_emac_res_vlan = <1>; };
&cpsw_emac1 { status = "okay"; phy-handle = <&phy1>; phy-mode = "rmii; dual_emac_res_vlan = <2>; };
&davinci_mdio { status = "okay"; bus_freq = <20000>;
phy0: ethernet-phy@0 { reg = <1>; };
phy1: ethernet-phy@1 { reg = <2>; }; }; |
Pinumx settings :
~/u-boot/board/ti/am57xx/mux_data.h
const struct pad_conf_entry core_padconf_array_essential_x15[] = {
{VIN2A_FLD0, (M14 | PIN_INPUT_PULLDOWN)}, /* H7.vin2a_fld0.gpio3_30 (Kisan S2 System B/D: ENET_PORZ) */
{RMII_MHZ_50_CLK, (M0 | PIN_INPUT_PULLUP)}, /* U3.RMII_MHZ_50_CLK.RMII_MHZ_50_CLK (Kisan S2 System B/D: RMII1_REF_CLK) */
{UART3_RXD, (M2 | PIN_INPUT | MANUAL_MODE)}, /* V2.uart3_rxd.rmii1_crs (Kisan S2 System B/D: RMII1_CRS_DV) */ {UART3_TXD, (M2 | PIN_INPUT | MANUAL_MODE)}, /* Y1.uart3_txd.rmii1_rxer (Kisan S2 System B/D: RMII1_RXER) */ {RGMII0_TXC, (M2 | PIN_INPUT | MANUAL_MODE)}, /* W9.rgmii0_txc.rmii1_rxd1 (Kisan S2 System B/D: RMII1_RXD1) */ {RGMII0_TXCTL, (M2 | PIN_INPUT | MANUAL_MODE)}, /* V9.rgmii0_txctl.rmii1_rxd0 (Kisan S2 System B/D: RMII1_RXD0) */
{RGMII0_TXD3, (M1 | PIN_INPUT_PULLUP)}, /* V7.rgmii0_txd3.rmii0_crs (Kisan S2 System B/D: RMII0_CRS_DV) */ {RGMII0_TXD2, (M1 | PIN_INPUT_PULLUP)}, /* U7.rgmii0_txd2.rmii0_rxer (Kisan S2 System B/D: RMII0_RXER) */ {RGMII0_TXD1, (M1 | PIN_INPUT_PULLUP)}, /* V6.rgmii0_txd1.rmii0_rxd1 (Kisan S2 System B/D: RMII0_RXD1) */ {RGMII0_TXD0, (M1 | PIN_INPUT_PULLUP)}, /* U6.rgmii0_txd0.rmii0_rxd0 (Kisan S2 System B/D: RMII0_RXD0) */
{RGMII0_RXC, (M2 | PIN_OUTPUT | MANUAL_MODE)}, /* U5.rgmii0_rxc.rmii1_txen (Kisan S2 System B/D: RMII1_TXEN) */ {RGMII0_RXCTL, (M2 | PIN_OUTPUT | MANUAL_MODE)}, /* V5.rgmii0_rxctl.rmii1_txd1 (Kisan S2 System B/D: RMII1_TXD1) */ {RGMII0_RXD3, (M2 | PIN_OUTPUT | MANUAL_MODE)}, /* V4.rgmii0_rxd3.rmii1_txd0 (Kisan S2 System B/D: RMII1_TXD0) */
{RGMII0_RXD2, (M1 | PIN_OUTPUT_PULLDOWN)}, /* V3.rgmii0_rxd2.rmii0_txen (Kisan S2 System B/D: RMII0_TXEN) */ {RGMII0_RXD1, (M1 | PIN_OUTPUT_PULLDOWN)}, /* Y2.rgmii0_rxd1.rmii0_txd1 (Kisan S2 System B/D: RMII0_TXD1) */ {RGMII0_RXD0, (M1 | PIN_OUTPUT_PULLDOWN)}, /* W2.rgmii0_rxd0.rmii0_txd0 (Kisan S2 System B/D: RMII0_TXD0) */
{SPI1_CS2, (M5 | PIN_OUTPUT_PULLUP)}, /* B21.spi1_cs2.mdio_mclk (Kisan S2 System B/D: MDIO_CLK) */ {SPI1_CS3, (M5 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* B20.spi1_cs3.mdio_d (Kisan S2 System B/D: MDIO_DATA) */
}; |
ethtool :
root@am57xx-evm:~# ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: d Wake-on: d Current message level: 0x00000000 (0)
Link detected: no root@am57xx-evm:~# ethtool eth1 Settings for eth1: Supported ports: [ TP AUI BNC MII FIBRE ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 2 Transceiver: internal Auto-negotiation: on Supports Wake-on: d Wake-on: d Current message level: 0x00000000 (0)
Link detected: no |
phytool :
root@am57xx-evm:~# phytool eth0/0/0 ieee-phy: reg:BMCR(0x00) val:0xfffb flags: +reset +loopback +aneg-enable +power-down +isolate +aneg-restart +collision-test speed: 1000-full root@am57xx-evm:~# phytool eth1/0/0 ieee-phy: reg:BMCR(0x00) val:0xfffb flags: +reset +loopback +aneg-enable +power-down +isolate +aneg-restart +collision-test speed: 1000-full |
Thanks and Best Regards,
SI.