[PATCH v3] clk: vf610: Add support for the Ethernet switch clocks

Andrew Lunn andrew at lunn.ch
Tue Jan 27 06:08:20 PST 2026


On Tue, Jan 27, 2026 at 09:51:50AM +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).
> 
> This patch also adds VF610_CLK_ESW and VF610_CLK_ESW_MAC_TAB{0123}
> macros definitions for L2 switch.
> 
> The VF610_CLK_END has been removed from dt-bindings, as its number had to
> be increased when MTIP L2 switch clocks were added, and defined locally
> in clk-vf610.c driver.

The nice thing about having it in vf610-clock.h was that it was clear
that whenever a new clock is added, the value needed to change. It is
now hidden away. It could well be more clocks are added, the value
does not get updated, and in use we go passed the end of the clk[]
array, and probably corrupt the struct clk_onecell_data clk_data.

I would probably add a comment in vf610-clock.h about this.

Apart from that:

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew



More information about the linux-arm-kernel mailing list