Re: [PATCH v3 1/3] soc: renesas: rz-sysc: Register auxiliary device for PWRRDY power sequencer

From: Geert Uytterhoeven

Date: Fri Aug 14 2026 - 10:05:38 EST


On Wed, 12 Aug 2026 at 13:50, Biju <biju.das.au@xxxxxxxxx> wrote:
> From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
>
> Some RZ SoCs (e.g. RZ/G3L) have a PWRRDY register that is controlled
> through a power sequencer rather than directly by the SYSC driver.
>
> Add a pwrrdy_pwrseq flag to struct rz_sysc_soc_id_init_data to mark
> SoCs with this property, and set it for RZ/G3L. When set,
> rz_sysc_probe() registers a "pwrseq-pwrrdy" auxiliary device so a
> dedicated driver can handle the PWRRDY sequencing.
>
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>

> --- a/drivers/soc/renesas/rz-sysc.c
> +++ b/drivers/soc/renesas/rz-sysc.c
> @@ -5,6 +5,7 @@
> * Copyright (C) 2024 Renesas Electronics Corp.
> */
>
> +#include <linux/auxiliary_bus.h>
> #include <linux/bitfield.h>
> #include <linux/cleanup.h>
> #include <linux/io.h>
> @@ -84,6 +85,22 @@ static int rz_sysc_soc_init(struct rz_sysc *sysc, const struct of_device_id *mat
> return 0;
> }
>
> +static int rz_sysc_pwrrdy_pwrseq_init(struct device *dev, struct regmap *regmap,
> + const struct rz_sysc_init_data *data)
> +{
> + const struct rz_sysc_soc_id_init_data *soc_data = data->soc_id_init_data;
> + struct auxiliary_device *adev;
> +
> + if (!soc_data->pwrrdy_pwrseq)
> + return 0;
> +
> + adev = devm_auxiliary_device_create(dev, "pwrseq-pwrrdy", regmap);
> + if (!adev)
> + return -ENODEV;
> +
> + return 0;
> +}
> +
> static const struct of_device_id rz_sysc_match[] = {
> #ifdef CONFIG_SYSC_R9A08G045
> { .compatible = "renesas,r9a08g045-sysc", .data = &rzg3s_sysc_init_data },
> @@ -149,6 +166,10 @@ static int rz_sysc_probe(struct platform_device *pdev)
> if (IS_ERR(regmap))
> return PTR_ERR(regmap);
>
> + ret = rz_sysc_pwrrdy_pwrseq_init(dev, regmap, match->data);
> + if (ret)
> + return ret;

I agree with Bartosz.

> +
> return of_syscon_register_regmap(dev->of_node, regmap);
> }

The rest LGTM, so
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds