Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "David Lechner (TI)" <dlechner@baylibre.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges
Date: Tue, 28 Jul 2026 19:57:05 +0000	[thread overview]
Message-ID: <20260728195706.3D5C41F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260728-arm-dts-beagleyai-gpio-info-v1-1-783ec90d54da@baylibre.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding `pinctrl-single,gpio-range` on K3 platforms causes dynamic GPIO requests to silently overwrite the entire pad configuration register, destroying previously applied board-specific settings like pull-ups and drive strengths.
--

--- Patch [1]: [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges ---
commit c5d1a1cd5d0bb91d0c680ae90328952c44500103
Author: David Lechner (TI) <dlechner@baylibre.com>

arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges

Add pinctrl-single,gpio-range properties to the BeagleY-AI .dts so that
GPIOs get the correct pin mux when requested.

> diff --git a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
> index 5255e04b9ac76..599d576f694f6 100644
> --- a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
> @@ -149,6 +149,19 @@ led-1 {
>  };
>  
>  &main_pmx0 {
> +	pinctrl-single,gpio-range =
> +		<&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>,
> +		<&main_pmx0_range 33 38 PIN_GPIO_RANGE_IOPAD>,

[Severity: High]
Does adding pinctrl-single,gpio-range here cause dynamic GPIO requests to
silently overwrite the entire pad configuration register?

On K3 platforms, the pinctrl-single,function-mask is typically <0xffffffff>,
meaning the pad electrical properties and mux mode share the same register.
When a GPIO in these ranges is requested via gpiod_get(), the gpiolib path
calls the pinctrl driver's pcs_request_gpio().

Since the function mask is 0xffffffff, pcs_request_gpio() will execute:

    data &= ~pcs->fmask;
    data |= frange->gpiofunc;

Could this completely erase any previously applied board-specific settings
like pull-ups or drive strengths from a device's pinctrl-0 property, and
replace them with PIN_GPIO_RANGE_IOPAD (which includes PULL_DISABLE)?

[ ... ]

> @@ -267,6 +280,15 @@ &main_uart0 {
>  };
>  
>  &mcu_pmx0 {
> +	pinctrl-single,gpio-range =
> +		<&mcu_pmx_range 0 21 PIN_GPIO_RANGE_IOPAD>,
> +		<&mcu_pmx_range 23 1 PIN_GPIO_RANGE_IOPAD>,

[Severity: High]
Will this have the same pad configuration overwrite issue for the MCU domain
GPIOs when requested?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260728-arm-dts-beagleyai-gpio-info-v1-0-783ec90d54da@baylibre.com?part=1

  reply	other threads:[~2026-07-28 19:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 19:44 [PATCH 0/2] arm64: dts: ti: k3-am67a-beagley-ai: GPIO improvements David Lechner (TI)
2026-07-28 19:44 ` [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges David Lechner (TI)
2026-07-28 19:57   ` sashiko-bot [this message]
2026-07-28 21:30     ` David Lechner
2026-07-28 19:44 ` [PATCH 2/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio line names David Lechner (TI)
2026-07-29 14:07   ` Robert Nelson
2026-07-29  9:57 ` [PATCH 0/2] arm64: dts: ti: k3-am67a-beagley-ai: GPIO improvements Vignesh Raghavendra
2026-07-29 13:57   ` David Lechner
2026-07-29 14:05     ` Robert Nelson
2026-07-30  4:55     ` Vignesh Raghavendra
2026-08-04  5:06 ` (subset) " Vignesh Raghavendra

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=20260728195706.3D5C41F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox