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.

AM3354: Ethernet port MII2 not working

Part Number: AM3354

Hi,

I have a custom board designed using AM3354.

Ethernet Schematic design is taken from beagle Bone black. We have used MII2 ( where as beagle bone black uses MII1)

Phy IC used is LAN8710A,  (PFA schematics - )Ethernet1_.pdf  & AM3354 pin connections - 

Ethernet port is not detected - Is there any configurations to be done for using MII2. Pls help on this.

Regards

Sujay A

  • Hi,

    You seem to be using 10k pullups on the PHY bootstrap pins MODE[2:0]. Try replacing these with 1.5k as in BBB. Another thing I notice is that R113 is marked as DNP. How do you supply the PHY without this resistor?
  • Hi Biser,

    Sorry for the that. R113 is mounted.

    We had changed MODE[2:0] to 1.5K, but still same issue.

    Regards
    Sujay A
  • Please post Linux version, device tree settings and log files.
  • Hi Biser,

    Thanks for analyzing the problem and issues.

    At present, we have not reached kernel stage. we are trying to establish the connection between target and host via Ethernet communication. On the U-boot prompt by executing the DHCP command the host and target will establish the connection. so that we can able to transfer the device tree and kernel.

    In this steps, the DHCP connection is not established. And when we execute the DHCP command, it sends broadcast messages and retries for 30 times and exceeds the timeout. I am attaching the log file for your reference.

    Regards,

    root@EMMYS0683:/home/test/Desktop/lnt-boot-images# picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx -vv"
    picocom v1.7
    
    port is        : /dev/ttyUSB0
    flowcontrol    : none
    baudrate is    : 115200
    parity is      : none
    databits are   : 8
    escape is      : C-a
    local echo is  : no
    noinit is      : no
    noreset is     : no
    nolock is      : no
    send_cmd is    : sx -vv
    receive_cmd is : rz -vv
    imap is        : 
    omap is        : 
    emap is        : crcrlf,delbs,
    
    Terminal ready
    CCCCCCCC
    *** file: u-boot-spl.bin
    sx -vv u-boot-spl.bin 
    Sending u-boot-spl.bin, 562 blocks: Give your local XMODEM receive command now.
    Xmodem sectors/kbytes sent:   0/ 0kRetry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: NAK on sector
    Bytes Sent:  72064   BPS:277                             
    
    Transfer complete
    
    *** exit status: 0
    
    U-Boot SPL 2016.05-00319-gcf14e635d7-dirty (Jun 13 2017 - 11:26:31)
    Trying to boot from UART
    C
    *** file: u-boot.img
    sx -vv u-boot.img 
    Sending u-boot.img, 3502 blocks: Give your local XMODEM receive command now.
    Xmodem sectors/kbytes sent:   0/ 0kRetry 0: NAK on sector
    Bytes Sent: 448384   BPS:4561                            
    
    Transfer complete
    
    *** exit status: 0
    xyzModem - CRC mode, 3504(SOH)/0(STX)/0(CAN) packets, 3 retries
    Loaded 448354 bytes
    
    
    U-Boot 2016.05-00319-gcf14e635d7-dirty (Jun 13 2017 - 11:26:31 +0530)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x EVM
           Watchdog enabled
    DRAM:  512 MiB
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    MMC: no card present
    ** Bad device mmc 0 **
    Using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   Could not get PHY for ethernet@4a100000: addr 1
    eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in SROM is         de:ad:be:ef:00:01
    Address in environment is  ec:24:b8:72:20:9b
    , eth1: usb_ether
    Press SPACE to abort autoboot in 2 seconds
    => setenv autoload no
    => dhcp
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17
    BOOTP broadcast 18
    BOOTP broadcast 19
    BOOTP broadcast 20
    BOOTP broadcast 21
    BOOTP broadcast 22
    BOOTP broadcast 23
    BOOTP broadcast 24
    BOOTP broadcast 25
    BOOTP broadcast 26
    BOOTP broadcast 27
    BOOTP broadcast 28
    BOOTP broadcast 29
    
    Retry time exceeded; starting again
    => dhcp
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17
    BOOTP broadcast 18
    BOOTP broadcast 19
    BOOTP broadcast 20
    BOOTP broadcast 21
    BOOTP broadcast 22
    BOOTP broadcast 23
    BOOTP broadcast 24
    BOOTP broadcast 25
    BOOTP broadcast 26
    BOOTP broadcast 27
    BOOTP broadcast 28
    BOOTP broadcast 29
    
    Retry time exceeded; starting again
    
    

    Chinnasamy.

  • Hi Biser,

    Further Information on Ethernet

    => mii info

    PHY 0x00: OUI = 0x01F0, Model = 0x0F, Rev = 0x01, 100baseT, FDX

    => mii dump

    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)

     

     

    => mii device

    MII devices: 'ethernet@4a100000'

    Current device: 'ethernet@4a100000'

    => mii

    mii - MII utility commands

     

    Usage:

    mii device                            - list available devices

    mii device <devname>                  - set current device

    mii info   <addr>                     - display MII PHY info

    mii read   <addr> <reg>               - read  MII PHY <addr> register <reg>

    mii write  <addr> <reg> <data>        - write MII PHY <addr> register <reg>

    mii modify <addr> <reg> <data> <mask> - modify MII PHY <addr> register <reg>

                                            updating bits identified in <mask>

    mii dump   <addr> <reg>               - pretty-print <addr> <reg> (0-5 only)

    Addr and/or reg may be ranges, e.g. 2-7.

    => mii info

    PHY 0x00: OUI = 0x01F0, Model = 0x0F, Rev = 0x01, 100baseT, FDX

    => mii info 0x00

    PHY 0x00: OUI = 0x01F0, Model = 0x0F, Rev = 0x01, 100baseT, FDX

    => mii dump

    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)

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

    Following is the pinmux configured:

     

    +               {OFFSET(gpmc_be1n), (MODE(1) | RXACTIVE)},      /* MII2_COL */

    +               {OFFSET(gpmc_wait0), (MODE(1) | RXACTIVE )},    /* MII2_CRS */

    +               {OFFSET(gpmc_wpn), (MODE(1) | RXACTIVE)},               /* MII2_RXER */

    +               {OFFSET(gpmc_a0), MODE(1)},     /* MII2_TXEN */

    +               {OFFSET(gpmc_a1), (MODE(1) | RXACTIVE )},               /* MII2_RXDV */

    +               {OFFSET(gpmc_a6), (MODE(1) | RXACTIVE)},                /* MII2_TXCLK */

    +               {OFFSET(gpmc_a7), (MODE(1) | RXACTIVE)},                /* MII2_RXCLK */

    +               {OFFSET(gpmc_a5), MODE(1)},             /* MII2_TXD0 */

    +               {OFFSET(gpmc_a4), MODE(1)},             /* MII2_TXD1 */

    +               {OFFSET(gpmc_a3), MODE(1)},             /* MII2_TXD2 */

    +               {OFFSET(gpmc_a2), MODE(1)},             /* MII2_TXD3 */

    +               {OFFSET(gpmc_a11), (MODE(1) | RXACTIVE)},               /* MII2_RXD0 */

    +               {OFFSET(gpmc_a10), (MODE(1) | RXACTIVE)},               /* MII2_RXD1 */

    +               {OFFSET(gpmc_a9), (MODE(1) | RXACTIVE)},                /* MII2_RXD2 */

    +               {OFFSET(gpmc_a8), (MODE(1) | RXACTIVE)},                /* MII2_RXD3 */

    +               {OFFSET(mii1_col), (MODE(1) | RXACTIVE)},     /* RMII1_REFCLK */

    +               {OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN}, /* MDIO_DATA */

    +                {OFFSET(mdio_clk), MODE(0) | PULLUP_EN},        /* MDIO_CLK */

    +               {-1},

  • Ethernet length matching.xlsx

    Please find attached ethernet length matching file.It represents the trace length between AM3354 MAC to the Ethernet PHY.Can it cause some problem in communication?

    Note:Length is calculated in mills

  • Hi Biser,

    Adding to the above. is there any way we can match the length manually or make some workaround on the existing hardware?
    Please suggest

    Regards
    Sujay A
  • I have asked the Ethernet experts to check. They will respond here.
  • Can you post the dts file for u-boot that was used? Which build target did you use for the u-boot image for the custom board?