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.

AM4377: RMII Ethernet not available in U-boot

Part Number: AM4377

The AM4377 uses the RMII interface to connect to the DP83848 and connects to the computer via a network cable (the network card is the Intel(R) PRO/1000 MT Dual Port Server Adapter).
Uboot network port is not available, please help us to see if the hardware pin connection and pinmux configuration is normal? Thank youchematic reference annex:
Serial port printing reference attachment:(uboot use ti-processor-sdk-linux-am437x-evm-03.02.00.05-Linux-x86-Install.bin)


Pinmux settings:
static struct module_pin_mux rmii2_pin_mux[] = {
{OFFSET(gpmc_a0), MODE(3)| SLEWCTRL}, /* RMII2_TXEN:*/
{OFFSET(gpmc_a4), MODE(3)| SLEWCTRL}, /* RMII2_TXD1:*/
{OFFSET(gpmc_a5), MODE(3)| SLEWCTRL}, /* RMII2_TXD0:*/
{OFFSET(gpmc_a10), MODE(3) | SLEWCTRL | RXACTIVE}, /* RMII2_RXD1:*/
{OFFSET(gpmc_a11), MODE(3) | SLEWCTRL | RXACTIVE}, /* RMII2_RXD0:*/
{OFFSET(gpmc_wait0), MODE(3) | PULLUP_EN | RXACTIVE}, /* RMII2_CRS_DV:*/
{OFFSET(gpmc_wpn), MODE(3) | SLEWCTRL | RXACTIVE}, /* RMII2_RXER:*/
{OFFSET(mii1_col), MODE(1) | RXACTIVE}, /* RMII2_refclk:*/
{-1},
};

other setting:
1)auto negotiation enabled on both ends of the link,The PC's Network card has also been set to auto-negotiation mode.
2)the link speeds is 100 Mbps.The PC's Network card rate query is also 100M.
3)Full Duplex mode is correct.
CRSC># mdio read 0-7 (----when uboot)
Reading from bus cpsw
PHY at address 1:
0 - 0x3100 --ok
1 - 0x786d
2 - 0x2000
3 - 0x5c90
4 - 0x1e1
5 - 0xc1e1 --1 = Link Partner desires Next Page Transfer.
6 - 0xf --1 = Link Partner does support Next Page
7 - 0x2801
CRSC># md 4a100900
4a100900: 00000000 00000000 00000000 00000000 ................
4a100910: 00000000 00000000 00000000 00000000 ................
4a100920: 00000000 00000000 00000000 00000000 ................
4a100930: 00000000 00000000 00000000 00000000 ................
4a100940: 00000000 00000000 00000000 00000000 ................
4a100950: 00000000 00000000 00000000 00000000 ................
4a100960: 00000000 00000000 00000000 00000000 ................
4a100970: 00000000 00000000 00000000 00000000 ................
4a100980: 00000000 00000000 00000000 00000000 ................

uboot code modified:

