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.

RGMII 10Mbps problem

Hi All.

We are using DM8148 custom board with external MAX24287 PHY. We use RGMII0 and RGMII1 with a different phy on each end. We currently have an issue with 10mbps speed.
The communication works fine in 1000 and 100 speeds (both half and full duplex). We issue a loopback in the phy, and we using pktgen kernel module to test the interfaces. On speeds 1000 and 100 we send 10000 packets each time and it reflects as 10000 txgoodframes and 10000 rxgoodframes in the cpsw statistics.
When we lower the speed to 10mbps and send the 10000 packets, we see 10000 txcarriersenseerrors and no rxgoodframes at all.
Touching with a scope in the tx and rx lines (when loopback is on) we see data streaming from MAC to PHY (tx data) but nothing at all on rx data lines 

We have tried to investigate the issue and we came to this result:

At speeds of 1000 and 100 mbps, we can see that the RGMII0_TXCTL is asserted before each sending of a packet.
At the speed of 10 mbps this line is never asserted (stays low at all times).
We have tried to leave this line in high impedance, and as a result of this action the rx line had started working in 10mbps (we saw the packets from tx lines looped back to the rx lines). But after few second we get a kernel panic of Transmit Queue 0 timed out (makes sense because RGMII0_TXCTL is never de-asserted).

Why can it be happening? Why is the RGMII0_TXCTL is not asserted by the processor only when operating at 10mbps speed?

Here are some configurations:
MACCONTROL REGISTER:

Speed 1000 - 0xa1 - (BITS 7+5+1)
Speed 100 - 0x8021 (BITS 15+5+1)
Speed 10 - 0x40021 (BITS 18+5+1)

kernel configuration has CONFIG_TI_CPSW_DUAL_EMAC 

Please Help 

Kind Regards :)

  • Hi MoonDrop,

    Please provide the below info:

    - are you able to reproduce this issue on DM814x TI EVM?

    - are you using EZSDK, DVR RDK, IPNC RDK, else? Which version?

    - can you test in u-boot also

    BR
    Pavel
  • Make sure also your board is aligned with RGMII 10Mbps requirements, described in DM814x datasheet, section 8.6.2.3

    Check also DM814x TRM, section 9.2.1.8.3

    RGMII_RXC/TXC clock frequency should be 2.5MHz for 10Mbps mode. See also registers RGMII_CTL and CPGMAC_SL1 MACCONTROL

    Check also the switch/router/host that you are plugged into only support 100/1000 speed, but not 10.

    Check also below e2e threads:

    DM8148 RGMII usable at 10 Mbps? - Processors forum - Processors - TI E2E support forums

    e2e.ti.com
    In section 9.2.1.6.3.1 of the DM8148x Tech Ref Manual, it says that the RGMII interface does not support MII mode. What does this mean? Does it mean that the RGMII

    CPSW In-Band Operating Mode of RGMII question... - Processors forum - Processors - TI E2E support fo...

    e2e.ti.com
    In the current 8148 TRM (14 Oct 2011) in section 8.2.1.7.3.3 In-Band Mode of Operation it indicates that setting the EXT_EN bit in the MACCONTROL sliver register



    BR
    Pavel

  • Hi.

    Thanks for the reply, but the above links did not help.
    We have checked the EVM and it works for 10Mbps speed. We can see that in the EVM the configuration of MACCONTROL register is 0x40020 when working in 10Mbps. We can also see that the TX_CTL line is being asserted for each frame that is transmitted, as it should be.

    On the other hand, in the custom board, the configuration is the same (we use same CPSW driver, and we checked that MACCONTROL is 0x40020 also) exactly,
    but upon transmit we see only the txcarriersense errors increment (trying sending 10000 packets in loopback mode (phy loopback) gave the result of 10000 txcarriersense errors and no rxgoodframes at all).

    When we touch with the scope, we can see that the TX_CTL line is not being asserted at any time.

    When i try to disable in-band mode (turn off bit 18 in MACCONTROL). i actually start getting txgoodframes to counter increment, but no outgoing packets are seen in wireshark. Then i see that when i turn this bit off, the TX clock is changing to 25Mhz.

    How can i do? why doesn't the MAC assert TX_CTL signal while in In-Band mode (on the EVM it does - on the custom board it doesn't - SAME CPSW CODE is running on both)? Is it possible to make 10Mbps work in RGMII without in-band?

    Please Help :)

    Kind Regards 

  • Also, what would be the correct configuration for out-band 10Mbps? As i see it should be 0x20 (or 0x21) in MACCONTROL register, is that correct?

    if yes, what could be the cause that i am seeing 25Mhz clock when i configure the MACCONTROL to 0x20 (or 0x21)???