[U-Boot] Get Phy device ID for non standard phy
Priyanka Jain
priyanka.jain at nxp.com
Fri Aug 3 06:47:33 UTC 2018
Hello Pankaj,
The requirement of LX2160ARD, LX2160AQDS has been taken care by the patch http://patchwork.ozlabs.org/patch/867403/ in upstream u-boot.
Regards
Priyanka
From: Pankaj Bansal
Sent: Friday, August 3, 2018 12:09 PM
To: joe.hershberger at ni.com; u-boot <u-boot at lists.denx.de>
Cc: Varun Sethi <V.Sethi at nxp.com>; Priyanka Jain <priyanka.jain at nxp.com>
Subject: Get Phy device ID for non standard phy
Hi All,
I have a query about phy devices that implement phy identification registers at non-standard locations.
The IEEE 802.3 specifies these registers as phy ID registers:
22.2.4.3.1 PHY Identifier (Registers 2 and 3)
Registers 2 and 3 provide a 32-bit value, which shall constitute a unique identifier for a particular type of PHY.
A PHY may return a value of zero in each of the 32 bits of the PHY Identifier.
Bit 2.15 shall be the MSB of the PHY Identifier, and bit 3.0 shall be the LSB of the PHY Identifier.
But there are phys that implement this 32 bit ID in nonstandard locations.
In u-boot there is a weak function get_phy_id (https://elixir.bootlin.com/u-boot/v2018.09-rc1/source/drivers/net/phy/phy.c#L673)
This function can be overridden to get the phy id for nonstandard phys.
Now If this function is overridden with our own function, then it's the job of our own function to get the phy id from all phy devices (standard or nonstandard)
Till date, this function has been overridden by two files :
https://elixir.bootlin.com/u-boot/v2018.09-rc1/source/drivers/net/phy/cortina.c#L353
https://elixir.bootlin.com/u-boot/v2018.09-rc1/source/drivers/net/phy/mv88e61xx.c#L1055
Now the problem arises, when we have two or more phys in one system that implement the phy ID at two different non-standard location.
Like we have in our upcoming boards LX2160AQDS/LX2160ARDB : inphi phy and cortina phy.
In which file we should implement the get_phy_id function?
I suggest that we should implement get_phy_id function in board file,.
As the board manufacturer knows the phys in his system and the various non-standard locations these phy implement the 32 bit phy identifier.
Any suggestion ?
Regards,
Pankaj Bansal
More information about the U-Boot
mailing list