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.

Network issue to DM8107 RGMII with RTL8211E-VL not function

Other Parts Discussed in Thread: DM8107

Hi,

We used to have a design using DM8107's EMAC1 RMII interface to RTL8201, it worked fine. But we want to upgrade the product to work on 1000M/Giga interface, so change the design to EMAC0 RGMII interface with RTL8211E-VL giga-phy. But, it doesn't work.
1. The Uboot version is TI813X-GP rev 1.1, At Uboot stage, the network mesage..
Net: Ethernet clocking: 0x0
Detected MACID:7c:66:9d:fa:c4:ae
cpsw
Hit any key to stop autoboot: 0
------- We Try to set ip and ping to outside 192.168.1.29 -----------
UBOOT # set ipaddr 192.168.1.177;ping 192.168.1.29
link up on port 0, speed 100, full duplex
Using cpsw device
ping failed; host 192.168.1.29 is not alive

2. At Kernel booting stage, the message...
- When it connects to a Giga LAN, the message from console as below.
[ 14.650000] CPSW phy found : id is : 0x1cc915
[ 14.660000]
[ 14.660000] CPSW phy found : id is : 0x1cc915
[ 16.650000] PHY: 0:01 - Link is Up - 1000/Full
[ 16.650000] PHY: 0:00 - Link is Up - 1000/Full
[ 25.360000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 25.470000] nf_conntrack version 0.5.0 (9724 buckets, 38896 max)
[ 67.360000] NET: Registered protocol family 10

- When it connects to a 10/100M LAN, the message from console as below.
[ 14.750000] CPSW phy found : id is : 0x1cc915
[ 14.760000]
[ 14.760000] CPSW phy found : id is : 0x1cc915
[ 16.750000] PHY: 0:01 - Link is Up - 100/Full
[ 16.750000] PHY: 0:00 - Link is Up - 100/Full
[ 25.450000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 25.570000] nf_conntrack version 0.5.0 (9724 buckets, 38896 max)
[ 67.450000] NET: Registered protocol family 10

3. The signal measured form oscilloscope...
- The clock frequency is 500KHz on MDCLK.
- The frequency of EMAC[0]_RGRXC is 25MHz at 10/100M connection and 125MHz at Giga connection, but can't get any frequency output form EMAC[0]_RGTXC.
- There is a short signal puls around 5us~10us on EMAC[0]_RGRXCTL at 10/100M connection, but nothing on EMAC[0]_RGTXCTL.
- There is a short signal puls around 500ns on EMAC[0]_RGRXCTL at 1000M connection, but nothing on EMAC[0]_RGTXCTL.

We also change the DM8107's GMII_SEL register from 0x30a to 0x33a or vice versa to enable/disable internal delay, but it still doesn't work.
The pin mux for RGMII lists as below..

/*configure pin mux for rmii_refclk,mdio_clk,mdio_d */
val = PAD232_CNTRL;
PAD232_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD233_CNTRL;
PAD233_CNTRL = (volatile unsigned int) (BIT(19) | BIT(17) | BIT(0));
val = PAD234_CNTRL;
PAD234_CNTRL = (volatile unsigned int) (BIT(19) | BIT(18) | BIT(17) |
BIT(0));

