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.

DP83630 on U-boot: ETH0 shows PHY not found; ETH1 auto nego done link up, but not pingable.

Other Parts Discussed in Thread: DP83630, DP83865

Hi,

We have two DP83630 on ATMEL AT91SAM9x25, Kernel 3.10, u-boot 2014.07-at91

I can see 3 LEDs of each chip are blinking with hubs (NIC ports),  from both DP83630 chips.

From u-boot level, I tried to ping with gateway – hubs work fine, but it showed:

ETH0: macb_phy_find - macb0: PHY not found

ETH1:

macb_phy_find - macb1: PHY present at 1

macb_phy_init - PHY is up for macb1

phy_connect - macb1, calling phy_connect_dev with NatSemi DP83630

phy_connect_dev - macb1:1 is connected to macb1.  Reconnecting to macb1

phy_connect_dev - macb1 connected to NatSemi DP83630

macb_phy_init - CONFIG_PHYLIB - pass phy_connect, link=1

macb_phy_reset - macb1: Starting autonegotiation...

macb1: Autonegotiation complete

macb1: link up, 100Mbps full-duplex (lpa: 0xcde1)

--- NetState set to 0

--- NetLoop Init

ping_start - Using macb1 device

--- NetLoop timeout handler set (2ff8a57c)

sending ARP for 192.168.0.1

ARP broadcast 1

macb_send - macb1: TX timeout

--- NetLoop timeout

--- NetState set to 3

--- NetLoop UDP handler set (00000000)

--- NetLoop ARP handler set (00000000)

--- NetLoop timeout handler cancelled

--- NetLoop Fail!

ping failed; host 192.168.0.1 is not alive

 

 

we configure physical address of ETH0 to be 0x01, and ETH1 to be 0x03.

 

When address is 1, 3:

U-Boot> mii info

PHY ID register 2 read failed

MII_PHYSID2 @ 0x1 = 0xffff

PHY ID register 2 read failed

 

U-Boot> mii device macb1

U-Boot> mii info

PHY ID register 2 read failed

MII_PHYSID2 @ 0x3 = 0xffff

 

