All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Claudiu Beznea" <claudiu.beznea@tuxon.dev>
Cc: wsa+renesas@sang-engineering.com, robh@kernel.org,
	devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 5/5] pinctrl: renesas: rzg2l: Add RZ/G3S support for selecting the I3C power source
Date: Wed, 19 Aug 2026 14:49:51 +0000	[thread overview]
Message-ID: <20260819144951.633981F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260819143553.2478984-6-claudiu.beznea+renesas@tuxon.dev>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Requesting an unsupported 3.3V power source for an I3C pin is silently accepted and misconfigures the hardware to 1.8V.
--

--- Patch [5]: [PATCH v5 5/5] pinctrl: renesas: rzg2l: Add RZ/G3S support for selecting the I3C power source ---
commit 0ea5cf7346d186b66e9a09433c5157725bc0936d
Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

pinctrl: renesas: rzg2l: Add RZ/G3S support for selecting the I3C power source

The Renesas RZ/G3S I3C pins can be powered at either 1.8V or 1.2V. The
pin controller provides a register to select between these two options.
Update the Renesas RZ/G2L pin controller driver to allow selecting the
I3C power source on RZ/G3S SoC.

> diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
> index bab7bd73a4328..41ca18aeeb0fa 100644
> --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
> +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
[ ... ]
> @@ -463,6 +474,10 @@ struct rzg2l_pinctrl_ps_desc {
>  
>  /* Keep the entries with .caps set in the first positions. */
>  static const struct rzg2l_pinctrl_ps_desc available_ps[] = {
> +	/* I3C I/O domain voltage 1.2V */
> +	RZG2L_PINCTRL_PS_DESC(1200, 1, PIN_CFG_IO_VMC_I3C, RZG2L_IOLH_IDX_NA),
> +	/* I3C I/O domain voltage 1.8V */
> +	RZG2L_PINCTRL_PS_DESC(1800, 0, PIN_CFG_IO_VMC_I3C, RZG2L_IOLH_IDX_NA),
>  	/* Ethernet I/O domain voltage 2.5V */
>  	RZG2L_PINCTRL_PS_DESC(2500, 2, PIN_CFG_IO_VMC_ETH0 | PIN_CFG_IO_VMC_ETH1,
>  			      RZG2L_IOLH_IDX_2V5),
>  	/* I/O domain voltage 1.8V */
>  	RZG2L_PINCTRL_PS_DESC(1800, 1, 0, RZG2L_IOLH_IDX_1V8),
>  	/* I/O domain voltage 3.3V */
>  	RZG2L_PINCTRL_PS_DESC(3300, 0, 0, RZG2L_IOLH_IDX_3V3),
>  };

[Severity: Medium]
If a device tree incorrectly requests a 3.3V power source for an I3C pin,
will this silently accept the configuration and set the hardware to 1.8V
instead of returning an error?

Looking at RZG2L_PINCTRL_PS_DESC_MEMBER_TO_DESC_FUNC(), it treats entries
with .caps == 0 as wildcards:

drivers/pinctrl/renesas/pinctrl-rzg2l.c:RZG2L_PINCTRL_PS_DESC_MEMBER_TO_DESC_FUNC() {
	...
			if (available_ps[i].caps) {
				if (available_ps[i].caps & _caps) {
					desc = &available_ps[i];
					break;
				}
			} else {
				desc = &available_ps[i];
				break;
			}
	...
}

Since the 3.3V entry above has .caps = 0, it seems rzg2l_ps_to_desc() would
match it for an I3C pin requesting 3300mV, returning pwr_reg_val = 0, which
configures the hardware to 1.8V.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260819143553.2478984-1-claudiu.beznea+renesas@tuxon.dev?part=5

      reply	other threads:[~2026-08-19 14:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 14:35 [PATCH v5 0/5] pinctrl: renesas: rzg2l: Add support for RZ/G3S I3C Claudiu Beznea
2026-08-19 14:35 ` [PATCH v5 1/5] pinctrl: renesas: rzg2l: Generalize the power source code Claudiu Beznea
2026-08-19 14:35 ` [PATCH v5 2/5] pinctrl: renesas: rzg2l: Drop defines present in struct rzg2l_hwcfg Claudiu Beznea
2026-08-19 14:35 ` [PATCH v5 3/5] pinctrl: renesas: rzg2l: Unify the power source handling Claudiu Beznea
2026-08-19 14:49   ` sashiko-bot
2026-08-19 14:35 ` [PATCH v5 4/5] dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Document the missing I3C power source option Claudiu Beznea
2026-08-19 14:35 ` [PATCH v5 5/5] pinctrl: renesas: rzg2l: Add RZ/G3S support for selecting the I3C power source Claudiu Beznea
2026-08-19 14:49   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260819144951.633981F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.