AM625: RMII RX does not work

Part Number: AM625

Tool/software:

Dear TI

I'm bring-up the custom board which use RMII interface between MAC and PHY.

We are using external 50MHz clock for RMII. the schematic is like below

The TX works correctly, but it can not receive any packet.

(When I send ping to PC, PC receives ARP request and send ARP reply. But custom board can not receive any packet)

In PC

15:35:03.580316 ARP, Request who-has jace-IdeaCentre-Mini-01IRH8 tell 192.168.250.100, length 46
0x0000: 0001 0800 0604 0001 0425 e8b1 3dc1 c0a8 .........%..=...
0x0010: fa64 0000 0000 0000 c0a8 fa0b 0000 0000 .d..............
0x0020: 0000 0000 0000 0000 0000 0000 0000 ..............
15:35:03.580322 ARP, Reply jace-IdeaCentre-Mini-01IRH8 is-at c8:4d:44:23:fe:e0 (oui Unknown), length 28
0x0000: 0001 0800 0604 0002 c84d 4423 fee0 c0a8 .........MD#....
0x0010: fa0b 0425 e8b1 3dc1 c0a8 fa64 ...%..=....d

In custom board( '0' recevied packet )

eth0 Link encap:Ethernet HWaddr 04:25:E8:B1:3D:C1
inet addr:192.168.250.100 Bcast:192.168.250.255 Mask:255.255.255.0
inet6 addr: fe80::625:e8ff:feb1:3dc1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:547 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:23682 (23.1 KiB)

When we check RMII1_RXD0 / RMII1_RXD1 via osiloscope , there are some signals but RX packet count is '0' in linux.

Could you check below device tree for RMII and give some advice ?

  main_rmii1_pins_default: main_rmii1-default-pins {
    pinctrl-single,pins = <
      AM62X_IOPAD(0x0130, PIN_INPUT, 1) /* (AE19) RGMII1_TXC.RMII1_CRS_DV */
      AM62X_IOPAD(0x0148, PIN_INPUT, 1) /* (AD17) RGMII1_RXC.RMII1_REF_CLK */
      AM62X_IOPAD(0x014c, PIN_INPUT, 1) /* (AB17) RGMII1_RD0.RMII1_RXD0 */
      AM62X_IOPAD(0x0150, PIN_INPUT, 1) /* (AC17) RGMII1_RD1.RMII1_RXD1 */
      AM62X_IOPAD(0x0144, PIN_INPUT, 1) /* (AE17) RGMII1_RX_CTL.RMII1_RX_ER */
      AM62X_IOPAD(0x0134, PIN_INPUT, 1) /* (AE20) RGMII1_TD0.RMII1_TXD0 */
      AM62X_IOPAD(0x0138, PIN_INPUT, 1) /* (AD20) RGMII1_TD1.RMII1_TXD1 */
      AM62X_IOPAD(0x012c, PIN_INPUT, 1) /* (AD19) RGMII1_TX_CTL.RMII1_TX_EN */
    >;
  }
  
  &cpsw_port1 {
  status = "okay"; 
  phy-mode = "rmii";
  phy-handle = <&lan8710>; 
};