It would show garbage for both phy:  (regardless of ‘reset’ in

U-Boot> mii dump 3

0.     (ffff)                 -- PHY control register --

  (8000:8000) 0.15    =     1    reset

  (4000:4000) 0.14    =     1    loopback

  (2040:2040) 0. 6,13 =   b11    speed selection = 10 Mbps

  (1000:1000) 0.12    =     1    A/N enable

  (0800:0800) 0.11    =     1    power-down

  (0400:0400) 0.10    =     1    isolate

  (0200:0200) 0. 9    =     1    restart A/N

  (0100:0100) 0. 8    =     1    duplex = full

  (0080:0080) 0. 7    =     1    collision test enable

  (003f:003f) 0. 5- 0 =    63    (reserved)

 

When address is 1, 1

Mii info for macb0 is the same with above, but:

U-Boot> mii device macb1

PHY ID register 2 read failed

MII_PHYSID2 @ 0x1 = 0x5ce1

PHY_PHYIDR[1,2] @ 0x1 = 0x20005ce1

PHY 0x01: OUI = 0x80017, Model = 0x0E, Rev = 0x01, 100baseT, FDX

 

U-Boot> mdio list

macb0:

macb1:

1 - NatSemi DP83630 <--> macb1   << only macb1

 

For ETH0, I never be able to access it and not scanable from u-boot.  How we can tell that this chip is still alive – even 3 LEDs are blinking?

For ETH1, it appeared that phy address is always 0x01 other than given 0x03.  We have added Pin 43 on Eth1 (only) with a pull up using a 2.2 K ohm resister. This will make the Eth1 as address 3.

What additional information that you need such that we can diagnose above issues?

Thanks,


Kevin 

  • Kevin,

    I think it would help to simplify the debug. Could we start by focusing on register access on both PHYs with no cables connected? In this condition, is it possible to read both PHYs?

    Patrick
  • Hello Patrick,

    I disconnected both cables from hub. internal code assigend phy_addr to be 1, 1 since by assigning 1, 3 then i can't see content of the 2nd PHY, only readable if it is also 1. we have pull up resistor added to PIN43 for address 3 with the 2nd PHY but it did not help.

    result is the same: we can't access phy for the 1st chip (ETH0). we can access phy for the 2nd chip (ETH1) if address is 1.
    - when powered up, i see only one LED light on for each chip.

    - please refer to below log, we can see the 1st PHY only. MII/MDIO dump showed the 2nd PHY only.

    - below are strap options that we added on:
    - PIN 7 PWRDOWN has 2.2 pull up resistor
    - PIN 29 RESET_N has 2.2K pull up
    - PIN 30 MDIO has 1.5K pull up
    - PIN 31 MDCLK has serial resistor
    - PIN 6 has pulled to ground with 2.2K ohm resistor. Both ETH0 and ETH1 run with RMII slave mode.
    - PIN 43 on ETH1 has 2.2K resistor for address 3. ETH0 has no resistor for address 1
    - PIN 1 has pull up 1.5K for oscillator.
    - PIN 28 auto nego with pull down.
    - PIN 21 clock ouput with pull up
    - PIN 39 pull up for RMII mode other than MII mode

    My question are the same:
    - How can we tell ETH0 chip is alive?
    - With or without of RESET_N enabled from u-boot, i always see phy_addr of ETH1 to be 1 other than expected 3.

    Thanks,

    Kevin

    =============================================================

    log:

    U-Boot 2014.07 (Jan 21 2015 - 18:44:19)
    ...
    DEBUG: nand_register adding mtd->name=nand0
    2048 MiB
    ...
    Err: serial
    Net: DEBUG: entering eth_initialize
    DEBUG: eth_initialize, calling miiphy_init
    DEBUG: eth_initialize, calling phy_init
    DEBUG: phy_init, initializing phy_natsemi_init
    DEBUG: phy_register, drv->name=NatSemi DP83630
    DEBUG: phy_register, drv->name=NatSemi DP83865
    DEBUG: board_eth_init - setting phy addr
    DEBUG: entering macb_eth_initialize with id=0, regs=f802c000, phy_addr=0x1
    DEBUG: eth_register - eth_devices not exist, assigned with eth_current->name=macb0
    DEBUG: eth_current_changed: eth_current->name=macb0, eth_current->index=0
    DEBUG: macb_eth_initialize, calling miiphy_register for macb0
    miiphy_register: added 'macb0', read=0x2ff6d9c0, write=0x2ff6da10
    DEBUG: miiphy_get_dev_by_name, dev->name=macb0
    VIC ***: leaving macb_eth_initialize for macb0 with enetaddr=00:00:00:00:00:00, macb->phy_addr=1, netdev->index=0
    DEBUG: entering macb_eth_initialize with id=1, regs=f8030000, phy_addr=0x1
    DEBUG: eth_register - eth_devices exist, eth_current->name=macb0
    DEBUG: macb_eth_initialize, calling miiphy_register for macb1
    DEBUG: miiphy_get_dev_by_name, dev->name=macb0
    miiphy_register: added 'macb1', read=0x2ff6d9c0, write=0x2ff6da10
    DEBUG: miiphy_get_dev_by_name, dev->name=macb0
    DEBUG: miiphy_get_dev_by_name, dev->name=macb1
    VIC ***: leaving macb_eth_initialize for macb1 with enetaddr=00:00:00:00:00:00, macb->phy_addr=1, netdev->index=1
    macb0, macb1DEBUG: eth_current_changed: eth_current->name=macb0, eth_current->index=0

    DEBUG: leaving eth_initialize with num_devices=2
    Hit any key to stop autoboot: 0
    U-Boot>
    U-Boot>
    U-Boot>
    U-Boot> ping 192.168.0.1
    --- NetLoop Entry
    --- NetLoop UDP handler set (00000000)
    --- NetLoop ARP handler set (00000000)
    --- NetLoop timeout handler cancelled
    DEBUG: eth_set_current - eth_current=2fee0350
    Trying macb0
    DEBUG: macb_init - macb0 is entering
    DEBUG: macb_init - writting mac enetaddr=08:00:17:00:00:f0 for macb0 / macb0
    macb_phy_find - macb0: PHY not found
    DEBUG: macb_init - macb_phy_init failed
    FAIL
    DEBUG: eth_current_changed: eth_current->name=macb1, eth_current->index=1
    Trying macb1
    DEBUG: macb_init - macb1 is entering
    DEBUG: macb_init - writting mac enetaddr=08:00:17:00:00:f1 for macb1 / macb1
    macb_phy_find - macb1: PHY present at 1
    DEBUG: macb_phy_init - PHY is up for macb1
    DEBUG: get_phy_id - phy_reg (MII_PHYSID1) = 8192
    DEBUG: get_phy_id - phy_reg (MII_PHYSID2) = 23777
    DEBUG: get_phy_driver, returning driver: NatSemi DP83630
    DEBUG: phy_probe, entering with name=NatSemi DP83630
    DEBUG: leaving phy_device_create
    DEBUG: phy_connect - macb1, calling phy_connect_dev with NatSemi DP83630
    DEBUG: phy_reset entering
    DEBUG: phy_reset leaving
    DEBUG: phy_connect_dev - macb1 connected to NatSemi DP83630
    DEBUG: __board_phy_config - calling drv-config
    DEBUG: leaving dp83630_config for NatSemi DP83630
    DEBUG: macb_phy_init - CONFIG_PHYLIB - pass phy_connect, link=1
    VIC macb_phy_reset - macb1: Starting autonegotiation...
    macb1: Autonegotiation timed out (status=0x78c9)
    macb1: link down (status: 0x78c9)
    DEBUG: macb_init - macb_phy_init failed
    FAIL
    DEBUG: eth_current_changed: eth_current->name=macb0, eth_current->index=0
    ping failed; host 192.168.0.1 is not alive


    U-Boot> mii info
    PHY ID register 2 read failed
    ... (same)
    PHY ID register 2 read failed
    MII_PHYSID2 @ 0x1f = 0xffff
    U-Boot> mii devices
    MII devices: 'macb0' 'macb1'
    Current device: 'macb0'
    U-Boot> mii info 1
    PHY ID register 2 read failed
    U-Boot> mii mdio list
    macb0:
    macb1:
    1 - NatSemi DP83630 <--> macb1
    U-Boot> mii device macb1
    DEBUG: miiphy_get_dev_by_name, dev->name=macb0
    DEBUG: miiphy_get_dev_by_name, dev->name=macb1
    U-Boot> mii info
    PHY ID register 2 read failed
    MII_PHYSID2 @ 0x1 = 0x5ce1
    PHY_PHYIDR[1,2] @ 0x1 = 0x20005ce1
    PHY 0x01: OUI = 0x80017, Model = 0x0E, Rev = 0x01, 10baseT, HDX
    PHY ID register 2 read failed
    ... (same)
    PHY ID register 2 read failed
    U-Boot> mii dump 1 0-5
    0. (1000) -- PHY control register --
    (8000:0000) 0.15 = 0 reset
    (4000:0000) 0.14 = 0 loopback
    (2040:0000) 0. 6,13 = b00 speed selection = 10 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:0000) 0. 8 = 0 duplex = half
    (0080:0000) 0. 7 = 0 collision test enable
    (003f:0000) 0. 5- 0 = 0 (reserved)

    1. (78c9) -- 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:0080) 1. 7 = 1 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0000) 1. 5 = 0 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0000) 1. 2 = 0 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities

    2. (2000) -- PHY ID 1 register --
    (ffff:2000) 2.15- 0 = 8192 OUI portion

    3. (5ce1) -- PHY ID 2 register --
    (fc00:5c00) 3.15-10 = 23 OUI portion
    (03f0:00e0) 3. 9- 4 = 14 manufacturer part number
    (000f:0001) 3. 3- 0 = 1 manufacturer rev. number

    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

    5. (0000) -- Autonegotiation partner abilities register --
    (8000:0000) 5.15 = 0 next page able
    (4000:0000) 5.14 = 0 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:0000) 5. 8 = 0 100BASE-X full duplex able
    (0080:0000) 5. 7 = 0 100BASE-TX able
    (0040:0000) 5. 6 = 0 10BASE-T full duplex able
    (0020:0000) 5. 5 = 0 10BASE-T able
    (001f:0000) 5. 4- 0 = 0 selector = ???


    U-Boot>