From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
"Rob Herring" <robh+dt@kernel.org>,
"Shawn Guo" <shawnguo@kernel.org>, "Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"Prasanna Vengateshan" <prasanna.vengateshan@microchip.com>,
"Ansuel Smith" <ansuelsmth@gmail.com>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>
Subject: Re: [PATCH net-next 6/6] net: dsa: sja1105: parse {rx,tx}-internal-delay-ps properties for RGMII delays
Date: Fri, 15 Oct 2021 10:15:41 -0700 [thread overview]
Message-ID: <cfe7abdb-5f6e-a0f5-ddd8-6500b794de62@gmail.com> (raw)
In-Reply-To: <20211013222313.3767605-7-vladimir.oltean@nxp.com>
On 10/13/21 3:23 PM, Vladimir Oltean wrote:
> This change does not fix any functional issue or address any real life
> use case that wasn't possible before. It is just a small step in the
> process of standardizing the way in which Ethernet MAC drivers may apply
> RGMII delays (traditionally these have been applied by PHYs, with no
> clear definition of what to do in the case of a fixed-link).
>
> The sja1105 driver used to apply MAC-level RGMII delays on the RX data
> lines when in fixed-link mode and using a phy-mode of "rgmii-rxid" or
> "rgmii-id" and on the TX data lines when using "rgmii-txid" or "rgmii-id".
> But the standard definitions don't say anything about behaving
> differently when the port is in fixed-link vs when it isn't, and the new
> device tree bindings are about having a way of applying the delays in a
> way that is independent of the phy-mode and of the fixed-link property.
>
> When the {rx,tx}-internal-delay-ps properties are present, use them,
> otherwise fall back to the old behavior and warn.
>
> One other thing to note is that the SJA1105 hardware applies a delay
> value in degrees rather than in picoseconds (the delay in ps changes
> depending on the frequency of the RGMII clock - 125 MHz at 1G, 25 MHz at
> 100M, 2.5MHz at 10M). I assume that is fine, we calculate the phase
> shift of the internal delay lines assuming that the device tree meant
> gigabit, and we let the hardware scale those according to the link speed.
>
> Link: https://patchwork.kernel.org/project/netdevbpf/patch/20210723173108.459770-6-prasanna.vengateshan@microchip.com/
> Link: https://patchwork.ozlabs.org/project/netdev/patch/20200616074955.GA9092@laureti-dev/#2461123
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
FWIW, this is definitively a step in the right direction, and this is a
good way to deal with the phy-mode RGMII mess that has plagued us, thanks!
--
Florian
prev parent reply other threads:[~2021-10-15 17:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 22:23 [PATCH net-next 0/6] New RGMII delay DT bindings for the SJA1105 DSA driver Vladimir Oltean
2021-10-13 22:23 ` [PATCH net-next 1/6] ARM: dts: imx6qp-prtwd3: update RGMII delays for sja1105 switch Vladimir Oltean
2021-10-15 17:16 ` Florian Fainelli
2021-10-13 22:23 ` [PATCH net-next 2/6] ARM: dts: ls1021a-tsn: " Vladimir Oltean
2021-10-15 17:16 ` Florian Fainelli
2021-10-13 22:23 ` [PATCH net-next 3/6] dt-bindings: net: dsa: sja1105: fix example so all ports have a phy-handle of fixed-link Vladimir Oltean
2021-10-15 16:51 ` Florian Fainelli
2021-10-13 22:23 ` [PATCH net-next 4/6] dt-bindings: net: dsa: inherit the ethernet-controller DT schema Vladimir Oltean
2021-10-15 16:51 ` Florian Fainelli
2021-10-13 22:23 ` [PATCH net-next 5/6] dt-bindings: net: dsa: sja1105: add {rx,tx}-internal-delay-ps Vladimir Oltean
2021-10-14 14:31 ` Rob Herring
2021-10-15 19:55 ` Jakub Kicinski
2021-10-15 22:48 ` Vladimir Oltean
2021-10-18 13:40 ` Rob Herring
2021-10-15 16:53 ` Florian Fainelli
2021-10-13 22:23 ` [PATCH net-next 6/6] net: dsa: sja1105: parse {rx,tx}-internal-delay-ps properties for RGMII delays Vladimir Oltean
2021-10-14 0:24 ` Jakub Kicinski
2021-10-14 12:00 ` Vladimir Oltean
2021-10-15 17:15 ` Florian Fainelli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cfe7abdb-5f6e-a0f5-ddd8-6500b794de62@gmail.com \
--to=f.fainelli@gmail.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=prasanna.vengateshan@microchip.com \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).