net: stmmac: dwmac-imx: pause the TXC clock in fixed-link
authorShenwei Wang <shenwei.wang@nxp.com>
Mon, 7 Aug 2023 16:07:16 +0000 (11:07 -0500)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Aug 2023 00:26:06 +0000 (17:26 -0700)
commit4fa6c976158b20eb7da94d35dfe34deec4b2a504
tree2948c7a735003bf740b9149904e8ad139925f4cc
parent1fc04a0b973392df5975901f56addc913d2c8f4d
net: stmmac: dwmac-imx: pause the TXC clock in fixed-link

When using a fixed-link setup, certain devices like the SJA1105 require a
small pause in the TXC clock line to enable their internal tunable
delay line (TDL).

To satisfy this requirement, this patch temporarily disables the TX clock,
and restarts it after a required period. This provides the required
silent interval on the clock line for SJA1105 to complete the frequency
transition and enable the internal TDLs. This action occurs before the link
is built up, so it does not impact a normal device too. There is no
need to identify if the connected device is an SJA1105 alike or not during
the implementation.

So far we have only enabled this feature on the i.MX93 platform.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
Link: https://lore.kernel.org/r/20230807160716.259072-3-shenwei.wang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c