U-Boot driver needed to make Ethernet work in Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

U-Boot driver needed to make Ethernet work in Linux

7,180 次查看
JohnKlug
Senior Contributor I

We are using Micrel Phy:

KSZ8091RNBCA

For some reason Linux will not work from a cold boot if U-Boot is not configured for the Micrel Phy. Also the debug port becomes very sluggish and has lots of errors.


fec 2188000.ethernet eth0: Unable to connect to phy
RTNETLINK answers: No such device

bash# mii-diag eth0
SIOCGMIIPHY on eth0 failed: Operation not supported

 

We are using i.MX6ULL which has a single Ethernet port.

Linux seems to recognize our phy when U-Boot is configured and everything is normal.


 

Micrel KSZ8041 2188000.ethernet-1:01: attached PHY driver (mii_bus:phy_addr=2188000.ethernet-1:01, irq=POLL)
fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

 



We would like to eliminate the U-Boot Ethernet driver, since we never use it, and we think it is better for security and boot simplicity if we do not have it.  What could be causing Linux not to initialize the Ethernet properly?

For instance mii-diag is unable to contact the Phy on a cold boot without the U-Boot driver:

标签 (2)
0 项奖励
回复
24 回复数

697 次查看
JohnKlug
Senior Contributor I
I was told that the boards that do not work in U-Boot use a different phy.

The non-working phy (without U-Boot config) is KSZ8041NL. The working phy is KSZ8091RNB.
0 项奖励
回复

878 次查看
JohnKlug
Senior Contributor I
I took our imx6 board which has two TI phys, and when U-Boot is not configured for Ethernet, it has no trouble dumping registers in Linux from both ethernet ports:

bash# devmem2 0x2188044 w
/dev/mem opened.
Memory mapped at address 0x76f13000.
Read at address 0x02188044 (0x76f13044): 0x00000000
bash# devmem2 0x20b4044 w
/dev/mem opened.
Memory mapped at address 0x76f92000.
Read at address 0x020B4044 (0x76f92044): 0x0000001A


0 项奖励
回复

1,047 次查看
joanxie
NXP TechSupport
NXP TechSupport

For some reason Linux will not work from a cold boot if U-Boot is not configured for the Micrel Phy.

>do you mean you would get cold boot issue when you disable ethernet in the uboot but enable in the kernel, right? but everything is ok when you enable it in the uboot and kernel, right? if yes, how did you disable it in the uboot?

0 项奖励
回复

954 次查看
JohnKlug
Senior Contributor I
One of our hardware engineers looked at this, and if Ethernet is not configured in U-Boot there is no clock until we load in Linux, and the clock comes on for a short while and quits. I will start looking at registers next for the CPU.
0 项奖励
回复