From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 10 Feb 2015 19:51:35 +0100 Subject: [U-Boot] [PATCH 2/2] net: phy: Add ability to program the ksz9031 skew values from the uboot env In-Reply-To: <1423517501329.58727@opensource.altera.com> References: <1423493073-9462-1-git-send-email-vbridger@opensource.altera.com> <201502092018.52128.marex@denx.de> <1423517501329.58727@opensource.altera.com> Message-ID: <201502101951.35515.marex@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 On Monday, February 09, 2015 at 10:31:42 PM, Vince Bridgers wrote: > Hi Marek! Hi Vince! > > We already do this kind of a programming in > > board/altera/socfpga/socfpga.c in board_phy_config(), don't we ? > > Yes, good point. This patch series is a first in some upcoming patches to > make this better. The Linux implementation uses devicetree settings to set > the skews, so if we were to follow that same model the code in socfpga.c > would become deprecated in favor of setting the skews through the phy > driver and subsequently removed. That way other users could take advantage > of this through devicetree. Setting the skews in DT would indeed be preferable in my opinion. > The other problem with the current > implementation is the skew values are part specific - we set the actual > register values in the environment when it would be better to use a skewed > time value (in +/- picoseconds). You mean they are specific for particular PHY model ? Or board model ? Or even particular board itself ? > > Also, see [1], once I apply this, the DT support (not DM) for SoCFPGA > > will become mandatory. Won't it make more sense to pull these values > > from the DT instead of poluting the board environment with those please > > ? > > I agree it would make more sense to pull these from devicetree - I'm > planning on adding that in a future patch. I thought it would be a good > idea to pull these values from the environment first, overriding the > devicetree (if present in the environment). This approach is helpful > during bringup & debug since it doesn't require one to change the > devicetree to try something quickly. I'm ok with any approach you think > would work for the community. You can do that with the 'mii' command as well I think, but I might be wrong. > I'm ok with whatever the community decides considering my rationale above. +CC Stefan and Pavel, please comment. Best regards, Marek Vasut