Re: [PATCH v4 7/7] pinctrl: renesas: rzg2l: Add support for clone channel control

From: Geert Uytterhoeven

Date: Wed May 06 2026 - 11:43:47 EST


Hi Biju,

On Thu, 30 Apr 2026 at 11:34, Biju <biju.das.au@xxxxxxxxx> wrote:
> From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
>
> The RZ/G3L SoC has some IP such as I2C ch{2,3},SCIF ch{3,4,5},
> RSPI ch{1,2} and RSCI ch{1,2,3} need to control the clone channel for
> proper operation. As per the RZ/G3L hardware manual, the clone channel
> setting is to be done before the mux setting.
>
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> ---
> v3->v4:

Thanks for the update!

> --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
> +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c

> @@ -623,6 +644,45 @@ static int rzg2l_validate_pin(struct rzg2l_pinctrl *pctrl,
> return 0;
> }
>
> +static int rzg2l_pinctrl_set_clone_mode(struct rzg2l_pinctrl *pctrl,
> + u8 port, u8 pin, u8 func)
> +{
> + unsigned int i;
> +
> + if (!pctrl->data->clone_channel_data)
> + return 0;
> +
> + switch (func) {
> + case 2:
> + case 4 ... 7:
> + break;
> + default:
> + return 0;
> + }
> +
> + for (i = 0; i < pctrl->data->n_clone_channel_data; i++) {
> + unsigned int pin_data = pctrl->data->clone_channel_data[i];

u32, to match clone_channel_data[i]. I will fix that while applying, so
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
i.e. will queue in renesas-pinctrl for v7.2.

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