Re: [PATCH 2/2] clk: samsung: acpm: add initial Exynos850 support
From: Tudor Ambarus
Date: Mon May 18 2026 - 07:04:07 EST
On 5/12/26 11:40 PM, Alexey Klimov wrote:
> The Exynos850 SoC utilizes the APM co-processor for clock management
> via ACPM, similar to the GS101 SoC.
>
> Add the Exynos850-specific clock variant array (including mif, int,
> cpucl0, cpucl1, g3d, aud, cam, disp, and cp) and wire it up to the
> driver data infrastructure. Add the "exynos850-acpm-clk" device ID
> to enable dynamic instantiation of these clocks during probe().
>
> Signed-off-by: Alexey Klimov <alexey.klimov@xxxxxxxxxx>
> ---
> drivers/clk/samsung/clk-acpm.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/clk/samsung/clk-acpm.c b/drivers/clk/samsung/clk-acpm.c
> index 604604b5b814..d9b2604db03a 100644
> --- a/drivers/clk/samsung/clk-acpm.c
> +++ b/drivers/clk/samsung/clk-acpm.c
> @@ -40,6 +40,18 @@ struct acpm_clk_driver_data {
> .name = cname, \
> }
>
> +static const struct acpm_clk_variant exynos850_acpm_clks[] = {
> + ACPM_CLK("mif"),
> + ACPM_CLK("int"),
> + ACPM_CLK("cpucl0"),
> + ACPM_CLK("cpucl1"),
> + ACPM_CLK("g3d"),
> + ACPM_CLK("aud"),
> + ACPM_CLK("cam"),
> + ACPM_CLK("disp"),
> + ACPM_CLK("cp"),
> +};
What clocks did you test from the array?
you need bindings for the clocks, otherwise you'll reference the clocks
in device tree with raw integers. See:
See include/dt-bindings/clock/google,gs101-acpm.h.
Since the bindings patch have to be defined in their own patch:
Reviewed-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>
> +
> static const struct acpm_clk_variant gs101_acpm_clks[] = {
> ACPM_CLK("mif"),
> ACPM_CLK("int"),
> @@ -57,6 +69,12 @@ static const struct acpm_clk_variant gs101_acpm_clks[] = {
> ACPM_CLK("bo"),
> };
>
> +static const struct acpm_clk_driver_data acpm_clk_exynos850 = {
> + .clks = exynos850_acpm_clks,
> + .nr_clks = ARRAY_SIZE(exynos850_acpm_clks),
> + .mbox_chan_id = 0,
> +};
> +
> static const struct acpm_clk_driver_data acpm_clk_gs101 = {
> .clks = gs101_acpm_clks,
> .nr_clks = ARRAY_SIZE(gs101_acpm_clks),
> @@ -173,6 +191,7 @@ static int acpm_clk_probe(struct platform_device *pdev)
> }
>
> static const struct platform_device_id acpm_clk_id[] = {
> + { "exynos850-acpm-clk", (kernel_ulong_t)&acpm_clk_exynos850 },
> { "gs101-acpm-clk", (kernel_ulong_t)&acpm_clk_gs101 },
> {}
> };
>