Devicetree
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: lx2160a: fix incorrect pinmux
@ 2026-08-23 22:24 Vincent Jardin via B4 Relay
  2026-08-23 22:35 ` sashiko-bot
  2026-08-24 11:47 ` Josua Mayer
  0 siblings, 2 replies; 5+ messages in thread
From: Vincent Jardin via B4 Relay @ 2026-08-23 22:24 UTC (permalink / raw)
  To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Josua Mayer
  Cc: imx, linux-arm-kernel, devicetree, linux-kernel, Vincent Jardin

From: Vincent Jardin <vjardin@free.fr>

For gpio1 value set for pinctrl is outside the mask and so will do
nothing.
Add the missing offset for value field to be the same as the mask as
expected.

Fixes: 284ad7064aaa ("arm64: dts: lx2160a: complete pinmux for rcwsr12 configuration word")
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
index 1d73abffa6b7..b9f079c49e19 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
@@ -1803,7 +1803,7 @@ fspi_data74_pins: xspi1-data74-pins {
 			};
 
 			gpio1_31_28_pins: xspi1-data74-gpio-pins {
-				pinctrl-single,bits = <0x0 0x1 (0x7 << 15)>;
+				pinctrl-single,bits = <0x0 (0x1 << 15) (0x7 << 15)>;
 			};
 
 			fspi_data30_pins: xspi1-data30-pins {
@@ -1811,7 +1811,7 @@ fspi_data30_pins: xspi1-data30-pins {
 			};
 
 			gpio1_27_24_pins: xspi1-data30-gpio-pins {
-				pinctrl-single,bits = <0x0 0x1 (0x7 << 18)>;
+				pinctrl-single,bits = <0x0 (0x1 << 18) (0x7 << 18)>;
 			};
 
 			fspi_dqs_sck_cs10_pins: xspi1-base-pins {
@@ -1819,7 +1819,7 @@ fspi_dqs_sck_cs10_pins: xspi1-base-pins {
 			};
 
 			gpio1_23_20_pins: xspi1-base-gpio-pins {
-				pinctrl-single,bits = <0x0 0x1 (0x7 << 21)>;
+				pinctrl-single,bits = <0x0 (0x1 << 21) (0x7 << 21)>;
 			};
 
 			esdhc0_cmd_data30_clk_vsel_pins: sdhc1-base-sdhc-vsel-pins {

---
base-commit: 3d6d817622b0a9721e3cc404df3469171582be13
change-id: 20260824-for-upstream-lx2160a-pinmux-fix-6d09e82bd5cb

Best regards,
-- 
Vincent Jardin <vjardin@free.fr>



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: lx2160a: fix incorrect pinmux
  2026-08-23 22:24 [PATCH] arm64: dts: lx2160a: fix incorrect pinmux Vincent Jardin via B4 Relay
@ 2026-08-23 22:35 ` sashiko-bot
  2026-08-24 13:14   ` Vincent Jardin
  2026-08-24 11:47 ` Josua Mayer
  1 sibling, 1 reply; 5+ messages in thread
From: sashiko-bot @ 2026-08-23 22:35 UTC (permalink / raw)
  To: Vincent Jardin; +Cc: robh, imx, conor+dt, devicetree, Frank.Li

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

Pre-existing issues:
- [High] The pinctrl offset for `dspi2_miso_mosi_pins` is set to `0x3`, which is unaligned for a 32-bit register width, triggering a synchronous alignment fault on ARM64.
- [High] Pinmux nodes `i2c0_pins` and `gpio0_3_2_pins` specify an incomplete 1-bit mask (`0x1 << 10`), causing the `pinctrl-single` driver to silently reject them.
--

--- Patch [1]: [PATCH] arm64: dts: lx2160a: fix incorrect pinmux ---
commit 361d41dcf4495f73be88ba1bf5234be91b377473
Author: Vincent Jardin <vjardin@free.fr>

arm64: dts: lx2160a: fix incorrect pinmux
    
For gpio1 value set for pinctrl is outside the mask and so will do
nothing. Add the missing offset for value field to be the same as the
mask as expected.

Fixes: 284ad7064aaa ("arm64: dts: lx2160a: complete pinmux for rcwsr12 configuration word")
Signed-off-by: Vincent Jardin <vjardin@free.fr>

> diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
> index 1d73abffa6b72..b9f079c49e193 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi

[ ... ]

[Severity: High]
This isn't a bug introduced by this patch, but is the pinctrl offset unaligned
for dspi2_miso_mosi_pins?

arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi:dspi2_miso_mosi_pins {
    ...
    pinctrl-single,bits = <0x3 (0x2 << 9) (0x7 << 9)>;
    ...
}

The pinctrl-single driver uses 32-bit accessors when the register width is 32.
Since the base offset is 0x3, this results in an unaligned I/O access on
arm64, which triggers a synchronous alignment fault.

Could this have been a typo for <0x0 (0x3 << 9) (0x7 << 9)>?

[Severity: High]
This is a pre-existing issue, but does this incomplete mask cause the pin
configuration to be skipped entirely?

arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi:i2c0_pins {
    ...
    pinctrl-single,bits = <0x8 0x0 (0x1 << 10)>;
    ...
}

This also appears in gpio0_3_2_pins:

arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi:gpio0_3_2_pins {
    ...
    pinctrl-single,bits = <0x8 (0x1 << 10) (0x1 << 10)>;
    ...
}

Looking at the pinctrl-single driver, it strictly validates that the supplied
mask matches the hardware function mask shifted to the pin's bit position:

drivers/pinctrl/pinctrl-single.c:pcs_parse_bits_in_pinctrl_entry() {
    ...
    if (submask != mask_pos) {
        dev_warn(pcs->dev,
                "Invalid submask 0x%x for %pOFn at 0x%x\n",
                submask, np, offset);
        continue;
    }
    ...
}

Since the function mask is 0x7, mask_pos would be 0x1c00 (0x7 << 10), but the
supplied mask is 0x400 (0x1 << 10).

Because these do not match, does the driver log an invalid submask warning and
skip configuring the pin?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260824-for-upstream-lx2160a-pinmux-fix-v1-1-33a3c8d5ea8a@free.fr?part=1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: lx2160a: fix incorrect pinmux
  2026-08-23 22:24 [PATCH] arm64: dts: lx2160a: fix incorrect pinmux Vincent Jardin via B4 Relay
  2026-08-23 22:35 ` sashiko-bot
@ 2026-08-24 11:47 ` Josua Mayer
  2026-08-24 13:15   ` Vincent Jardin
  1 sibling, 1 reply; 5+ messages in thread
From: Josua Mayer @ 2026-08-24 11:47 UTC (permalink / raw)
  To: vjardin@free.fr, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org

Am 24.08.26 um 00:24 schrieb Vincent Jardin via B4 Relay:
> From: Vincent Jardin <vjardin@free.fr>
>
> For gpio1 value set for pinctrl is outside the mask and so will do
> nothing.
> Add the missing offset for value field to be the same as the mask as
> expected.
>
> Fixes: 284ad7064aaa ("arm64: dts: lx2160a: complete pinmux for rcwsr12 configuration word")
> Signed-off-by: Vincent Jardin <vjardin@free.fr>
> ---
>  arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
> index 1d73abffa6b7..b9f079c49e19 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
> @@ -1803,7 +1803,7 @@ fspi_data74_pins: xspi1-data74-pins {
>  			};
>  
>  			gpio1_31_28_pins: xspi1-data74-gpio-pins {
> -				pinctrl-single,bits = <0x0 0x1 (0x7 << 15)>;
> +				pinctrl-single,bits = <0x0 (0x1 << 15) (0x7 << 15)>;
>  			};
>  
>  			fspi_data30_pins: xspi1-data30-pins {
> @@ -1811,7 +1811,7 @@ fspi_data30_pins: xspi1-data30-pins {
>  			};
>  
>  			gpio1_27_24_pins: xspi1-data30-gpio-pins {
> -				pinctrl-single,bits = <0x0 0x1 (0x7 << 18)>;
> +				pinctrl-single,bits = <0x0 (0x1 << 18) (0x7 << 18)>;
>  			};
>  
>  			fspi_dqs_sck_cs10_pins: xspi1-base-pins {
> @@ -1819,7 +1819,7 @@ fspi_dqs_sck_cs10_pins: xspi1-base-pins {
>  			};
>  
>  			gpio1_23_20_pins: xspi1-base-gpio-pins {
> -				pinctrl-single,bits = <0x0 0x1 (0x7 << 21)>;
> +				pinctrl-single,bits = <0x0 (0x1 << 21) (0x7 << 21)>;
>  			};
>  
>  			esdhc0_cmd_data30_clk_vsel_pins: sdhc1-base-sdhc-vsel-pins {
>
> ---
> base-commit: 3d6d817622b0a9721e3cc404df3469171582be13
> change-id: 20260824-for-upstream-lx2160a-pinmux-fix-6d09e82bd5cb
>
> Best regards,
Thanks!

Reviewed-by: Josua Mayer <josua@solid-run.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: lx2160a: fix incorrect pinmux
  2026-08-23 22:35 ` sashiko-bot
@ 2026-08-24 13:14   ` Vincent Jardin
  0 siblings, 0 replies; 5+ messages in thread
From: Vincent Jardin @ 2026-08-24 13:14 UTC (permalink / raw)
  To: sashiko-reviews; +Cc: robh, imx, conor+dt, devicetree, Frank.Li

Hi bot,

Le 23/08/26 22:35, sashiko-bot@kernel.org a écrit :
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> 
> Pre-existing issues:
> - [High] The pinctrl offset for `dspi2_miso_mosi_pins` is set to `0x3`, which is unaligned for a 32-bit register width, triggering a synchronous alignment fault on ARM64.
> - [High] Pinmux nodes `i2c0_pins` and `gpio0_3_2_pins` specify an incomplete 1-bit mask (`0x1 << 10`), causing the `pinctrl-single` driver to silently reject them.

I did send a v2 on some topics:
  https://lore.kernel.org/all/20260824-for-upstream-lx2160a-pinmux-fix-v2-0-0a525d5f4cd5@free.fr/

The issues were not introduced by this commit but they deserved a review/fixe too.

best regards,
  Vincent

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: lx2160a: fix incorrect pinmux
  2026-08-24 11:47 ` Josua Mayer
@ 2026-08-24 13:15   ` Vincent Jardin
  0 siblings, 0 replies; 5+ messages in thread
From: Vincent Jardin @ 2026-08-24 13:15 UTC (permalink / raw)
  To: Josua Mayer
  Cc: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org

Hi Josua,

> Reviewed-by: Josua Mayer <josua@solid-run.com>

Sorry, I did miss your review while doing a v2 based on the Bot's comments.
Please, can you resubmit your reviewed by on this serie:
  https://lore.kernel.org/all/20260824-for-upstream-lx2160a-pinmux-fix-v2-0-0a525d5f4cd5@free.fr/
?

thank you,
  Vincent

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-24 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-23 22:24 [PATCH] arm64: dts: lx2160a: fix incorrect pinmux Vincent Jardin via B4 Relay
2026-08-23 22:35 ` sashiko-bot
2026-08-24 13:14   ` Vincent Jardin
2026-08-24 11:47 ` Josua Mayer
2026-08-24 13:15   ` Vincent Jardin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox