[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y9kaqG/b4sO4aagM@lunn.ch>
Date: Tue, 31 Jan 2023 14:42:00 +0100
From: Andrew Lunn <andrew@...n.ch>
To: "Frank.Sae" <Frank.Sae@...or-comm.com>
Cc: Peter Geis <pgwipeout@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
yanhong.wang@...rfivetech.com, xiaogang.fan@...or-comm.com,
fei.zhang@...or-comm.com, hua.sun@...or-comm.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH net-next v3 1/5] dt-bindings: net: Add Motorcomm yt8xxx
ethernet phy
> >> +properties:
> >> + rx-internal-delay-ps:
> >> + description: |
> >> + RGMII RX Clock Delay used only when PHY operates in RGMII mode with
> >> + internal delay (phy-mode is 'rgmii-id' or 'rgmii-rxid') in pico-seconds.
> >> + enum: [ 0, 150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500, 1650,
> >> + 1800, 1900, 1950, 2050, 2100, 2200, 2250, 2350, 2500, 2650, 2800,
> >> + 2950, 3100, 3250, 3400, 3550, 3700, 3850, 4000, 4150 ]
> >> + default: 1950
> >
> > Ah! There has been a misunderstand. Yes, this changes does make sense, but >
> >> +
> >> + tx-internal-delay-ps:
> >> + description: |
> >> + RGMII TX Clock Delay used only when PHY operates in RGMII mode with
> >> + internal delay (phy-mode is 'rgmii-id' or 'rgmii-txid') in pico-seconds.
> >> + enum: [ 0, 150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500, 1650, 1800,
> >> + 1950, 2100, 2250 ]
> >> + default: 150
> >
> > ... i was actually trying to say this 150 is odd. Why is this not
> > 1950?
>
> Tx-delay is usually adjusted by the mac (~ 2ns).
> So here is only fine-turn for the tx-delay.
In general, in Linux, this is not true. The PHY inserts both
delays. Yes, you can have the MAC insert the delay, but it then means
the MAC needs to modify phy-mode to indicate it has inserted the
delay, changing rgmii-id to rmgmii-rxid when it calls
phy_connect_*(). And few MAC drivers get this correct. So i would
avoid this. Default to 1950. And if there is a device which needs a
fine tune, it can use 2100, or 2250 in its DTS file.
Andrew
Powered by blists - more mailing lists