[PATCH net-next 5/6] net: stmmac: mediatek: add support for TX deallocation adjustment feature

Louis-Alexis Eyraud louisalexis.eyraud at collabora.com
Wed Jul 8 05:28:30 PDT 2026


Hi Maxime,

On Tue, 2026-07-07 at 11:11 +0200, Maxime Chevallier wrote:
> Hi,
> 
> On 7/7/26 10:21, Louis-Alexis Eyraud wrote:
> > The MT8189 SoC has in the Ethernet control 0 register from the
> > peripheral configuration (pericfg) additional bits to adjust the TX
> > deallocation.
> > 
> > In preparation of MT8189 SoC support, add its definition, use in
> > the
> > set_delay_v2 callback, and a support flag in the platform data.
> 
> Can you elaborate a bit on this ? I don't quite get what you mean by
> "tx deallocation", this seems to have to do with RGMII timings from
> the register access pattern, but the local boolean flag for the
> feature
> is named "use_stage_fine", I'm failing to connect all the dots here
> with the different terminology in use :(
> 
The data sheets I have, don't have info regarding this register, so
I'll try to get more and improve commit and/or code description.

I'll also check if the register definition name is consistent
(downstream driver and upstream u-boot use this stage fine term).

The use_stage_fine feature flag could be renamed anyway to match what
it does.

> > 
> > Signed-off-by: Louis-Alexis Eyraud
> > <louisalexis.eyraud at collabora.com>
> > ---
> >  .../net/ethernet/stmicro/stmmac/dwmac-mediatek.c   | 25
> > ++++++++++++++++------
> >  1 file changed, 19 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > index bcc0baef3f71..6b0a42b5839f 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > @@ -37,7 +37,8 @@
> >  #define ETH_FINE_DLY_RXC	BIT(0)
> >  
> >  /* Peri Configuration register for mt8189 */
> > -#define MT8189_CTRL0_TXC_OUT_OP		BIT(20)
> > +#define MT8189_CTRL0_TXC_OUT_OP			BIT(20)
> 
> Extra whitespace inserted here :)
> 
Oops, to be fixed in v2

Regards,
Louis-Alexis

> Thanks,
> 
> Maxime



More information about the Linux-mediatek mailing list