Hi Vladimir, > -----Original Message----- > From: Vladimir Oltean <vladimir.oltean@xxxxxxx> > Sent: Wednesday, April 26, 2023 7:49 PM > To: Katakam, Harini <harini.katakam@xxxxxxx> > Cc: robh+dt@xxxxxxxxxx; andrew@xxxxxxx; hkallweit1@xxxxxxxxx; > linux@xxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx; kuba@xxxxxxxxxx; > edumazet@xxxxxxxxxx; pabeni@xxxxxxxxxx; wsa+renesas@sang- > engineering.com; krzysztof.kozlowski+dt@xxxxxxxxxx; > simon.horman@xxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; > devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; > harinikatakamlinux@xxxxxxxxx; Simek, Michal <michal.simek@xxxxxxx>; > Pandey, Radhey Shyam <radhey.shyam.pandey@xxxxxxx> > Subject: Re: [PATCH net-next v2 3/3] phy: mscc: Add support for VSC8531_02 > with RGMII tuning > > On Wed, Apr 26, 2023 at 12:21:47PM +0000, Katakam, Harini wrote: > > Thanks for the review. > > The intention is to have the following precedence (I'll rephrase the > > commit if required) > > -> If phy-mode is rgmii, current behavior persists for all devices If > > -> phy-mode is rgmii-id/rgmii-rxid/rgmii-txid, current behavior > > -> persists for all devices > > (i.e. delay of RGMII_CLK_DELAY_2_0_NS) > > -> If phy-mode is rgmii-id/rgmii-rxid/rgmii-txid AND > > -> rx-internal-delay-ps/tx-internal-delay-ps > > is defined, then the value from DT is considered instead of 2ns. (NOT > > irrespective of phy-mode) > > > > I'm checking the phy drivers that use phy_get_internal_delay and the > > description phy-mode in ethernet-controller.yaml and > > rx/tx-internal-delay-ps in ethernet-phy.yaml. It does look like the above is > allowed. Please do let me know otherwise. > > I understood what your intention was. What I meant was: > > phy-mode rgmii rgmii-rxid/rgmii-id > -------------------------------------------------------------------------------------------- > rx-internal-delay-ps absent 0.2 ns 2 ns > rx-internal-delay-ps present follow rx-internal-delay-ps follow rx-internal- > delay-ps > > I agree with Andrew that probably there isn't consistency among PHY drivers > for this interpretation - see dp83822 vs intel-xway for example. Thanks, yes I noticed the difference here and also in older PHY drivers that used custom properties (see dp83867 which is what I originally aligned it to). But the table you mentioned above makes sense; I'll re-spin accordingly. > My interpretation was based on the wording from the dt-bindings document, > which seems to suggest that rx-internal-delay-ps takes precedence. OK I understand. Regards, Harini