Re: [PATCH net-next v12 2/9] dt-bindings: net: lan9645x: add LAN9645X switch bindings

From: Jens Emil Schulz Ostergaard

Date: Thu Sep 10 2026 - 10:51:22 EST


On Tue, 2026-09-08 at 14:59 +0200, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> > rx/tx-internal-delay-ps is used to model a direct MAC to MAC fixed link,
> > using RGMII, where exactly one of them must supply the delay.
> > Documentation/networking/phy.rst describes plain rgmii as the mode where
> > the MAC or the PCB adds the delay rather than the PHY.
>
> This is not correct. phy-mode 'rgmii' in DT means the PCB adds the
> delay.
>
> If the value is not 'rgmii', then the MAC/PHY pair need to decided on
> which adds the delay, and by convention, it is normally the PHY.
>
> Where it gets interesting is MAC to MAC, which you do see in
> switches. Using rx/tx-internal-delay-ps makes a lot of sense in this
> setting.
>
> The binding itself looks O.K, its just this commit message text which
> is wrong.
>
> Andrew

This is exactly intended to model the MAC to MAC fixed link situation.
So no PHYs between, and one side needs to supply the delays.

I had originally implemented this by using the phy interface mode to program
the MAC delays off of. This is what we had done previously in lan966x say.

But I was instructed that the modern approach is to use rx/tx-internal-delay-ps
along with phy interface mode rgmii. There are a few other examples of
dsa bindings doing this:

Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
Documentation/devicetree/bindings/net/dsa/realtek.yaml

I will remove the paragraph from the commit message if that is wrong. I have
misunderstood that part of phy.rst.

Thanks,
Emil