thank you!

  • Hi,

    Thank you for posting the MII registers, just to make sure I am reading correctly, could you please just post the results of these two commands?

    mii dump 0 0 

    mii dump 0 1

    I think the registers are showing link status detected but I want to make sure. The HW statistics area looks like it is showing no traffic.

    A quick review of the pin mux looks to be incorrect, it looks like the rx data valid pin is missing. I will review the pin mux and respond to this post.

    Best Regards,

    Schuyler

  • thanks for your reply!
    my phy addr pin is set 1,more information is in Attachment.

    thanks for your reply!
    my phy addr pin is set 1��
    CRSC># printenv
    eth1addr=b0:d5:cc:73:cd:6e                                                                                                          
    ethact=cpsw                                                                                                                         
    ethaddr=b0:d5:cc:73:cd:6c
    gateway=192.168.1.1                                                                                                                 
    ipaddr=192.168.1.2  
    netmask=255.255.255.0 
    serverip=192.168.1.11   
    
    CRSC># ping 192.168.1.11                                                                                                            
    Trying cpsw                                                                                                                         
    link up on port 0, speed 100, full duplex                                                                                           
    Using cpsw device                                                                                                                   
                                                                                                                                        
    ARP Retry count exceeded; starting again                                                                                            
    ping failed; host 192.168.1.11 is not alive                                                                                         
    Command failed, result=1                                                                                                            
    CRSC># md 4a100900                                                                                                                  
    4a100900: 00000000 00000000 00000000 00000000    ................                                                                   
    4a100910: 00000000 00000000 00000000 00000000    ................                                                                   
    4a100920: 00000000 00000000 00000000 00000000    ................                                                                   
    4a100930: 00000000 00000000 00000000 00000000    ................                                                                   
    4a100940: 00000000 00000000 00000000 00000000    ................                                                                   
    4a100950: 00000000 00000000 00000000 00000000    ................                                                                   
    4a100960: 00000000 00000000 00000000 00000000    ................                                                                   
    4a100970: 00000000 00000000 00000000 00000000    ................                                                                   
    4a100980: 00000000 00000000 00000000 00000000    ................                                                                   
    4a100990: 00000000 00000000 00000000 00000000    ................                                                                   
    4a1009a0: 00000000 00000000 00000000 00000000    ................                                                                   
    4a1009b0: 00000000 00000000 00000000 00000000    ................                                                                   
    4a1009c0: 00000000 00000000 00000000 00000000    ................                                                                   
    4a1009d0: 00000000 00000000 00000000 00000000    ................                                                                   
    4a1009e0: 00000000 00000000 00000000 00000000    ................                                                                   
    4a1009f0: 00000000 00000000 00000000 00000000    ................                                                                   
    CRSC># mii dump 0 0                                                                                                                 
    Error reading from the PHY addr=00 reg=00                                                                                           
                                                                                                                                        
    Command failed, result=1                                                                                                            
    CRSC># mii dump 0 1                                                                                                                 
    Error reading from the PHY addr=00 reg=01                                                                                           
                                                                                                                                        
    Command failed, result=1                                                                                                            
    CRSC># mii dump 1 0                                                                                                                 
    0.     (3100)                 -- PHY control register --                                                                            
      (8000:0000) 0.15    =     0    reset                                                                                              
      (4000:0000) 0.14    =     0    loopback                                                                                           
      (2040:2000) 0. 6,13 =   b01    speed selection = 100 Mbps                                                                         
      (1000:1000) 0.12    =     1    A/N enable                                                                                         
      (0800:0000) 0.11    =     0    power-down                                                                                         
      (0400:0000) 0.10    =     0    isolate                                                                                            
      (0200:0000) 0. 9    =     0    restart A/N                                                                                        
      (0100:0100) 0. 8    =     1    duplex = full                                                                                      
      (0080:0000) 0. 7    =     0    collision test enable                                                                              
      (003f:0000) 0. 5- 0 =     0    (reserved)                                                                                         
                                                                                                                                        
                                                                                                                                        
    CRSC># mii dump 1 1                                                                                                                 
    1.     (786d)                 -- PHY status register --                                                                             
      (8000:0000) 1.15    =     0    100BASE-T4 able                                                                                    
      (4000:4000) 1.14    =     1    100BASE-X  full duplex able                                                                        
      (2000:2000) 1.13    =     1    100BASE-X  half duplex able                                                                        
      (1000:1000) 1.12    =     1    10 Mbps    full duplex able                                                                        
      (0800:0800) 1.11    =     1    10 Mbps    half duplex able                                                                        
      (0400:0000) 1.10    =     0    100BASE-T2 full duplex able                                                                        
      (0200:0000) 1. 9    =     0    100BASE-T2 half duplex able                                                                        
      (0100:0000) 1. 8    =     0    extended status                                                                                    
      (0080:0000) 1. 7    =     0    (reserved)                                                                                         
      (0040:0040) 1. 6    =     1    MF preamble suppression                                                                            
      (0020:0020) 1. 5    =     1    A/N complete                                                                                       
      (0010:0000) 1. 4    =     0    remote fault                                                                                       
      (0008:0008) 1. 3    =     1    A/N able                                                                                           
      (0004:0004) 1. 2    =     1    link status                                                                                        
      (0002:0000) 1. 1    =     0    jabber detect                                                                                      
      (0001:0001) 1. 0    =     1    extended capabilities                                                                              
                                                                                                                                        
                                                                                                                                        
    CRSC># mii dump                                                                                                                     
    1.     (786d)                 -- PHY status register --                                                                             
      (8000:0000) 1.15    =     0    100BASE-T4 able                                                                                    
      (4000:4000) 1.14    =     1    100BASE-X  full duplex able                                                                        
      (2000:2000) 1.13    =     1    100BASE-X  half duplex able                                                                        
      (1000:1000) 1.12    =     1    10 Mbps    full duplex able                                                                        
      (0800:0800) 1.11    =     1    10 Mbps    half duplex able                                                                        
      (0400:0000) 1.10    =     0    100BASE-T2 full duplex able                                                                        
      (0200:0000) 1. 9    =     0    100BASE-T2 half duplex able                                                                        
      (0100:0000) 1. 8    =     0    extended status                                                                                    
      (0080:0000) 1. 7    =     0    (reserved)                                                                                         
      (0040:0040) 1. 6    =     1    MF preamble suppression                                                                            
      (0020:0020) 1. 5    =     1    A/N complete                                                                                       
      (0010:0000) 1. 4    =     0    remote fault                                                                                       
      (0008:0008) 1. 3    =     1    A/N able                                                                                           
      (0004:0004) 1. 2    =     1    link status                                                                                        
      (0002:0000) 1. 1    =     0    jabber detect                                                                                      
      (0001:0001) 1. 0    =     1    extended capabilities                                                                              
                                                                                                                                        
                                                                                                                                        
    CRSC># mii dump help                                                                                                                
    Error reading from the PHY addr=00 reg=01                                                                                           
                                                                                                                                        
    Command failed, result=1                                                                                                            
    CRSC># mii dump 1 2                                                                                                                 
    2.     (2000)                 -- PHY ID 1 register --                                                                               
      (ffff:2000) 2.15- 0 =  8192    OUI portion                                                                                        
                                                                                                                                        
                                                                                                                                        
    CRSC># mii dump 1 3                                                                                                                 
    3.     (5c90)                 -- PHY ID 2 register --                                                                               
      (fc00:5c00) 3.15-10 =    23    OUI portion                                                                                        
      (03f0:0090) 3. 9- 4 =     9    manufacturer part number                                                                           
      (000f:0000) 3. 3- 0 =     0    manufacturer rev. number                                                                           
                                                                                                                                        
                                                                                                                                        
    CRSC># mii dump 1 4                                                                                                                 
    4.     (01e1)                 -- Autonegotiation advertisement register --                                                          
      (8000:0000) 4.15    =     0    next page able                                                                                     
      (4000:0000) 4.14    =     0    (reserved)                                                                                         
      (2000:0000) 4.13    =     0    remote fault                                                                                       
      (1000:0000) 4.12    =     0    (reserved)                                                                                         
      (0800:0000) 4.11    =     0    asymmetric pause                                                                                   
      (0400:0000) 4.10    =     0    pause enable                                                                                       
      (0200:0000) 4. 9    =     0    100BASE-T4 able                                                                                    
      (0100:0100) 4. 8    =     1    100BASE-TX full duplex able                                                                        
      (0080:0080) 4. 7    =     1    100BASE-TX able                                                                                    
      (0040:0040) 4. 6    =     1    10BASE-T   full duplex able                                                                        
      (0020:0020) 4. 5    =     1    10BASE-T   able                                                                                    
      (001f:0001) 4. 4- 0 =     1    selector = IEEE 802.3                                                                              
                                                                                                                                        
                                                                                                                                        
    CRSC># mii dump 1 5                                                                                                                 
    5.     (c1e1)                 -- Autonegotiation partner abilities register --                                                      
      (8000:8000) 5.15    =     1    next page able                                                                                     
      (4000:4000) 5.14    =     1    acknowledge                                                                                        
      (2000:0000) 5.13    =     0    remote fault                                                                                       
      (1000:0000) 5.12    =     0    (reserved)                                                                                         
      (0800:0000) 5.11    =     0    asymmetric pause able                                                                              
      (0400:0000) 5.10    =     0    pause able                                                                                         
      (0200:0000) 5. 9    =     0    100BASE-T4 able                                                                                    
      (0100:0100) 5. 8    =     1    100BASE-X full duplex able                                                                         
      (0080:0080) 5. 7    =     1    100BASE-TX able                                                                                    
      (0040:0040) 5. 6    =     1    10BASE-T full duplex able                                                                          
      (0020:0020) 5. 5    =     1    10BASE-T able                                                                                      
      (001f:0001) 5. 4- 0 =     1    selector = IEEE 802.3                                                                              
                                                                                                                                        
                                                                                                                                        
    CRSC># mii dump 1 6                                                                                                                 
    The MII dump command only formats the standard MII registers, 0-5.                                                                  
    Command failed, result=1 

    CRSC># mii dump 1 0
    0. (3100) -- PHY control register --
    (8000:0000) 0.15 = 0 reset
    (4000:0000) 0.14 = 0 loopback
    (2040:2000) 0. 6,13 = b01 speed selection = 100 Mbps
    (1000:1000) 0.12 = 1 A/N enable
    (0800:0000) 0.11 = 0 power-down
    (0400:0000) 0.10 = 0 isolate
    (0200:0000) 0. 9 = 0 restart A/N
    (0100:0100) 0. 8 = 1 duplex = full
    (0080:0000) 0. 7 = 0 collision test enable
    (003f:0000) 0. 5- 0 = 0 (reserved)


    CRSC># mii dump 1 1
    1. (786d) -- PHY status register --
    (8000:0000) 1.15 = 0 100BASE-T4 able
    (4000:4000) 1.14 = 1 100BASE-X full duplex able
    (2000:2000) 1.13 = 1 100BASE-X half duplex able
    (1000:1000) 1.12 = 1 10 Mbps full duplex able
    (0800:0800) 1.11 = 1 10 Mbps half duplex able
    (0400:0000) 1.10 = 0 100BASE-T2 full duplex able
    (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able
    (0100:0000) 1. 8 = 0 extended status
    (0080:0000) 1. 7 = 0 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0020) 1. 5 = 1 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0004) 1. 2 = 1 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities

  • When ping or tftp fails, it will enter the halt process and cpsw softreset, so the check register is not counted.
    add read reg before halt:but the count is still=0.
    CRSC># ping 192.168.1.11
    _cpsw_halt;
    _cpsw_get_stats base0x900:
    0(0),0(4),0(8),0(c),0(10),0(14),0(18),0(1c),
    0(20),0(24),0(28),0(2c),0(30),0(34),0(38),0(3c),
    0(40),0(44),0(48),0(4c),0(50),0(54),0(58),0(5c),
    0(60),0(64),0(68),0(6c),0(70),0(74),0(78),0(7c),
    0(80),0(84),0(88),0(8c),Trying cpsw
    _cpsw_init b0:d5:cc:73:cd:6c;
    link up on port 0, speed 100, full duplex
    Using cpsw device
    send 42;
    send 42;
    send 42;
    ...

    ARP Retry count exceeded; starting again
    _cpsw_halt;
    _cpsw_get_stats base0x900:
    0(0),0(4),0(8),0(c),0(10),0(14),0(18),0(1c),
    0(20),0(24),0(28),0(2c),0(30),0(34),0(38),0(3c),
    0(40),0(44),0(48),0(4c),0(50),0(54),0(58),0(5c),
    0(60),0(64),0(68),0(6c),0(70),0(74),0(78),0(7c),
    0(80),0(84),0(88),0(8c),ping failed; host 192.168.1.11 is not alive
    Command failed, result=1
    CRSC>#

  • Hi,

    I apologize since I am not sure I am following the console output. This is u-boot code correct? Have you added code? Turned on Debug? I see you included some files as reference, the board file for example. Could you please re-post as an attachment of each file using git diff against the original file?

    How are these value getting set? Through a DHCP command?

    gateway=192.168.1.1
    ipaddr=192.168.1.2
    netmask=255.255.255.0
    serverip=192.168.1.11

    Best Regards,

    Schuyler

     

  • Thank you for your reply, the problem has been resolved, we need to set active_slave=1 (use RMII2 without DM_ETH)

    CRSC># ping 192.168.1.11
    cpsw_halt;
    _cpsw_get_ss base0x4a100000,ofs0x0:
    0x0:19010f,0,0,0,
    _cpsw_get_stats ofs0x900:
    0x0:0,0,0,0,0,0,0,0,
    0x20:0,0,0,0,0,0,0,0,
    0x40:0,0,0,0,0,0,0,0,
    0x60:0,0,0,0,0,0,0,0,
    0x80:0,0,0,0,
    _cpsw_get_cpdma ofs0x800:
    0x0:180109,0,0,0,180109,0,0,0,
    0x20:0,80000000,0,0,0,0,0,0,
    0x40:0,0,0,0,
    0x80:0,0,0,0,0,0,0,0,
    0xa0:0,0,0,0,0,0,0,0,
    0xc0:0,0,0,0,0,0,0,0,
    0xe0:0,0,0,0,0,0,0,0,
    Trying cpsw
    cpsw_init b0:d5:cc:73:cd:6c;
    wrt4a10000c=7,rd=7,rd2=7;
    slave_port=2;
    link up on port 1, speed 100, full duplex
    Using cpsw device
    send 42;
    recv 64;
    send 42;
    recv 64;
    cpsw_halt;
    _cpsw_get_ss base0x4a100000,ofs0x0:
    0x0:19010f,0,0,7,
    _cpsw_get_stats ofs0x900:
    0x0:2,0,0,0,0,0,0,0,
    0x20:0,0,0,0,80,2,1,0,
    0x40:0,0,0,0,0,0,0,0,
    0x60:0,80,4,0,0,0,0,0,
    0x80:100,0,0,0,
    _cpsw_get_cpdma ofs0x800:
    0x0:180109,1,0,0,180109,1,0,0,
    0x20:0,80000000,0,0,0,0,0,0,
    0x40:0,0,0,0,
    0x80:1,0,0,0,0,0,0,0,
    0xa0:0,0,0,0,0,0,0,0,
    0xc0:0,0,0,0,0,0,0,0,
    0xe0:40,0,0,0,0,0,0,0,
    host 192.168.1.11 is alive

  • Hi,

    That is good to hear. I will mark the thread as closed. Please click this resolved my issue on the response email. Thank you.

    Best Regards,

    Schuyler