/* setup rgmii0/rgmii1 pins here */
val = PAD235_CNTRL; /*rgmii0_rxc*/
PAD235_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD236_CNTRL; /*rgmii0_rxctl*/
PAD236_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD237_CNTRL; /*rgmii0_rxd[2]*/
PAD237_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD238_CNTRL; /*rgmii0_txctl*/
PAD238_CNTRL = (volatile unsigned int) BIT(0);
val = PAD239_CNTRL; /*rgmii0_txc*/
PAD239_CNTRL = (volatile unsigned int) BIT(0);
val = PAD240_CNTRL; /*rgmii0_txd[0]*/
PAD240_CNTRL = (volatile unsigned int) BIT(0);
val = PAD241_CNTRL; /*rgmii0_rxd[0]*/
PAD241_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD242_CNTRL; /*rgmii0_rxd[1]*/
PAD242_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD243_CNTRL; /*rgmii1_rxctl*/
PAD243_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD244_CNTRL; /*rgmii0_rxd[3]*/
PAD244_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD245_CNTRL; /*rgmii0_txd[3]*/
PAD245_CNTRL = (volatile unsigned int) BIT(0);
val = PAD246_CNTRL; /*rgmii0_txd[2]*/
PAD246_CNTRL = (volatile unsigned int) BIT(0);
val = PAD247_CNTRL; /*rgmii0_txd[1]*/
PAD247_CNTRL = (volatile unsigned int) BIT(0);
val = PAD248_CNTRL; /*rgmii1_rxd[1]*/
PAD248_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD249_CNTRL; /*rgmii1_rxc*/
PAD249_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD250_CNTRL; /*rgmii1_rxd[3]*/
PAD250_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD251_CNTRL; /*rgmii1_txd[1]*/
PAD251_CNTRL = (volatile unsigned int) (BIT(0));
val = PAD252_CNTRL; /*rgmii1_txctl*/
PAD252_CNTRL = (volatile unsigned int) (BIT(0));
val = PAD253_CNTRL; /*rgmii1_txd[0]*/
PAD253_CNTRL = (volatile unsigned int) (BIT(0));
val = PAD254_CNTRL; /*rgmii1_txd[2]*/
PAD254_CNTRL = (volatile unsigned int) (BIT(0));
val = PAD255_CNTRL; /*rgmii1_txc*/
PAD255_CNTRL = (volatile unsigned int) (BIT(0));
val = PAD256_CNTRL; /*rgmii1_rxd[0]*/
PAD256_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));
val = PAD257_CNTRL; /*rgmii1_txd[3]*/
PAD257_CNTRL = (volatile unsigned int) (BIT(0));
val = PAD258_CNTRL; /*rgmii1_rxd[2]*/
PAD258_CNTRL = (volatile unsigned int) (BIT(18) | BIT(0));


Can someone please give us a suggestion to fix this issue.

