This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: RMII support

Other Parts Discussed in Thread: AM3358

Currently I use a AM335x in a project, in which we have planned to use two Ethernet ports in RMII-mode, i.e. rmii1 and rmii2.
RMII-1 functions correctly, but regarding RMII-2 only works the transmit part. I can't receive anything on RMII-2. The LAN chip
is LAN8710. I can see on the oscilloscope that the RMII-2 port on sitara is fed mit receiving signal, but absolutely no trace of receive.
I have also investigated the values of different registers, e.g. statistics, Ethernet-RAM, etc, but unfortunately nothing is seen
with regard to receiving. I would like to know, if it is possible to use simultaneously two ethernet ports on AM3358 in RMII-mode?

  • Hi,

    Yes, RMII is supported on both CPSW Ethernet ports. Please post what software and which version you are using.
  • Hi, I use Linux 3.14.55 and I have selected the following lines from kernel Log:
    net eth0: initializing cpsw version 1.12 (0)
    davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
    davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver SMSC LAN8710/LAN8720
    4a101000.mdio:00 - Link is Up - 100/Full
    4a101000.mdio:00 - Link is Down
    4a101000.mdio:03 - Link is Up - 100/Full
    Interrupt Lines that are used currently : 41 (c0_rx_pend), 42 (c0_tx_pend)
    I have also read the errata from TI, in which mentioed that paced interrupts does not work for
    DMA channels 1-7, but currently only the channel 0 is activated, i.e. I expect that they function errorfree (but not sure).
    after the second physical chip (connection mdio:3) become UP , the c0_rx_pend Interupt would not triggered more!
  • Please complete this checklist and post the results here: processors.wiki.ti.com/.../5x_CPSW
  • The Linux Version that I use is 3.14.55 and I have selected the relevant lines from kernel log:
    net eth0: initializing cpsw version 1.12
    libphy: 4a101000.mdio:00 - Link is Up - 100/Full
    libphy: 4a101000.mdio:00 - Link is Down
    libphy: 4a101000.mdio:03 - Link is Up - 100/Full
    When I connect the second LAN chip (regarding the port mdio:03) then I can send out ethernet pachets,
    but I can't receive, in other words no receive interrupt on the Sitara.
    The Interrupt lines that would be used are paced Interrupts 41 (c0_rx_pend) and 42 (c0_tx_pend).
    In the errata that TI published, is mentioned that bpaced interrupts do not work for DMA-channels 1-7,
    but because currently only the channel 0 is activated on the driver, it maybe logical to expect that the
    receive interrupt functions correctly. I have all the registers that are relevant to receive explored and
    unfortunately have no trace of receiving found!
    Thank you in advance
  • when I start booting the board with the functioning ethernet-port (rmii-1) and then switch to the second ethernet port (rmii-2) the results for RMII-2 are as bellow:
    #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
    Advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Link partner advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Link partner advertised pause frame use: Symmetric Receive-only
    Link partner advertised auto-negotiation: Yes
    Speed: 100Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: external
    Auto-negotiation: on
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000000 (0)

    Link detected: yes
    #ethtool -S eth0
    NIC statistics:
    Good Rx Frames: 111896
    Broadcast Rx Frames: 80996
    Multicast Rx Frames: 26446
    Pause Rx Frames: 0
    Rx CRC Errors: 0
    Rx Align/Code Errors: 0
    Oversize Rx Frames: 0
    Rx Jabbers: 0
    Undersize (Short) Rx Frames: 0
    Rx Fragments: 0
    Rx Octets: 10005816
    Good Tx Frames: 5549
    Broadcast Tx Frames: 16
    Multicast Tx Frames: 8
    Pause Tx Frames: 0
    Deferred Tx Frames: 0
    Collisions: 0
    Single Collision Tx Frames: 0
    Multiple Collision Tx Frames: 0
    Excessive Collisions: 0
    Late Collisions: 0
    Tx Underrun: 0
    Carrier Sense Errors: 0
    Tx Octets: 516046
    Rx + Tx 64 Octet Frames: 79788
    Rx + Tx 65-127 Octet Frames: 30225
    Rx + Tx 128-255 Octet Frames: 3669
    Rx + Tx 256-511 Octet Frames: 1787
    Rx + Tx 512-1023 Octet Frames: 1952
    Rx + Tx 1024-Up Octet Frames: 24
    Net Octets: 10521862
    Rx Start of Frame Overruns: 0
    Rx Middle of Frame Overruns: 0
    Rx DMA Overruns: 0
    Rx DMA chan: head_enqueue: 1
    Rx DMA chan: tail_enqueue: 84026
    Rx DMA chan: pad_enqueue: 0
    Rx DMA chan: misqueued: 0
    Rx DMA chan: desc_alloc_fail: 0
    Rx DMA chan: pad_alloc_fail: 0
    Rx DMA chan: runt_receive_buf: 0
    Rx DMA chan: runt_transmit_buf: 0
    Rx DMA chan: empty_dequeue: 0
    Rx DMA chan: busy_dequeue: 162080
    Rx DMA chan: good_dequeue: 83963
    Rx DMA chan: requeue: 0
    Rx DMA chan: teardown_dequeue: 0
    Tx DMA chan: head_enqueue: 5567
    Tx DMA chan: tail_enqueue: 1
    Tx DMA chan: pad_enqueue: 0
    Tx DMA chan: misqueued: 1
    Tx DMA chan: desc_alloc_fail: 0
    Tx DMA chan: pad_alloc_fail: 0
    Tx DMA chan: runt_receive_buf: 0
    Tx DMA chan: runt_transmit_buf: 300
    Tx DMA chan: empty_dequeue: 167647
    Tx DMA chan: busy_dequeue: 0
    Tx DMA chan: good_dequeue: 5568
    Tx DMA chan: requeue: 5567
    Tx DMA chan: teardown_dequeue: 0

    and when I start booting the board from rmii-2 the results for RMII-2 are as bellow:
    #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
    Advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Speed: 10Mb/s
    Duplex: Half
    Port: MII
    PHYAD: 0
    Transceiver: external
    Auto-negotiation: on
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000000 (0)

    Link detected: yes

    #ethtool -S eth0
    NIC statistics:
    Good Rx Frames: 0
    Broadcast Rx Frames: 0
    Multicast Rx Frames: 0
    Pause Rx Frames: 0
    Rx CRC Errors: 0
    Rx Align/Code Errors: 0
    Oversize Rx Frames: 0
    Rx Jabbers: 0
    Undersize (Short) Rx Frames: 0
    Rx Fragments: 0
    Rx Octets: 0
    Good Tx Frames: 41
    Broadcast Tx Frames: 33
    Multicast Tx Frames: 8
    Pause Tx Frames: 0
    Deferred Tx Frames: 0
    Collisions: 0
    Single Collision Tx Frames: 0
    Multiple Collision Tx Frames: 0
    Excessive Collisions: 0
    Late Collisions: 0
    Tx Underrun: 0
    Carrier Sense Errors: 0
    Tx Octets: 2792
    Rx + Tx 64 Octet Frames: 33
    Rx + Tx 65-127 Octet Frames: 8
    Rx + Tx 128-255 Octet Frames: 0
    Rx + Tx 256-511 Octet Frames: 0
    Rx + Tx 512-1023 Octet Frames: 0
    Rx + Tx 1024-Up Octet Frames: 0
    Net Octets: 2792
    Rx Start of Frame Overruns: 0
    Rx Middle of Frame Overruns: 0
    Rx DMA Overruns: 0
    Rx DMA chan: head_enqueue: 1
    Rx DMA chan: tail_enqueue: 63
    Rx DMA chan: pad_enqueue: 0
    Rx DMA chan: misqueued: 0
    Rx DMA chan: desc_alloc_fail: 0
    Rx DMA chan: pad_alloc_fail: 0
    Rx DMA chan: runt_receive_buf: 0
    Rx DMA chan: runt_transmit_buf: 0
    Rx DMA chan: empty_dequeue: 0
    Rx DMA chan: busy_dequeue: 0
    Rx DMA chan: good_dequeue: 0
    Rx DMA chan: requeue: 0
    Rx DMA chan: teardown_dequeue: 0
    Tx DMA chan: head_enqueue: 41
    Tx DMA chan: tail_enqueue: 0
    Tx DMA chan: pad_enqueue: 0
    Tx DMA chan: misqueued: 0
    Tx DMA chan: desc_alloc_fail: 0
    Tx DMA chan: pad_alloc_fail: 0
    Tx DMA chan: runt_receive_buf: 0
    Tx DMA chan: runt_transmit_buf: 33
    Tx DMA chan: empty_dequeue: 41
    Tx DMA chan: busy_dequeue: 0
    Tx DMA chan: good_dequeue: 41
    Tx DMA chan: requeue: 41
    Tx DMA chan: teardown_dequeue: 0


    Thank you very much for your help.
  • Hi,

    TI will not be able to completely support this question due to the kernel version is over 5 years old and was not a released version supported by TI.

    I can give you a couple of things to look at. You mentioned you were looking at eth1 RMII2, but it looks like the dump for eth0, RMII1 was provided again.

    You need to prove that there is a link detected on eth1 (RMII2) as reported by ethtool eth1, I would also suggest that you do not hook up eth0 (RMII1), just concentrate on eth1. The reason for only hooking up eth1 is that the MAC HW statistics returned by ethtool eth0 are the combined.

    Is this a new project?

    Best Regards,
    Schuyler
  • Hi,

    Thank you for your effort, yes it is a custom project in which I try using two Ethernet ports in rmii mode.However,  If I can arrange to investigate more time on this project, I try to

    use a new stable version of kernel.

    Best Regards, A. Mahmoudi

  • Hi,

    Ok, we will wait for when you are able to return to the project. In the meantime I will mark the thread as resolved. If you have additional questions please continue on this thread if is not locked, else please start a new thread based on this one.

    Best Regards,
    Schuyler
  • Hi,

    Thank you for your help, next week I change the kernel version and investigate the problem again.

    A. Mahmoudi