【IMX8QXP,FEC driver】How to configure a FEC driver for a eth PHY ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

【IMX8QXP,FEC driver】How to configure a FEC driver for a eth PHY ?

3,491 Views
jianwei_lan
Contributor III

Dear friend

i am debugging FEC driver at i.MX8QXP, Linux 4.14.98, and the ETH PHY driver is Marvell 88Q2112. I catch follow error log:

. . . .

[ 1196.215645] fec 5b040000.ethernet eth0: Unable to connect to phy

[ 1196.325363] fec 5b040000.ethernet eth0: Unable to connect to phy

. . . .

 

Question

1)i see this log come from "drivers/net/ethernet/freescale/fec_main.c",can your help to confirm?How should i continue to debug?

 

----

BR

0 Kudos
8 Replies

3,479 Views
joanxie
NXP TechSupport
NXP TechSupport

refer to the release note:

i.MX 8 supports Atheros AR8031 PHY with 10/100/1000 bps mode, NXP automotive
PHY TJA1100 PHY, and AVB features

how did you bebug the PHY? and did you use nxp board?

0 Kudos

3,477 Views
jianwei_lan
Contributor III

Dear friend

I connect Marvell 88Q2112 to my custom i.MX8QXP board.

I find that fec cannot detect 88Q2112's phy_id.

 

Question:

1)Does NXP‘s fec support 88Q2112. How should i can do if it not support 88Q2112?

 

---

BR, 

0 Kudos

3,474 Views
jianwei_lan
Contributor III

append the log as follow:

root@imx8qxpc0mek:~# dmesg |grep mdio_bus
[ 2.297568] mdio_bus 5b040000.ethernet-1: /ethernet@5b040000/mdio/ethernet-phy@0 has invalid PHY address
[ 2.307069] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 0
[ 2.320885] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 1
[ 2.334627] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 2
[ 2.348347] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 3
[ 2.362091] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 4
[ 2.375815] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 5
[ 2.389566] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 6
[ 2.403310] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 7
[ 2.417050] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 8
[ 2.430797] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 9
[ 2.444552] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 10
[ 2.458387] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 11
[ 2.472197] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 12
[ 2.486041] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 13
[ 2.499856] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 14
[ 2.513697] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 15
[ 2.527520] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 16
[ 2.541454] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 17
[ 2.555367] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 18
[ 2.569285] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 19
[ 2.583207] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 20
[ 2.597137] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 21
[ 2.611051] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 22
[ 2.624992] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 23
[ 2.638902] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 24
[ 2.652826] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 25
[ 2.666730] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 26
[ 2.680640] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 27
[ 2.694561] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 28
[ 2.708473] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 29
[ 2.722386] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 30
[ 2.736292] mdio_bus 5b040000.ethernet-1: scan phy ethernet-phy at address 31

0 Kudos

3,464 Views
joanxie
NXP TechSupport
NXP TechSupport

yes can support it, but you need change the dts file correctly according to your HW connection, I don't know how you change the source code, pls double confirm them, to check if you dts file set the phy correctly

 

0 Kudos

3,459 Views
jianwei_lan
Contributor III

Dear friend

 

My hardware connection is same as i.MX8QXP MEK. So I do not need to change dts file?

 

 

---

BR

0 Kudos

3,422 Views
joanxie
NXP TechSupport
NXP TechSupport

the current bsp doesn't support 88Q2112 as default, current bsp supports Atheros AR8031 PHY , if you need to use the new one, you need to change it, you can refer to the dts file about this, and change as your demands, we don't have sample code for 88Q2112

"https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8x-mek.dt..."

 

0 Kudos

3,402 Views
jianwei_lan
Contributor III

Dear friend

 

Before execute 88q2112 driver code, it should make 'mdiobus_write' and 'mdiobus_read' function available. But now i can not access 88q2112 by  'mdiobus_write' or 'mdiobus_read' function, I think the NXP's fec controller may encounter some problem or need some special configuration, can you help to check ?

 

-----

BR

0 Kudos

3,337 Views
joanxie
NXP TechSupport
NXP TechSupport

try to use like use kind of the fec_enet_mdio_read()  or fec_enet_mdio_write()

 

0 Kudos