Thanks & regards

  • Hi Jerry,

    Jerry Chao said:
    We used to have a design using DM8107's

    Jerry Chao said:
    The Uboot version is TI813X-GP rev 1.1

    Can you try with the latest u-boot release for 8107/TI810x:

    http://arago-project.org/git/projects/?p=u-boot-dvr-rdk-dm81xx.git;a=shortlog;h=refs/heads/dvrrdk_uboot_int_branch

    Refer also to the below wiki page:

    http://processors.wiki.ti.com/index.php/TI81xx_PSP_Porting_Guide#Ethernet_Driver_-_Adding_Custom_Ethernet_Phy

    Regards,
    Pavel

  • Hi Pavel,

    Thanks of your kindness and quick response on giving us the sugguestions.
    We downloade u-boot of 8107/TI810x try this morning. But it still doesn't work, and the messages are also the same as I posted yesterday.

    - EMAC[0]_RGRXC is the same with 25MHz on10/100M, 125MHz on 1000M, but EMAC[0]_RGTXC still stays calm, nothing output.

    We check the PCB layout and it should be fine on EMAC[0]_RGTXC and EMAC[0]_RGTXCTL from 8107 to RTL8211. There are 10pcs of PCBA we tested, and all, got the same problem.

    Is there any RGMII register of 8107 should be programed to activate RGTXC ?

    Thanks & regards

  • Jerry,

    Jerry Chao said:
    We downloade u-boot of 8107/TI810x try this morning. But it still doesn't work, and the messages are also the same as I posted yesterday.

    The DM814x u-boot is configured for RGMII mode by default, as the DM814x TI EVM has RGMII PHY (AR8031). Thus you can refer to the DM814x u-boot for reference about the RGMII settings:

    http://arago-project.org/git/projects/u-boot-omap3.git?p=projects/u-boot-omap3.git;a=shortlog;h=refs/heads/ti81xx-master

    Jerry Chao said:
    EMAC[0]_RGRXC is the same with 25MHz on10/100M, 125MHz on 1000M, but EMAC[0]_RGTXC still stays calm, nothing output.

    According to the DM814x TRM, both RGTXC and RGRXC should be 125MHz for 1000M.

    Jerry Chao said:
    We check the PCB layout and it should be fine on EMAC[0]_RGTXC and EMAC[0]_RGTXCTL from 8107 to RTL8211. There are 10pcs of PCBA we tested, and all, got the same problem.

    Refer to the DM814x TI EVM schematics, where RGMII PHY is used. See also DM811x/J5Eco TI EVM schematics, where also RGMII mode is used for ethernet.

    Jerry Chao said:
    Is there any RGMII register of 8107 should be programed to activate RGTXC ?

    The RGMII related registers in DM814x device are:

    GMII_SEL[1:0] GMII0_SEL = 0x2 RGMII, [4] RGMII0_ID_MODE = 0 - internal delay, [8] RGMII0_EN = 1 RGMII mode

    SL1_MACCONTROL[18] EXT_EN = 1 - for RGMII mode

    RGMII_CTL - status register

    I think DM8107 RGMII registers should be same (or at least similar).

    Note also that you should provide two RGMII specific clock signals from PRCM to EMAC - 5MHz from SATA SerDes and 250MHz from mux of video PLLs. For DM811x/J5Eco device we have just 250Mhz clock.

    Below is the EMAC initialization procedure, taken from the DM814x TRM:

    9.3.4 Initialization and Configuration of CPSW
    To configure the 3PSW Ethernet Subsystem for operation the host must perform the following:
    1. Select the Interface (G/MII, RGMII, RMII) Mode
    2. Configure pads (PIN muxing), as per the interface selected.
    3. Enable the 3PSW Ethernet Subsystem Clocks
    4. Configure the PRCM registers CM_ETHERNET_CLKSTCTRL,
    CM_ALWON_ETHERNET_0_CLKCTRL to enable power and clocks to 3PSW Ethernet Subsystem.
    5. Apply Soft Reset to 3PSW Subsystem, CPSW_3G, CPGMAC_SL1/2, and CPDMA
    6. Initialize the HDPs (Header Description Pointer) and CPs (Completion Pointer) to NULL
    7. Configure the Interrupts
    8. Configure the CPSW_3G CONTROL register
    9. Configure the Statistics Port Enable register
    10. Configure the ALE
    11. Configure the MDIO
    12. Configure the CPDMA receive DMA controller
    13. Configure the CPDMA transmit DMA controller
    14. Configure the CPPI TX and RX Descriptors
    15. Configure CPGMAC_SL1 and CPGMAC_SL2, as per the desired mode of operations.
    16. Start up RX and TX DMA (Write to HDP of RX and TX)
    17. Wait for the completion of Transfer (HDP cleared to 0)

    BR
    Pavel

  • Hi Pavel,

    The SATA SERDES clock is measured 100MHz on our DM8107 board. And we do set the GMII_SEL[0..9] and CPSW port1's SL1_MACCONTROL[18] register to RGMII mode, but it still doesn't help. The TXC, TX_CTL and data pins which are all no signal out from EMAC0.
    Compare to the 8139 EVM board with TI/disti FAE today, we checked

    1) The circuit connections of EMAC0 on our 8107 board are the same compared to 8139 EVM.
    2) The signal of TXC from EMAC0:
    i) EVM board, when power up, signal TXC always output no matter the MDIO/MDCK are linked or not. But our DM8107 hasn't any output even on MDIO/MDCK are well connected.
    ii) TXD0 has signal at u-boot stage when we cast ping command from 8139 EVM, but there doesn't has any signal on DM8107 board by the same operation.

    Is there any difference between 8139 and 8107 on EMAC control ? If it is the same on driver level why it is still not working on EMAC0, or there still something that we should have to take care. TRM 9.3.4 CPSW configuration should has been implemented by u-boot and kernel.
    Beyound these settings, is there any other settings on CPSW that we can check and verify the activity of EMAC0.

    Thanks & regards

  • Jerry,

    Jerry Chao said:
    Compare to the 8139 EVM board with TI/disti FAE today

    Can you also compare with DM814x EVM and DM811x/J5Eco EVM? The best option of course is to compare with DM8107 TI EVM if you have the schematics.

    DM814x EVM page - http://www.mistralsolutions.com/product-engineering-services/support-downloads/

    DM811x/J5Eco EVM page - http://support.spectrumdigital.com/boards/j5ecoevm/reve/

    There is also hardware diagnostic test that can be used to check the proper EMAC0 HW design:

    For DM814x - Diagnostic Software -> Base Board -> CCS_Code_BB -> src -> CCS_Test_code -> Base_Board -> rgmii_emac_0

    This CCS test application validates the EMAC0 for its ability to perform  write access; read access and data TX/RX ability. The test application writes  a known pattern into the TX Buffer and then reads back and verifies the same via a external loopback.  
    The known pattern written into the memory is the incremental hexadecimal numbers. After transferring the entire memory area, this application reads them back and validates the data read. If the data read does not match the expected pattern, this test  is declared failed. It is declared pass otherwise.

    See also if the below e2e thread will be in help:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/353786.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/358952.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/274017.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/178450.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/261388.aspx

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/200257.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/242171.aspx

    Check also DM8107 Silicon Errata for any EMAC and eth PHY related advisories.

    BR
    Pavel

  • If you can read Chinese please refer to below link

    http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/t/52243.aspx