clk: imx6ul: fix enet1 gate configuration
authorOleksij Rempel <o.rempel@pengutronix.de>
Tue, 31 Jan 2023 08:46:38 +0000 (09:46 +0100)
committerAbel Vesa <abel.vesa@linaro.org>
Tue, 31 Jan 2023 12:45:16 +0000 (14:45 +0200)
commit5f82bfced6118450cb9ea3f12316568f6fac10ab
treebed899bfa9b1228d9e80300fa0b59c5667cfeb8b
parent7757731053406dd00ad39fd136092ff05ec6fffe
clk: imx6ul: fix enet1 gate configuration

According to the "i.MX 6UltraLite Applications Processor Reference Manual,
Rev. 2, 03/2017", BIT(13) is ENET1_125M_EN which is not controlling root
of PLL6. It is controlling ENET1 separately.

So, instead of this picture (implementation before this patch):
fec1 <- enet_ref (divider) <---------------------------,
                                                       |- pll6_enet (gate)
fec2 <- enet2_ref_125m (gate) <- enet2_ref (divider) <-´

we should have this one (after this patch):
fec1 <- enet1_ref_125m (gate) <- enet1_ref (divider) <-,
                                                       |- pll6_enet
fec2 <- enet2_ref_125m (gate) <- enet2_ref (divider) <-´

With this fix, the RMII reference clock will be turned off, after
setting network interface down on each separate interface
(ip l s dev eth0 down). Which was not working before, on system with both
FECs enabled.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20230131084642.709385-16-o.rempel@pengutronix.de
drivers/clk/imx/clk-imx6ul.c
include/dt-bindings/clock/imx6ul-clock.h