[PATCH v7 05/14] clk: renesas: r8a78000: Add SCMI remapping support

Wolfram Sang wsa+renesas at sang-engineering.com
Wed Dec 2 01:46:31 PST 2026


On Mon, Nov 30, 2026 at 02:12:36PM +0100, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas at glider.be>
> 
> Extend the Clock Pulse Generator driver for R-Car X5H with SCMI support,
> to remap DT clock IDs to abstractions (clocks) offered by the SCMI
> firmware when running on a system with SCMI, and SCMI support is
> enabled.  Take into account some peculiarities of the current SCMI
> firmware implementations, and fall-back to fixed-rate clocks as
> replacements for SCMI clocks that are not available.
> Support for bus clocks used by serial, I2C, and SPI devices is included.
> 
> This lets us avoid putting SCMI IDs in DT, and allows us to use the same
> hardware description in SoC DTS for systems with and without SCMI
> firmware.
> 
> Note that fixed-rate clock IDs are now offset to maintain a clear
> separation with the SCMI clock ID space, and that the default fallback
> map is now populated using a macro, to prevent accidental inclusion of
> SCMI firmware clock IDs.
> 
> For now, it is assumed SCMI clock IDs are stable, and match SCP FW
> SDKv4.31.0 and later.
> 
> Suggested-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
> Tested-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
> Reviewed-by: Marek Vasut <marek.vasut+renesas at mailbox.org>

Reviewed-by: Wolfram Sang <wsa+renesas at sang-engineering.com>

Only some more places to add a 'r8a78000_' prefix if we want that.

One further question:

> +#define MAP_FIXED(id, rate) { id, FIXED_CLK(rate) }
> +	MAP_FIXED(R8A78000_CPG_SGASYNCD4_PERW_BUS,	266M),
> +	MAP_FIXED(R8A78000_CPG_SGASYNCD8_PERW_BUS,	133M),
> +	MAP_FIXED(R8A78000_CPG_SGASYNCD16_PERW_BUS,	66M),
> +#undef MAP_FIXED

Why the undef? Couldn't we find a better name and keep the macro?




More information about the linux-arm-kernel mailing list