From: Abel Vesa <abel.vesa@linaro.org>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Abel Vesa <abelvesa@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Richard Cochran <richardcochran@gmail.com>,
kernel@pengutronix.de, Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Russell King <linux@armlinux.org.uk>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-clk@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v2 15/19] clk: imx6ul: fix enet1 gate configuration
Date: Sun, 29 Jan 2023 19:32:31 +0200 [thread overview]
Message-ID: <Y9atr+Gn60+m4nOg@linaro.org> (raw)
In-Reply-To: <20230117061453.3723649-16-o.rempel@pengutronix.de>
On 23-01-17 07:14:49, Oleksij Rempel wrote:
> 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>
I'm OK with this. Maybe a fixes tag ?
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
> ---
> drivers/clk/imx/clk-imx6ul.c | 7 ++++---
> include/dt-bindings/clock/imx6ul-clock.h | 3 ++-
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c
> index 67a7a77ca540..c3c465c1b0e7 100644
> --- a/drivers/clk/imx/clk-imx6ul.c
> +++ b/drivers/clk/imx/clk-imx6ul.c
> @@ -176,7 +176,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node)
> hws[IMX6UL_CLK_PLL3_USB_OTG] = imx_clk_hw_gate("pll3_usb_otg", "pll3_bypass", base + 0x10, 13);
> hws[IMX6UL_CLK_PLL4_AUDIO] = imx_clk_hw_gate("pll4_audio", "pll4_bypass", base + 0x70, 13);
> hws[IMX6UL_CLK_PLL5_VIDEO] = imx_clk_hw_gate("pll5_video", "pll5_bypass", base + 0xa0, 13);
> - hws[IMX6UL_CLK_PLL6_ENET] = imx_clk_hw_gate("pll6_enet", "pll6_bypass", base + 0xe0, 13);
> + hws[IMX6UL_CLK_PLL6_ENET] = imx_clk_hw_fixed_factor("pll6_enet", "pll6_bypass", 1, 1);
> hws[IMX6UL_CLK_PLL7_USB_HOST] = imx_clk_hw_gate("pll7_usb_host", "pll7_bypass", base + 0x20, 13);
>
> /*
> @@ -205,12 +205,13 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node)
> hws[IMX6UL_CLK_PLL3_PFD2] = imx_clk_hw_pfd("pll3_pfd2_508m", "pll3_usb_otg", base + 0xf0, 2);
> hws[IMX6UL_CLK_PLL3_PFD3] = imx_clk_hw_pfd("pll3_pfd3_454m", "pll3_usb_otg", base + 0xf0, 3);
>
> - hws[IMX6UL_CLK_ENET_REF] = clk_hw_register_divider_table(NULL, "enet_ref", "pll6_enet", 0,
> + hws[IMX6UL_CLK_ENET_REF] = clk_hw_register_divider_table(NULL, "enet1_ref", "pll6_enet", 0,
> base + 0xe0, 0, 2, 0, clk_enet_ref_table, &imx_ccm_lock);
> hws[IMX6UL_CLK_ENET2_REF] = clk_hw_register_divider_table(NULL, "enet2_ref", "pll6_enet", 0,
> base + 0xe0, 2, 2, 0, clk_enet_ref_table, &imx_ccm_lock);
>
> - hws[IMX6UL_CLK_ENET2_REF_125M] = imx_clk_hw_gate("enet_ref_125m", "enet2_ref", base + 0xe0, 20);
> + hws[IMX6UL_CLK_ENET1_REF_125M] = imx_clk_hw_gate("enet1_ref_125m", "enet1_ref", base + 0xe0, 13);
> + hws[IMX6UL_CLK_ENET2_REF_125M] = imx_clk_hw_gate("enet2_ref_125m", "enet2_ref", base + 0xe0, 20);
> hws[IMX6UL_CLK_ENET_PTP_REF] = imx_clk_hw_fixed_factor("enet_ptp_ref", "pll6_enet", 1, 20);
> hws[IMX6UL_CLK_ENET_PTP] = imx_clk_hw_gate("enet_ptp", "enet_ptp_ref", base + 0xe0, 21);
>
> diff --git a/include/dt-bindings/clock/imx6ul-clock.h b/include/dt-bindings/clock/imx6ul-clock.h
> index 79094338e6f1..b44920f1edb0 100644
> --- a/include/dt-bindings/clock/imx6ul-clock.h
> +++ b/include/dt-bindings/clock/imx6ul-clock.h
> @@ -256,7 +256,8 @@
> #define IMX6UL_CLK_GPIO4 247
> #define IMX6UL_CLK_GPIO5 248
> #define IMX6UL_CLK_MMDC_P1_IPG 249
> +#define IMX6UL_CLK_ENET1_REF_125M 250
>
> -#define IMX6UL_CLK_END 250
> +#define IMX6UL_CLK_END 251
>
> #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */
> --
> 2.30.2
>
next prev parent reply other threads:[~2023-01-29 17:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 6:14 [PATCH v2 00/19] ARM: imx: make Ethernet refclock configurable Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 01/19] clk: imx: add clk-gpr-mux driver Oleksij Rempel
2023-01-29 17:36 ` Abel Vesa
2023-01-17 6:14 ` [PATCH v2 02/19] clk: imx6q: add ethernet refclock mux support Oleksij Rempel
2023-01-29 17:34 ` Abel Vesa
2023-01-17 6:14 ` [PATCH v2 03/19] ARM: imx6q: skip ethernet refclock reconfiguration if enet_clk_ref is present Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 04/19] ARM: dts: imx6qdl: use enet_clk_ref instead of enet_out for the FEC node Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 05/19] ARM: dts: imx6dl-lanmcu: configure ethernet reference clock parent Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 06/19] ARM: dts: imx6dl-alti6p: " Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 07/19] ARM: dts: imx6dl-plybas: " Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 08/19] ARM: dts: imx6dl-plym2m: " Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 09/19] ARM: dts: imx6dl-prtmvt: " Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 10/19] ARM: dts: imx6dl-victgo: " Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 11/19] ARM: dts: imx6q-prtwd2: " Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 12/19] ARM: dts: imx6qdl-skov-cpu: " Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 13/19] ARM: dts: imx6dl-eckelmann-ci4x10: " Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 14/19] clk: imx: add imx_obtain_fixed_of_clock() Oleksij Rempel
2023-01-29 17:33 ` Abel Vesa
2023-01-17 6:14 ` [PATCH v2 15/19] clk: imx6ul: fix enet1 gate configuration Oleksij Rempel
2023-01-29 17:32 ` Abel Vesa [this message]
2023-01-30 12:15 ` Oleksij Rempel
2023-01-30 14:54 ` Abel Vesa
2023-01-17 6:14 ` [PATCH v2 16/19] clk: imx6ul: add ethernet refclock mux support Oleksij Rempel
2023-01-30 22:05 ` Abel Vesa
2023-01-17 6:14 ` [PATCH v2 17/19] ARM: dts: imx6ul: set enet_clk_ref to CLK_ENETx_REF_SEL Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 18/19] ARM: mach-imx: imx6ul: remove not optional ethernet refclock overwrite Oleksij Rempel
2023-01-17 6:14 ` [PATCH v2 19/19] ARM: dts: imx6ul-prti6g: configure ethernet reference clock parent Oleksij Rempel
2023-01-30 22:11 ` [PATCH v2 00/19] ARM: imx: make Ethernet refclock configurable Abel Vesa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y9atr+Gn60+m4nOg@linaro.org \
--to=abel.vesa@linaro.org \
--cc=abelvesa@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mturquette@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).