&cpsw3g_mdio {
  status = "okay";
  pinctrl-names = "default";
  pinctrl-0 = <&main_mdio0_pins_default>;

...

   lan8710: ethernet-phy@0 {
    status = "okay";
    reg = <0x00>;
    max-speed = <100>;
    smsc,disable-energy-detect;
  };

BR

Jace

  • Dear TI

    Any update on this ?

    Is there anything we can try to fix it ?

    BR

    Jace

  • Dear TI.

    I'd like to share more information for this issue.

    Our issue is much similar with below issue.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1278802/am623-re-open-cannot-establish-ethernet-rmii-data-communication-tx-rx-between-mac-and-phy

    I captured "ethtool -S eth0" after trying ping command.

    3348.ethtool.log
    root@am62xx-evm:~/test# ethtool -S eth0
    NIC statistics:
         p0_rx_good_frames: 30
         p0_rx_broadcast_frames: 18
         p0_rx_multicast_frames: 12
         p0_rx_crc_errors: 0
         p0_rx_oversized_frames: 0
         p0_rx_undersized_frames: 0
         p0_ale_drop: 0
         p0_ale_overrun_drop: 0
         p0_rx_octets: 2136
         p0_tx_good_frames: 0
         p0_tx_broadcast_frames: 0
         p0_tx_multicast_frames: 0
         p0_tx_octets: 0
         p0_tx_64B_frames: 18
         p0_tx_65_to_127B_frames: 12
         p0_tx_128_to_255B_frames: 0
         p0_tx_256_to_511B_frames: 0
         p0_tx_512_to_1023B_frames: 0
         p0_tx_1024B_frames: 0
         p0_net_octets: 2136
         p0_rx_bottom_fifo_drop: 0
         p0_rx_port_mask_drop: 0
         p0_rx_top_fifo_drop: 0
         p0_ale_rate_limit_drop: 0
         p0_ale_vid_ingress_drop: 0
         p0_ale_da_eq_sa_drop: 0
         p0_ale_block_drop: 0
         p0_ale_secure_drop: 0
         p0_ale_auth_drop: 0
         p0_ale_unknown_ucast: 0
         p0_ale_unknown_ucast_bytes: 0
         p0_ale_unknown_mcast: 0
         p0_ale_unknown_mcast_bytes: 0
         p0_ale_unknown_bcast: 0
         p0_ale_unknown_bcast_bytes: 0
         p0_ale_pol_match: 0
         p0_ale_pol_match_red: 0
         p0_ale_pol_match_yellow: 0
         p0_ale_mcast_sa_drop: 0
         p0_ale_dual_vlan_drop: 0
         p0_ale_len_err_drop: 0
         p0_ale_ip_next_hdr_drop: 0
         p0_ale_ipv4_frag_drop: 0
         p0_tx_mem_protect_err: 0
         p0_tx_pri0: 0
         p0_tx_pri1: 0
         p0_tx_pri2: 0
         p0_tx_pri3: 0
         p0_tx_pri4: 0
         p0_tx_pri5: 0
         p0_tx_pri6: 0
         p0_tx_pri7: 0
         p0_tx_pri0_bcnt: 0
         p0_tx_pri1_bcnt: 0
         p0_tx_pri2_bcnt: 0
         p0_tx_pri3_bcnt: 0
         p0_tx_pri4_bcnt: 0
         p0_tx_pri5_bcnt: 0
         p0_tx_pri6_bcnt: 0
         p0_tx_pri7_bcnt: 0
         p0_tx_pri0_drop: 0
         p0_tx_pri1_drop: 0
         p0_tx_pri2_drop: 0
         p0_tx_pri3_drop: 0
         p0_tx_pri4_drop: 0
         p0_tx_pri5_drop: 0
         p0_tx_pri6_drop: 0
         p0_tx_pri7_drop: 0
         p0_tx_pri0_drop_bcnt: 0
         p0_tx_pri1_drop_bcnt: 0
         p0_tx_pri2_drop_bcnt: 0
         p0_tx_pri3_drop_bcnt: 0
         p0_tx_pri4_drop_bcnt: 0
         p0_tx_pri5_drop_bcnt: 0
         p0_tx_pri6_drop_bcnt: 0
         p0_tx_pri7_drop_bcnt: 0
         rx_good_frames: 0
         rx_broadcast_frames: 0
         rx_multicast_frames: 0
         rx_pause_frames: 0
         rx_crc_errors: 0
         rx_align_code_errors: 0
         rx_oversized_frames: 0
         rx_jabber_frames: 0
         rx_undersized_frames: 0
         rx_fragments: 0
         ale_drop: 0
         ale_overrun_drop: 0
         rx_octets: 0
         tx_good_frames: 30
         tx_broadcast_frames: 18
         tx_multicast_frames: 12
         tx_pause_frames: 0
         tx_deferred_frames: 0
         tx_collision_frames: 0
         tx_single_coll_frames: 0
         tx_mult_coll_frames: 0
         tx_excessive_collisions: 0
         tx_late_collisions: 0
         rx_ipg_error: 0
         tx_carrier_sense_errors: 0
         tx_octets: 2136
         tx_64B_frames: 18
         tx_65_to_127B_frames: 12
         tx_128_to_255B_frames: 0
         tx_256_to_511B_frames: 0
         tx_512_to_1023B_frames: 0
         tx_1024B_frames: 0
         net_octets: 2136
         rx_bottom_fifo_drop: 0
         rx_port_mask_drop: 0
         rx_top_fifo_drop: 0
         ale_rate_limit_drop: 0
         ale_vid_ingress_drop: 0
         ale_da_eq_sa_drop: 0
         ale_block_drop: 0
         ale_secure_drop: 0
         ale_auth_drop: 0
         ale_unknown_ucast: 0
         ale_unknown_ucast_bytes: 0
         ale_unknown_mcast: 0
         ale_unknown_mcast_bytes: 0
         ale_unknown_bcast: 0
         ale_unknown_bcast_bytes: 0
         ale_pol_match: 0
         ale_pol_match_red: 0
         ale_pol_match_yellow: 0
         ale_mcast_sa_drop: 0
         ale_dual_vlan_drop: 0
         ale_len_err_drop: 0
         ale_ip_next_hdr_drop: 0
         ale_ipv4_frag_drop: 0
         iet_rx_assembly_err: 0
         iet_rx_assembly_ok: 0
         iet_rx_smd_err: 0
         iet_rx_frag: 0
         iet_tx_hold: 0
         iet_tx_frag: 0
         tx_mem_protect_err: 0
         tx_pri0: 30
         tx_pri1: 0
         tx_pri2: 0
         tx_pri3: 0
         tx_pri4: 0
         tx_pri5: 0
         tx_pri6: 0
         tx_pri7: 0
         tx_pri0_bcnt: 2136
         tx_pri1_bcnt: 0
         tx_pri2_bcnt: 0
         tx_pri3_bcnt: 0
         tx_pri4_bcnt: 0
         tx_pri5_bcnt: 0
         tx_pri6_bcnt: 0
         tx_pri7_bcnt: 0
         tx_pri0_drop: 0
         tx_pri1_drop: 0
         tx_pri2_drop: 0
         tx_pri3_drop: 0
         tx_pri4_drop: 0
         tx_pri5_drop: 0
         tx_pri6_drop: 0
         tx_pri7_drop: 0
         tx_pri0_drop_bcnt: 0
         tx_pri1_drop_bcnt: 0
         tx_pri2_drop_bcnt: 0
         tx_pri3_drop_bcnt: 0
         tx_pri4_drop_bcnt: 0
         tx_pri5_drop_bcnt: 0
         tx_pri6_drop_bcnt: 0
         tx_pri7_drop_bcnt: 0

    There are RX packet in the log, but it can not receive any packet in kernel driver.

    ----------------------------------------

    root@am62xx-evm:~/test# ethtool -S eth0 | grep p0_rx
    p0_rx_good_frames: 30
    p0_rx_broadcast_frames: 18
    p0_rx_multicast_frames: 12
    p0_rx_crc_errors: 0
    p0_rx_oversized_frames: 0
    p0_rx_undersized_frames: 0
    p0_rx_octets: 2136
    p0_rx_bottom_fifo_drop: 0
    p0_rx_port_mask_drop: 0
    p0_rx_top_fifo_drop: 0

    ----------------------------------------

    I added some debug code like below and check if there is any RX interrupt happened during ping test

    diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
    index 684c6e120..4c313280b 100644
    --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
    +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
    @@ -144,6 +144,11 @@
                             NETIF_MSG_IFUP | NETIF_MSG_PROBE | NETIF_MSG_IFDOWN | \
                             NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
    
    +static int rx_irq_count = 0;
    +
    +module_param(rx_irq_count, int, 0660);
    +MODULE_PARM_DESC(rx_irq_count, "RX IRQ count");
    +
     static void am65_cpsw_port_set_sl_mac(struct am65_cpsw_port *slave,
                                          const u8 *dev_addr)
     {
    @@ -1099,6 +1104,8 @@ static irqreturn_t am65_cpsw_nuss_rx_irq(int irq, void *dev_id)
            disable_irq_nosync(irq);
            napi_schedule(&common->napi_rx);
    
    +       rx_irq_count++;
    +
            return IRQ_HANDLED;
     }
    

    But the count is 0 after ping test.

    cat /sys/module/ti_am65_cpsw_nuss/parameters/rx_irq_count

    BR

    Jace

  • Hi,

    Apologies for the delay as I was out of the office last week. I will respond to your thread tomorrow.

    Best Regards,

    Schuyler

  • Hi,

    You are following the recommended procedure to debug basic ethernet traffic. Here is the link to the document in case you are interested.

    As you are pointing out there is not any packets being received at the MAC, this would explain the 0 rx irq count. The pin mux looks correct. At least the TX side is correct as you are seeing the ARP request from your board. You are seeing traffic on the RX data lines per your scope check and you are not experiencing any RX CRC errors. The only suggestion I have is to look at the RX lines again between the MAC and PHY and make sure the RX traffic is the right signal level. This could still be a pin mux issue on the RX path. Is there another ethernet internet interface on the board?

    Best Regards,

    Schuyler

  • Hi Schuyler

    Please find TX, RX signal for ARP req/rpy below

    TX / RX

    The signal level is nearly same.

    And there is RGMII2 interface in the custom board, but I disable it for the test

    (Disable means that I did not set RGMII2 PINMUX)

    I also check whether all RMII1 pins are configured another functions or not.

    These pins are configured only for RMII1

    (If one of them is configured for another function, there may be a kernel error for that pin)

    And I have one question.

    When I execute ethtool -S eth0 | grep rx, I could see p0_rx_*** and rx_*** (p0_rx_good_frames / rx_good_frames)

    What is the difference between po_rx_*** and rx_** ?

    Currently, p0_rx_good_frames is increased even there is no RX packet in ifconfig eth0.

    BR

    Jace