Re: [PATCH net-next v3 2/2] net: stmmac: dwmac-rk: Add RK3572 support
From: Andrew Lunn
Date: Mon Nov 16 2026 - 10:58:43 EST
On Mon, Nov 16, 2026 at 11:11:42PM +0800, Cunhao Lu wrote:
> Hi,
>
> > [...]
> > > + .regs_valid = true,
> > > + .regs = { 0x29d20000, 0x2a040000, 0 },
> > > +};
> >
> > Just looking at this, it is not obvious that rx_delay and tx_delay are
> > actually not used.
>
> My board currently uses rgmii-id, where both MAC TX and RX delays
> are disabled. I kept the delay handling to support rgmii-rxid,
> rgmii-txid and rgmii, using the default values for the MAC delays
> enabled in those modes. The legacy tx_delay and rx_delay properties
> are now disallowed for RK3572 in the binding.
>
> I currently have only one oscilloscope, with a maximum bandwidth of
> 200 MHz. With this equipment, I cannot accurately determine how the
> TX and RX delay register values translate to picoseconds, so I am
> not planning to add support for tx-internal-delay-ps and
> rx-internal-delay-ps in this series for now.
>
> Would it be acceptable to support only rgmii-id for RGMII in the next
> version, and reject rgmii, rgmii-rxid and rgmii-txid? This would let me
> stop using tx_delay and rx_delay in the RK3572 driver path as well.
No, rgmii, rgmii-rxid and rgmii-txid are valid, it depends on the PCB
design.
https://elixir.bootlin.com/linux/v6.15/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L287
What i would prefer is that the C code does not parse the rx_delay and
tx_delay properties. If somebody actually needs them, they need to
implement tx-internal-delay-ps and rx-internal-delay-ps. Since you
don't need them, you don't need to implement them.
Andrew