Re: [PATCH net-next v3 2/9] dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC
From: Louis-Alexis Eyraud
Date: Wed Oct 21 2026 - 05:49:30 EST
Hi Andrew,
On Fri, 2026-10-16 at 17:40 +0200, Andrew Lunn wrote:
> > Finally, update "mediatek,rx-delay-ps" and "mediatek,tx-delay-ps"
> > property
> > description to add MT8189 RX/TX delay stage divider values, as they
> > differ from existing supported SoC.
>
> These should be mark deprecated and the standard rx-internal-delay-ps
> and tx-internal-delay-ps used in there place for new devices.
>
I agree, it makes sense to use them to describe the RGMII internal
delay configurations rather than the two existing vendor properties
(mediatek,rx-delay-ps and mediatek,tx-delay-ps), and deprecate them, by
adding a deprecated flag and the comments you've suggested. It would
also need an additional patch for the driver to handle them (while
keeping backward compatibility).
But what is bothering me is these two vendor properties description
says they can be used in MII and RMII phy mode cases. The driver uses
them indeed also to fine tune the RX/TX_CLK (in MII) or the REF_CLK (in
RMII) configuration.
rx/tx-internal-delay-ps properties are limited to RGMII only ([1]).
So they can not substitute them as it and with their description it
would wrong to use them for MII/RMII.
At the moment, in the upstream devicetrees, there is no "mediatek,rx-
delay-ps" use and the "mediatek,tx-delay-ps" use are very few and only
for RGMII phy modes (either rgmii-rxid or rmgii-id), so no MII/RMII
real use cases.
So, how to proceed then to make these bindings right?
Use rx/tx-internal-delay-ps properties for RGMII and mediatek,rx/tx-
delay-ps for MII/RMII or do you see another solution ?
Best regards,
Louis-Alexis
[1]:
https://elixir.bootlin.com/linux/v7.3/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L251
> > @@ -86,8 +85,10 @@ properties:
> > or will round down. Range 0~31*170.
> > For MT2712 RMII/MII interface, Allowed value need to be a
> > multiple of 550,
> > or will round down. Range 0~31*550.
> > - For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value
> > need to be a multiple of 290,
> > - or will round down. Range 0~31*290.
> > + For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value
> > need to be a
> > + multiple of 290, or will round down. Range 0~31*290.
> > + For MT8189 RGMII/RMII/MII interface, Allowed value need to
> > + be a multiple of 180, or will round down. Range 0~31*180.
>
> Please make this:
>
> For MT8189 RGMII/RMII/MII interface, this property is not used, the
> standard tx-internal-delay-ps should be used instead.
>
> > @@ -96,8 +97,10 @@ properties:
> > or will round down. Range 0~31*170.
> > For MT2712 RMII/MII interface, Allowed value need to be a
> > multiple of 550,
> > or will round down. Range 0~31*550.
> > - For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value
> > need to be a multiple
> > - of 290, or will round down. Range 0~31*290.
> > + For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value
> > need to be a
> > + multiple of 290, or will round down. Range 0~31*290.
> > + For MT8189 RGMII/RMII/MII interface, Allowed value need to
> > + be a multiple of 180, or will round down. Range 0~31*180.
>
> Same here.
>
> Andrew