AnsweredAssumed Answered

U-Boot Port to Yocto - Phy not found

Question asked by Paul DeMetrotion on Sep 17, 2015
Latest reply on Nov 9, 2017 by 家禄 刘

I am working on a custom u-boot project for Yocto. I pretty much have everything working but cannot get the ethernet to connect. The issue appears to be with the Phy device but once at the command prompt, I can see the KSZ9031 Phy device. I have added a board_phy_config() function in my board file and it is being executed. I am using the same config code that was previously used and verified under LTIB.

 

Following is the u-boot output with some printf debug lines I added to the phy driver. As can be seen, the Phy is addressable but still isn't seen during the boot.

 

Any ideas what is wrong?

 

U-Boot 2014.04 (Sep 17 2015 - 11:37:59)

 

 

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz

CPU:   Temperature 37 C, calibration data: 0x5534cc69

Reset cause: POR

Board: SBC35-C398Q

Boot Device: SD

I2C:   ready

DRAM:  2 GiB

MMC:   FSL_SDHC: 0, FSL_SDHC: 1

*** Warning - bad CRC, using default environment

 

 

In:    serial

Out:   serial

Err:   serial

mmc1 is current device

Net:   Phy not found

phy_read++  addr = 7  devad = ffffffff  regnum = 0

phy_write++  addr = 7  devad = ffffffff  regnum = 0 val = ffff

phy_read++  addr = 7  devad = ffffffff  regnum = 0

phy_read++  addr = 7  devad = ffffffff  regnum = 9

phy_write++  addr = 7  devad = ffffffff  regnum = 9 val = 1b00

phy_write++  addr = 7  devad = ffffffff  regnum = d val = 2

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 4

phy_write++  addr = 7  devad = ffffffff  regnum = d val = c002

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 0

phy_write++  addr = 7  devad = ffffffff  regnum = d val = 2

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 5

phy_write++  addr = 7  devad = ffffffff  regnum = d val = c002

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 0

phy_write++  addr = 7  devad = ffffffff  regnum = d val = 2

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 6

phy_write++  addr = 7  devad = ffffffff  regnum = d val = c002

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 0

phy_write++  addr = 7  devad = ffffffff  regnum = d val = 2

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 8

phy_write++  addr = 7  devad = ffffffff  regnum = d val = c002

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 3ff

phy_write++  addr = 7  devad = ffffffff  regnum = d val = 2

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 10

phy_write++  addr = 7  devad = ffffffff  regnum = d val = c002

phy_write++  addr = 7  devad = ffffffff  regnum = e val = 4000

phy_read++  addr = 7  devad = ffffffff  regnum = 0

phy_write++  addr = 7  devad = ffffffff  regnum = 0 val = 1340

ksz9031_config()++

phy_read++  addr = 7  devad = ffffffff  regnum = 1

phy_read++  addr = 7  devad = ffffffff  regnum = f

phy_read++  addr = 7  devad = ffffffff  regnum = 4

phy_read++  addr = 7  devad = ffffffff  regnum = 9

phy_read++  addr = 7  devad = ffffffff  regnum = 0

ksz9031_config()--

FEC

Normal Boot

Hit any key to stop autoboot:  0

 

SBC35-C398Q U-Boot > mii info

PHY 0x07: OUI = 0x0885, Model = 0x22, Rev = 0x01, 100baseT, FDX

 

SBC35-C398Q U-Boot > mdio read 7 2

7 is not a known ethernet

Reading from bus FEC

PHY at address 7:

2 - 0x22

 

SBC35-C398Q U-Boot > mdio read 7 3

7 is not a known ethernet

Reading from bus FEC

PHY at address 7:

3 - 0x1621

 

SBC35-C398Q U-Boot >

Outcomes