RE: [EXT] Re: [PATCH v2 net 2/2] net: stmmac: dwmac-imx: pause the TXC clock in fixed-link

From: Shenwei Wang
Date: Fri Jul 28 2023 - 11:09:40 EST




> -----Original Message-----
> From: Fabio Estevam <festevam@xxxxxxxxx>
> Sent: Friday, July 28, 2023 6:01 AM
> To: Shenwei Wang <shenwei.wang@xxxxxxx>; Andrew Lunn <andrew@xxxxxxx>
> Cc: Russell King <linux@xxxxxxxxxxxxxxx>; David S. Miller
> <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub
> Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Maxime
> Coquelin <mcoquelin.stm32@xxxxxxxxx>; Shawn Guo <shawnguo@xxxxxxxxxx>;
> Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>; Neil Armstrong
> <neil.armstrong@xxxxxxxxxx>; Kevin Hilman <khilman@xxxxxxxxxxxx>; Vinod
> Koul <vkoul@xxxxxxxxxx>; Chen-Yu Tsai <wens@xxxxxxxx>; Jernej Skrabec
> <jernej.skrabec@xxxxxxxxx>; Samuel Holland <samuel@xxxxxxxxxxxx>;
> Giuseppe Cavallaro <peppe.cavallaro@xxxxxx>; Alexandre Torgue
> <alexandre.torgue@xxxxxxxxxxx>; Jose Abreu <joabreu@xxxxxxxxxxxx>;
> Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>; dl-linux-imx <linux-
>
>
> On Thu, Jul 27, 2023 at 12:25 PM Shenwei Wang <shenwei.wang@xxxxxxx>
> wrote:
>
> > struct plat_stmmacenet_data *plat_dat = priv; @@ -317,8
> > +359,11 @@ static int imx_dwmac_probe(struct platform_device *pdev)
> > plat_dat->exit = imx_dwmac_exit;
> > plat_dat->clks_config = imx_dwmac_clks_config;
> > plat_dat->fix_mac_speed = imx_dwmac_fix_speed;
> > + if (of_machine_is_compatible("fsl,imx93"))
> > + plat_dat->fix_mac_speed = imx_dwmac_fix_speed_mx93;
>
> So you are forcing this on all imx93 boards, even if they don't use a SJA1105.
>

Yes, that's the purpose because it won't hurt even the other side is not SJA1105.

> Andrew Lunn gave the following feedback in v1:
>
> "The SJA1105 has the problem, so i would expect it to be involved in the solution.
> Otherwise, how is this going to work for other MAC drivers?
>
> Maybe you need to expose a common clock framework clock for the TXC clock
> line, which the SJA1105 can disable/enable? That then makes it clear what other
> MAC drivers need to do."

I have been considering this plan for some time. The idea should be implemented
across all i.mx8/9 platforms. I am going to start to work on it in the following month,
and it will take some time to implement it.

Thanks,
Shenwei