Re: [PATCH v3 2/3] power: sequencing: Add Renesas RZ/G3L Power Ready driver

From: Geert Uytterhoeven

Date: Fri Aug 14 2026 - 10:16:47 EST


Hi Biju,

On Wed, 12 Aug 2026 at 13:50, Biju <biju.das.au@xxxxxxxxx> wrote:
> From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
>
> Add a power sequencing driver for the Renesas RZ/G3L PWRRDY module,
> which signals power readiness for various IPs (USB, DSI, CSI etc.) on the
> SoC. The driver binds as an auxiliary device to the parent SYSC driver,
> using its regmap to toggle the SYS_PWRRDY_N register bits, and exposes
> {usb,dsi,csi}-pwrrdy pwrseq targets.
>
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/power/sequencing/Kconfig
> +++ b/drivers/power/sequencing/Kconfig
> @@ -27,6 +27,15 @@ config POWER_SEQUENCING_QCOM_WCN
> this driver is needed for correct power control or else we'd risk not
> respecting the required delays between enabling Bluetooth and WLAN.
>
> +config POWER_SEQUENCING_RENESAS_PWRRDY
> + tristate "Renesas Power Ready sequencing driver"
> + depends on SYSC_RZ || COMPILE_TEST
> + select AUXILIARY_BUS

Could this cause circular dependency problems with ...

> + help
> + Say Y here to enable the power sequencing driver for the Renesas
> + Power Ready signals. This driver handles the power ready signals
> + required to power on the various IP's on RZ/G3L platform.
> +
> config POWER_SEQUENCING_TH1520_GPU
> tristate "T-HEAD TH1520 GPU power sequencing driver"
> depends on (ARCH_THEAD && AUXILIARY_BUS) || COMPILE_TEST

... e.g. this, due to a mix of (a lot of) selects and (only three)
depends?

> --- /dev/null
> +++ b/drivers/power/sequencing/pwrseq-renesas-pwrrdy.c

> +static int pwrseq_rzg3l_pwrrdy_match(struct pwrseq_device *pwrseq,
> + struct device *dev)
> +{
> + static const struct of_device_id pwrseq_rzg3l_consumer_match[] = {
> + { .compatible = "renesas,r9a08g046-mipi-dsi" },
> + { .compatible = "renesas,r9a08g046-usbphy-ctrl" },
> + { /* sentinel */ }
> + };
> + const struct of_device_id *match;
> +
> + match = of_match_device(pwrseq_rzg3l_consumer_match, dev);

As you don't use the actual match entries, replacing the rather large
of_device_id structures by C strings, and using of_device_is_compatible()
would reduce kernel size.

However, you might need the match entries (actually their match data)
when adding support for future SoCs that might use different registers
and bits?

> + if (!match)
> + return PWRSEQ_NO_MATCH;
> +
> + return PWRSEQ_MATCH_OK;
> +}

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