From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Mon, 02 Sep 2013 17:47:18 +0200 Subject: [U-Boot] [PATCH v1 0/5] In-Reply-To: <593AEF6C47F46446852B067021A273D6D983CF35@MUCSE039.lantiq.com> References: <1378129352-5668-1-git-send-email-sbabic@denx.de> <593AEF6C47F46446852B067021A273D6D983CF35@MUCSE039.lantiq.com> Message-ID: <5224B306.2070007@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Thomas, On 02/09/2013 16:59, thomas.langer at 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 -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================