
Hi Thomas,
On 02/09/2013 16:59, thomas.langer@lantiq.com wrote:
Hello Stefano,
Stefano Babic wrote on 2013-09-02:
Some phys have additional registers that are not covered by standard. Access to this registers can be done via specific sequence according to the phy datasheet. The driver for Micrel phy contains some additional function, that the board maintainer can call to tune the phy. However, these registers cannot be accessed with "mmdio" command.
Add calback to the phy API to allow to call the function for reading / writing extended registers with the mmdio command.
The basic mechanism used for the access is not specific to Micrel, it is defined in the IEEE standard [1], "Annex 22D: Clause 22 access to Clause 45 MMD registers"
Interesting - my changes were done according to the Micrel's KSZ9031 datasheet.
A presentation for this can be found when you ask google for it [2]
[1]: IEEE Std 802.3-2008 (or 2012): http://standards.ieee.org/about/get/802/802.3.html [2]: https://www.google.de/search?q=%22Clause+22+Access+to+Clause+45+Registers%22
So maybe it will be useful to have the access functions in the common phy lib?
Maybe it is enough to move the extread / extwrite functions inside phylib. However, if the behavior of the KSZ9031 matches the documentation you have posted, the KSZ9021 seems to slightly deviate. Or is the 9021 supporting another "clause" ?
I assume that most current PHYs have these method implemented, as also some extended standard registers needs this. For example, the EEE (Energy Efficient Ethernet) registers are located in this extended register range.
This is also a nice to have feature.
Probably this can be extended in some follow-up patches,
Let's wait for Joe's opinion.
I just wanted to share my thoughts ;-)
Thanks, I was not aware of the standard. Learned something new...
Best regards, Stefano