Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Linus Walleij" <linusw@kernel.org>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 18/20] ARM: dts: ux500: Move the pin controller out of the simple bus
Date: Thu, 26 Nov 2026 00:49:17 +0000	[thread overview]
Message-ID: <sashiko-outbox-234502@kernel.org> (raw)
In-Reply-To: <20261126-ux500-dts-after-powerdomains-v1-18-791cd62d8870@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ARM: dts: ux500: pinctrl node before soc breaks
  nmk_pinctrl_probe() GPIO lookup
--

commit fe9e72b390eb8a161cbbc201a9ac8765c960dd3d
Author: Linus Walleij <linusw@kernel.org>

ARM: dts: ux500: Move the pin controller out of the simple bus

This commit moves the pinctrl node and its board-specific extensions out of
the /soc simple-bus node to the root node across the Ux500 device trees.

> diff --git a/arch/arm/boot/dts/st/ste-dbx5x0.dtsi b/arch/arm/boot/dts/st/ste-dbx5x0.dtsi
> index 920d07fbf00e7..05d91367a38af 100644
> --- a/arch/arm/boot/dts/st/ste-dbx5x0.dtsi
> +++ b/arch/arm/boot/dts/st/ste-dbx5x0.dtsi
> @@ -107,6 +107,14 @@ map0 {
>  		};
>  	};
>  
> +	pinctrl: pinctrl {
> +		compatible = "stericsson,db8500-pinctrl";
> +		nomadik-gpio-chips = <&gpio0>, <&gpio1>, <&gpio2>, <&gpio3>,
> +					<&gpio4>, <&gpio5>, <&gpio6>, <&gpio7>,
> +					<&gpio8>;
> +		prcm = <&prcmu>;
> +	};
> +
>  	soc {
>  		#address-cells = <1>;
>  		#size-cells = <1>;

[Severity: High]
Does placing pinctrl before the soc node cause nmk_pinctrl_probe() to
run before the gpio0..gpio8 platform devices exist?

nmk_pinctrl_driver is registered at core_initcall, and nomadik-gpio-chips
is not parsed by fw_devlink.  When of_platform_populate() walks the root
children in DTB order, it creates and probes /pinctrl before descending
into /soc to create gpio0..gpio8.  nmk_gpio_populate_chip() then fails
to find the GPIO platform devices on platform_bus_type:

drivers/pinctrl/nomadik/pinctrl-nomadik.c:nmk_pinctrl_probe() {
    ...
		nmk_chip = nmk_gpio_populate_chip(gpio_fwnode, pdev);
		if (IS_ERR(nmk_chip))
			dev_err(&pdev->dev,
				"could not populate nmk chip struct - continue anyway\n");
    ...
}

Because nmk_pinctrl_probe() continues and registers the pinctrl device
with nmk_gpio_chips[] unpopulated, claiming pinctrl hogs fails with
-EINVAL, and drivers that probe before subsys_initcall(nmk_gpio_init)
(such as the PL011 UART driver at arch_initcall) fail
pinctrl_bind_pins() with -EINVAL.

Placing the pinctrl node after the soc node ensures that the GPIO
platform devices under /soc are registered before /pinctrl is created.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261126-ux500-dts-after-powerdomains-v1-0-791cd62d8870@kernel.org?part=18

  reply	other threads:[~2026-11-26  0:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  0:37 [PATCH 00/20] Clean up Ux500 and Nomadik device trees Linus Walleij
2026-11-26  0:37 ` [PATCH 01/20] ARM: dts: ux500: Give memory nodes their unit address Linus Walleij
2026-11-26  0:37 ` [PATCH 02/20] ARM: dts: ux500: Put CPU cooling properties in a map node Linus Walleij
2026-11-26  0:37 ` [PATCH 03/20] ARM: dts: ux500: Correct HREF thermistor and pin group names Linus Walleij
2026-11-26  0:37 ` [PATCH 04/20] ARM: dts: ux500: Remove bus clock rates from I2C peripheral nodes Linus Walleij
2026-11-26  0:37 ` [PATCH 05/20] ARM: dts: ux500: Use the standard battery chemistry property Linus Walleij
2026-11-26  0:37 ` [PATCH 06/20] ARM: dts: ux500: Correct STUIB magnetometer supply names Linus Walleij
2026-11-26  0:37 ` [PATCH 07/20] ARM: dts: ux500: Encode Sharp proximity hysteresis as bytes Linus Walleij
2026-11-26  0:37 ` [PATCH 08/20] ARM: dts: ux500: Give DSI panels their unit addresses Linus Walleij
2026-11-26  0:37 ` [PATCH 09/20] ARM: dts: ux500: Remove unused IIO channel inheritance on Janice Linus Walleij
2026-11-26  0:37 ` [PATCH 10/20] ARM: dts: ux500: Fix SD regulator node validation Linus Walleij
2026-11-26  0:37 ` [PATCH 11/20] ARM: dts: ux500: Correct GPIO key descriptions Linus Walleij
2026-11-26  0:44   ` sashiko-bot
2026-11-26  0:37 ` [PATCH 12/20] ARM: dts: ux500: Correct the PL011 functional clock names Linus Walleij
2026-11-26  0:37 ` [PATCH 13/20] ARM: dts: ux500: Correct the STMPE interrupt pin property Linus Walleij
2026-11-26  0:37 ` [PATCH 14/20] ARM: dts: ux500: Use valid I2C bus node names Linus Walleij
2026-11-26  0:37 ` [PATCH 15/20] ARM: dts: ux500: Correct memory-mapped controller unit addresses Linus Walleij
2026-11-26  0:37 ` [PATCH 16/20] ARM: dts: nomadik: Correct the camera I2C unit address Linus Walleij
2026-11-26  0:37 ` [PATCH 17/20] ARM: dts: nomadik: Correct controller and clock unit addresses Linus Walleij
2026-11-26  0:48   ` sashiko-bot
2026-11-26  0:37 ` [PATCH 18/20] ARM: dts: ux500: Move the pin controller out of the simple bus Linus Walleij
2026-11-26  0:49   ` sashiko-bot [this message]
2026-11-26  0:37 ` [PATCH 19/20] ARM: dts: ux500: Move addressless devices " Linus Walleij
2026-11-26  0:37 ` [PATCH 20/20] ARM: dts: ux500: Connect the AB8500 ULP PLL supply Linus Walleij
2026-11-26  0:48   ` sashiko-bot

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=sashiko-outbox-234502@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linusw@kernel.org \
    --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