I.MX8MMINI -- How to read MDIO line in linux driver

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

I.MX8MMINI -- How to read MDIO line in linux driver

13,359 Views
santhosh2
Contributor IV

Hi,

I am using a DP83848 TI chipset for ethernet and not able to detect the chip, Can any one help me how to read the registers using MDIO line in I.MX8MMINI

Regards

Santhosh

0 Kudos
Reply
5 Replies

13,096 Views
igorpadykov
NXP Employee
NXP Employee

Hi Santhosh

one can look on

Accessing ethernet phy driver from linux user space - Stack Overflow 

GitHub - wkz/phytool: Linux MDIO register access 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

13,096 Views
santhosh2
Contributor IV

Thanks for the reply igor

There is MII read uboot commands to read the MDIO lines.
i am able to read for the NXP EVK but  for our board with DP83848 TI Ethernet Phy we are getting "NULL device name!".
please find the below trace for MII read commands for NXP EVK
------------------------------------
u-boot=> mii read 0-1 0-6
addr=00 reg=00 data=1000
addr=00 reg=01 data=796D
addr=00 reg=02 data=004D
addr=00 reg=03 data=D074
addr=00 reg=04 data=11E1
addr=00 reg=05 data=CDE1
addr=00 reg=06 data=000F
addr=01 reg=00 data=FFFF
addr=01 reg=01 data=FFFF
addr=01 reg=02 data=FFFF
addr=01 reg=03 data=FFFF
addr=01 reg=04 data=FFFF
addr=01 reg=05 data=FFFF
addr=01 reg=06 data=FFFF
---------------------------------------
u-boot=> mdio read 0 00
0 is not a known ethernet
Reading from bus FEC0
PHY at address 0:
0 - 0x1000
--------------------------------------
u-boot=> mii info
PHY 0x00: OUI = 0x1374, Model = 0x07, Rev = 0x04, 1000baseX, FDX
---------------------------------------
please find the below trace for the Same commands for DP83848 TI Ethernet Phy
----------------------------------------------------------
u-boot=> mii read 0-1 0-6
NULL device name!
No such device: <NULL>
Error reading from the PHY addr=00 reg=00
NULL device name!
No such device: <NULL>
Error reading from the PHY addr=00 reg=01
NULL device name!
No such device: <NULL>
-------------------------------------------------------
u-boot=> mdio read 0 00
0 is not a known ethernet
No such device:
Reading from bus
PHY at address 0:
------------------------------------------------------------
u-boot=> mii info
NULL device name!
No such device: <NULL>
NULL device name!
----------------------------------------------------------l
Can we use mii and mdio read / write commands to access the Ethernet Phy register independently irrespectively to MII/RMII mode hardware configuration.?
Please advice how to proceed ahead
Schematic
Ethernet.png
0 Kudos
Reply

13,096 Views
igorpadykov
NXP Employee
NXP Employee

Hi Santhosh

one can look at dp83848 phy uboot driver and debug on function dp83848_startup()

natsemi.c\phy\net\drivers - uboot-imx - i.MX U-Boot 

Best regards
igor

0 Kudos
Reply

13,096 Views
santhosh2
Contributor IV

Hi Igor,

Can you guide me how to enable dp83848 natsemi.c driver in uboot configuration

Regards

Santhosh Kumar

0 Kudos
Reply

4,511 Views
JasonShu
Contributor II

Hi Santhosh

How did you enable dp83848 natsemi.c driver in uboot configuration?

Can you share it?

Regards

Jason

0 Kudos
Reply