* [PATCH] clk: vf610: Add support for the Ethernet switch clocks
@ 2026-01-22 13:06 Lukasz Majewski
2026-01-22 14:33 ` Frank Li
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Lukasz Majewski @ 2026-01-22 13:06 UTC (permalink / raw)
To: Michael Turquette, Abel Vesa, Peng Fan, Stephen Boyd, Shawn Guo,
Sascha Hauer
Cc: Pengutronix Kernel Team, Fabio Estevam, linux-clk, imx,
linux-kernel, linux-arm-kernel, Lukasz Majewski
The vf610 device has built in the MoreThanIP L2 switch. For proper
operation it is required to enable ESW and MAC table lookup
clocks.
The MAC table spans from 0x400E_C000 for 0x4000 and it is necessary
to provide clocks for each AIPS1-"slot", which size is 0x1000
(hence four separate entries).
Those can be enabled via clock gating CCM_CCGR10 register
(0x4006_B068).
Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
---
drivers/clk/imx/clk-vf610.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/clk/imx/clk-vf610.c b/drivers/clk/imx/clk-vf610.c
index 9e11f1c7c397..88c9b656f244 100644
--- a/drivers/clk/imx/clk-vf610.c
+++ b/drivers/clk/imx/clk-vf610.c
@@ -309,6 +309,11 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
clk[VF610_CLK_ENET_TS] = imx_clk_gate("enet_ts", "enet_ts_sel", CCM_CSCDR1, 23);
clk[VF610_CLK_ENET0] = imx_clk_gate2("enet0", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(0));
clk[VF610_CLK_ENET1] = imx_clk_gate2("enet1", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(1));
+ clk[VF610_CLK_ESW] = imx_clk_gate2("esw", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(8));
+ clk[VF610_CLK_ESW_MAC_TAB0] = imx_clk_gate2("esw_tab0", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(12));
+ clk[VF610_CLK_ESW_MAC_TAB1] = imx_clk_gate2("esw_tab1", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(13));
+ clk[VF610_CLK_ESW_MAC_TAB2] = imx_clk_gate2("esw_tab2", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(14));
+ clk[VF610_CLK_ESW_MAC_TAB3] = imx_clk_gate2("esw_tab3", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(15));
clk[VF610_CLK_PIT] = imx_clk_gate2("pit", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(7));
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] clk: vf610: Add support for the Ethernet switch clocks
2026-01-22 13:06 [PATCH] clk: vf610: Add support for the Ethernet switch clocks Lukasz Majewski
@ 2026-01-22 14:33 ` Frank Li
2026-01-22 16:23 ` Andrew Lunn
2026-01-26 6:34 ` Peng Fan
2 siblings, 0 replies; 7+ messages in thread
From: Frank Li @ 2026-01-22 14:33 UTC (permalink / raw)
To: Lukasz Majewski
Cc: Michael Turquette, Abel Vesa, Peng Fan, Stephen Boyd, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, linux-clk,
imx, linux-kernel, linux-arm-kernel
On Thu, Jan 22, 2026 at 02:06:49PM +0100, Lukasz Majewski wrote:
> The vf610 device has built in the MoreThanIP L2 switch. For proper
> operation it is required to enable ESW and MAC table lookup
> clocks.
>
> The MAC table spans from 0x400E_C000 for 0x4000 and it is necessary
> to provide clocks for each AIPS1-"slot", which size is 0x1000
> (hence four separate entries).
>
> Those can be enabled via clock gating CCM_CCGR10 register
> (0x4006_B068).
>
> Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/clk/imx/clk-vf610.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/clk/imx/clk-vf610.c b/drivers/clk/imx/clk-vf610.c
> index 9e11f1c7c397..88c9b656f244 100644
> --- a/drivers/clk/imx/clk-vf610.c
> +++ b/drivers/clk/imx/clk-vf610.c
> @@ -309,6 +309,11 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
> clk[VF610_CLK_ENET_TS] = imx_clk_gate("enet_ts", "enet_ts_sel", CCM_CSCDR1, 23);
> clk[VF610_CLK_ENET0] = imx_clk_gate2("enet0", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(0));
> clk[VF610_CLK_ENET1] = imx_clk_gate2("enet1", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(1));
> + clk[VF610_CLK_ESW] = imx_clk_gate2("esw", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(8));
> + clk[VF610_CLK_ESW_MAC_TAB0] = imx_clk_gate2("esw_tab0", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(12));
> + clk[VF610_CLK_ESW_MAC_TAB1] = imx_clk_gate2("esw_tab1", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(13));
> + clk[VF610_CLK_ESW_MAC_TAB2] = imx_clk_gate2("esw_tab2", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(14));
> + clk[VF610_CLK_ESW_MAC_TAB3] = imx_clk_gate2("esw_tab3", "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(15));
>
> clk[VF610_CLK_PIT] = imx_clk_gate2("pit", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(7));
>
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] clk: vf610: Add support for the Ethernet switch clocks
2026-01-22 13:06 [PATCH] clk: vf610: Add support for the Ethernet switch clocks Lukasz Majewski
2026-01-22 14:33 ` Frank Li
@ 2026-01-22 16:23 ` Andrew Lunn
2026-01-22 19:05 ` Łukasz Majewski
2026-01-26 6:34 ` Peng Fan
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2026-01-22 16:23 UTC (permalink / raw)
To: Lukasz Majewski
Cc: Michael Turquette, Abel Vesa, Peng Fan, Stephen Boyd, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, linux-clk,
imx, linux-kernel, linux-arm-kernel
On Thu, Jan 22, 2026 at 02:06:49PM +0100, Lukasz Majewski wrote:
> The vf610 device has built in the MoreThanIP L2 switch. For proper
> operation it is required to enable ESW and MAC table lookup
> clocks.
>
> The MAC table spans from 0x400E_C000 for 0x4000 and it is necessary
> to provide clocks for each AIPS1-"slot", which size is 0x1000
> (hence four separate entries).
>
> Those can be enabled via clock gating CCM_CCGR10 register
> (0x4006_B068).
Sorry, i lost track of the state of the switch driver. Is there also a
patch to add consumers of these clocks?
> Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] clk: vf610: Add support for the Ethernet switch clocks
2026-01-22 16:23 ` Andrew Lunn
@ 2026-01-22 19:05 ` Łukasz Majewski
2026-01-23 13:12 ` Łukasz Majewski
0 siblings, 1 reply; 7+ messages in thread
From: Łukasz Majewski @ 2026-01-22 19:05 UTC (permalink / raw)
To: Andrew Lunn
Cc: Michael Turquette, Abel Vesa, Peng Fan, Stephen Boyd, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, linux-clk,
imx, linux-kernel, linux-arm-kernel
Hi Andrew,
> On Thu, Jan 22, 2026 at 02:06:49PM +0100, Lukasz Majewski wrote:
> > The vf610 device has built in the MoreThanIP L2 switch. For proper
> > operation it is required to enable ESW and MAC table lookup
> > clocks.
> >
> > The MAC table spans from 0x400E_C000 for 0x4000 and it is necessary
> > to provide clocks for each AIPS1-"slot", which size is 0x1000
> > (hence four separate entries).
> >
> > Those can be enabled via clock gating CCM_CCGR10 register
> > (0x4006_B068).
>
> Sorry, i lost track of the state of the switch driver.
New year, new MTIP L2 switch patches in preparation :-)
> Is there also a
> patch to add consumers of these clocks?
In short - this patch set is a preparatory one for vf610 SoC support of
the MTIP L2 switch.
Those changes describe more thoroughly the clock subsystem of this SoC.
>
> > Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>
> Andrew
--
Best regards,
Lukasz Majewski
--
Nabla Software Engineering GmbH
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: office@nabladev.com
Managing Director : Stefano Babic
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] clk: vf610: Add support for the Ethernet switch clocks
2026-01-22 19:05 ` Łukasz Majewski
@ 2026-01-23 13:12 ` Łukasz Majewski
0 siblings, 0 replies; 7+ messages in thread
From: Łukasz Majewski @ 2026-01-23 13:12 UTC (permalink / raw)
To: Andrew Lunn
Cc: Michael Turquette, Abel Vesa, Peng Fan, Stephen Boyd, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, linux-clk,
imx, linux-kernel, linux-arm-kernel, Jakub Kicinski
Hi Andrew,
> Hi Andrew,
>
> > On Thu, Jan 22, 2026 at 02:06:49PM +0100, Lukasz Majewski wrote:
> > > The vf610 device has built in the MoreThanIP L2 switch. For proper
> > > operation it is required to enable ESW and MAC table lookup
> > > clocks.
> > >
> > > The MAC table spans from 0x400E_C000 for 0x4000 and it is
> > > necessary to provide clocks for each AIPS1-"slot", which size is
> > > 0x1000 (hence four separate entries).
> > >
> > > Those can be enabled via clock gating CCM_CCGR10 register
> > > (0x4006_B068).
> >
> > Sorry, i lost track of the state of the switch driver.
>
> New year, new MTIP L2 switch patches in preparation :-)
>
Just to share:
https://github.com/lmajewski/linux-imx28-l2switch/commits/vf610-linux-6.6.y-mtipl2sw
The driver has been tested (after backporting) on v6.6 LTS with
PREEMPT_RT.
Moreover, I've added support for switchdev.
> > Is there also a
> > patch to add consumers of these clocks?
>
> In short - this patch set is a preparatory one for vf610 SoC support
> of the MTIP L2 switch.
>
> Those changes describe more thoroughly the clock subsystem of this
> SoC.
>
> >
> > > Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
> >
> > Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> >
> > Andrew
>
--
Best regards,
Lukasz Majewski
--
Nabla Software Engineering GmbH
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: office@nabladev.com
Managing Director : Stefano Babic
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] clk: vf610: Add support for the Ethernet switch clocks
2026-01-22 13:06 [PATCH] clk: vf610: Add support for the Ethernet switch clocks Lukasz Majewski
2026-01-22 14:33 ` Frank Li
2026-01-22 16:23 ` Andrew Lunn
@ 2026-01-26 6:34 ` Peng Fan
2026-01-26 8:05 ` Łukasz Majewski
2 siblings, 1 reply; 7+ messages in thread
From: Peng Fan @ 2026-01-26 6:34 UTC (permalink / raw)
To: Lukasz Majewski, Michael Turquette, Abel Vesa, Stephen Boyd,
Shawn Guo, Sascha Hauer
Cc: Pengutronix Kernel Team, Fabio Estevam, linux-clk@vger.kernel.org,
imx@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Hi Lukasz,
> Subject: [PATCH] clk: vf610: Add support for the Ethernet switch clocks
>
> The vf610 device has built in the MoreThanIP L2 switch. For proper
> operation it is required to enable ESW and MAC table lookup clocks.
>
> The MAC table spans from 0x400E_C000 for 0x4000 and it is necessary
> to provide clocks for each AIPS1-"slot", which size is 0x1000 (hence
> four separate entries).
>
> Those can be enabled via clock gating CCM_CCGR10 register
> (0x4006_B068).
>
> Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
> ---
> drivers/clk/imx/clk-vf610.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/clk/imx/clk-vf610.c b/drivers/clk/imx/clk-vf610.c
> index 9e11f1c7c397..88c9b656f244 100644
> --- a/drivers/clk/imx/clk-vf610.c
> +++ b/drivers/clk/imx/clk-vf610.c
> @@ -309,6 +309,11 @@ static void __init vf610_clocks_init(struct
> device_node *ccm_node)
> clk[VF610_CLK_ENET_TS] = imx_clk_gate("enet_ts", "enet_ts_sel",
> CCM_CSCDR1, 23);
> clk[VF610_CLK_ENET0] = imx_clk_gate2("enet0", "ipg_bus",
> CCM_CCGR9, CCM_CCGRx_CGn(0));
> clk[VF610_CLK_ENET1] = imx_clk_gate2("enet1", "ipg_bus",
> CCM_CCGR9, CCM_CCGRx_CGn(1));
> + clk[VF610_CLK_ESW] = imx_clk_gate2("esw", "ipg_bus",
> CCM_CCGR10, CCM_CCGRx_CGn(8));
> + clk[VF610_CLK_ESW_MAC_TAB0] = imx_clk_gate2("esw_tab0",
> "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(12));
> + clk[VF610_CLK_ESW_MAC_TAB1] = imx_clk_gate2("esw_tab1",
> "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(13));
> + clk[VF610_CLK_ESW_MAC_TAB2] = imx_clk_gate2("esw_tab2",
> "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(14));
> + clk[VF610_CLK_ESW_MAC_TAB3] = imx_clk_gate2("esw_tab3",
> + "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(15));
Seems you post dt-binding in a separate patch. It is better to
put in one patchset.
Regards
Peng
>
> clk[VF610_CLK_PIT] = imx_clk_gate2("pit", "ipg_bus", CCM_CCGR1,
> CCM_CCGRx_CGn(7));
>
> --
> 2.39.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] clk: vf610: Add support for the Ethernet switch clocks
2026-01-26 6:34 ` Peng Fan
@ 2026-01-26 8:05 ` Łukasz Majewski
0 siblings, 0 replies; 7+ messages in thread
From: Łukasz Majewski @ 2026-01-26 8:05 UTC (permalink / raw)
To: Peng Fan
Cc: Michael Turquette, Abel Vesa, Stephen Boyd, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
linux-clk@vger.kernel.org, imx@lists.linux.dev,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Hi Peng,
> Hi Lukasz,
>
> > Subject: [PATCH] clk: vf610: Add support for the Ethernet switch
> > clocks
> >
> > The vf610 device has built in the MoreThanIP L2 switch. For proper
> > operation it is required to enable ESW and MAC table lookup clocks.
> >
> > The MAC table spans from 0x400E_C000 for 0x4000 and it is necessary
> > to provide clocks for each AIPS1-"slot", which size is 0x1000 (hence
> > four separate entries).
> >
> > Those can be enabled via clock gating CCM_CCGR10 register
> > (0x4006_B068).
> >
> > Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
> > ---
> > drivers/clk/imx/clk-vf610.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/clk/imx/clk-vf610.c
> > b/drivers/clk/imx/clk-vf610.c index 9e11f1c7c397..88c9b656f244
> > 100644 --- a/drivers/clk/imx/clk-vf610.c
> > +++ b/drivers/clk/imx/clk-vf610.c
> > @@ -309,6 +309,11 @@ static void __init vf610_clocks_init(struct
> > device_node *ccm_node)
> > clk[VF610_CLK_ENET_TS] = imx_clk_gate("enet_ts",
> > "enet_ts_sel", CCM_CSCDR1, 23);
> > clk[VF610_CLK_ENET0] = imx_clk_gate2("enet0", "ipg_bus",
> > CCM_CCGR9, CCM_CCGRx_CGn(0));
> > clk[VF610_CLK_ENET1] = imx_clk_gate2("enet1", "ipg_bus",
> > CCM_CCGR9, CCM_CCGRx_CGn(1));
> > + clk[VF610_CLK_ESW] = imx_clk_gate2("esw", "ipg_bus",
> > CCM_CCGR10, CCM_CCGRx_CGn(8));
> > + clk[VF610_CLK_ESW_MAC_TAB0] = imx_clk_gate2("esw_tab0",
> > "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(12));
> > + clk[VF610_CLK_ESW_MAC_TAB1] = imx_clk_gate2("esw_tab1",
> > "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(13));
> > + clk[VF610_CLK_ESW_MAC_TAB2] = imx_clk_gate2("esw_tab2",
> > "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(14));
> > + clk[VF610_CLK_ESW_MAC_TAB3] = imx_clk_gate2("esw_tab3",
> > + "ipg_bus", CCM_CCGR10, CCM_CCGRx_CGn(15));
>
> Seems you post dt-binding in a separate patch. It is better to
> put in one patchset.
Ok. No problem - I will add them together :)
>
> Regards
> Peng
>
> >
> > clk[VF610_CLK_PIT] = imx_clk_gate2("pit", "ipg_bus",
> > CCM_CCGR1, CCM_CCGRx_CGn(7));
> >
> > --
> > 2.39.5
>
--
Best regards,
Lukasz Majewski
--
Nabla Software Engineering GmbH
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: office@nabladev.com
Managing Director : Stefano Babic
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-01-26 8:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 13:06 [PATCH] clk: vf610: Add support for the Ethernet switch clocks Lukasz Majewski
2026-01-22 14:33 ` Frank Li
2026-01-22 16:23 ` Andrew Lunn
2026-01-22 19:05 ` Łukasz Majewski
2026-01-23 13:12 ` Łukasz Majewski
2026-01-26 6:34 ` Peng Fan
2026-01-26 8:05 ` Łukasz Majewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox