* [PATCH v2 1/3] arm64: dts: lx2160a: fix incorrect pinmux
2026-08-24 13:12 [PATCH v2 0/3] arm64: dts: lx2160a: fix the malformed pinmux entries Vincent Jardin via B4 Relay
@ 2026-08-24 13:12 ` Vincent Jardin via B4 Relay
2026-08-24 15:47 ` Josua Mayer
2026-08-24 13:12 ` [PATCH v2 2/3] arm64: dts: lx2160a: fix IIC1 pinmux submask rejected by pinctrl-single Vincent Jardin via B4 Relay
2026-08-24 13:12 ` [PATCH v2 3/3] arm64: dts: lx2160a: fix the iic5 spi3 pinmux offset and value Vincent Jardin via B4 Relay
2 siblings, 1 reply; 8+ messages in thread
From: Vincent Jardin via B4 Relay @ 2026-08-24 13:12 UTC (permalink / raw)
To: Frank Li, Carlos Song, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Josua Mayer
Cc: imx, linux-arm-kernel, devicetree, linux-kernel, Thibaut Collet,
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")
Suggested-by: Thibaut Collet <thbt.cllt@gmail.com>
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
index ae6e37870c5e5..d4522a19405a9 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
@@ -1622,7 +1622,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 {
@@ -1630,7 +1630,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 {
@@ -1638,7 +1638,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 {
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v2 1/3] arm64: dts: lx2160a: fix incorrect pinmux
2026-08-24 13:12 ` [PATCH v2 1/3] arm64: dts: lx2160a: fix incorrect pinmux Vincent Jardin via B4 Relay
@ 2026-08-24 15:47 ` Josua Mayer
0 siblings, 0 replies; 8+ messages in thread
From: Josua Mayer @ 2026-08-24 15:47 UTC (permalink / raw)
To: vjardin@free.fr, Frank Li, Carlos Song, 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,
Thibaut Collet
Am 24.08.26 um 15:12 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")
> Suggested-by: Thibaut Collet <thbt.cllt@gmail.com>
> Signed-off-by: Vincent Jardin <vjardin@free.fr>
> ---
> arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
> index ae6e37870c5e5..d4522a19405a9 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
> @@ -1622,7 +1622,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 {
> @@ -1630,7 +1630,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 {
> @@ -1638,7 +1638,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 {
>
Reviewed-by: Josua Mayer <josua@solid-run.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] arm64: dts: lx2160a: fix IIC1 pinmux submask rejected by pinctrl-single
2026-08-24 13:12 [PATCH v2 0/3] arm64: dts: lx2160a: fix the malformed pinmux entries Vincent Jardin via B4 Relay
2026-08-24 13:12 ` [PATCH v2 1/3] arm64: dts: lx2160a: fix incorrect pinmux Vincent Jardin via B4 Relay
@ 2026-08-24 13:12 ` Vincent Jardin via B4 Relay
2026-08-24 15:52 ` Josua Mayer
2026-08-24 13:12 ` [PATCH v2 3/3] arm64: dts: lx2160a: fix the iic5 spi3 pinmux offset and value Vincent Jardin via B4 Relay
2 siblings, 1 reply; 8+ messages in thread
From: Vincent Jardin via B4 Relay @ 2026-08-24 13:12 UTC (permalink / raw)
To: Frank Li, Carlos Song, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Josua Mayer
Cc: imx, linux-arm-kernel, devicetree, linux-kernel, Thibaut Collet,
Vincent Jardin
From: Vincent Jardin <vjardin@free.fr>
IIC1_PMUX is a single bit field at RCWSR14 bit 10, so the mask for the
two iic1 pinmux nodes was narrowed from 0x7 to 0x1 to avoid writing the
two reserved bits next to it.
With pinctrl-single,bit-per-mux the driver does not take the supplied
mask as the bits to modify. It derives the field from the node's
pinctrl-single,function-mask, which is 0x7 here, and then requires the
supplied mask to match it exactly:
bit_pos = __ffs(mask); /* 10 */
mask_pos = ((pcs->fmask) << bit_pos); /* 0x7 << 10 = 0x1c00 */
submask = mask & mask_pos; /* 0x400 */
...
if (submask != mask_pos) {
dev_warn(pcs->dev,
"Invalid submask 0x%x for %pOFn at 0x%x\n",
submask, np, offset);
continue;
}
A one bit mask gives submask 0x400 against mask_pos 0x1c00, so both
nodes are rejected and the pins are never muxed with this message:
pinctrl-single 70010012c.pinmux: Invalid submask 0x400 for iic1-i2c-pins
pinctrl-single 70010012c.pinmux: Invalid submask 0x400 for iic1-gpio-pins
The values are not changed:
- 0x0 selects IIC1
- 0x1 << 10 selects GPIO_1[3:2].
Fixes: 7a3cc49ad1fc ("arm64: dts: lx2160a: change i2c0 (iic1) pinmux mask to one bit")
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
index d4522a19405a9..fae705dd07669 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
@@ -1688,11 +1688,11 @@ i2c6_i2c7_pins: iic8-iic7-i2c-pins {
/* RCWSR14 */
i2c0_pins: iic1-i2c-pins {
- pinctrl-single,bits = <0x8 0x0 (0x1 << 10)>;
+ pinctrl-single,bits = <0x8 0x0 (0x7 << 10)>;
};
gpio0_3_2_pins: iic1-gpio-pins {
- pinctrl-single,bits = <0x8 (0x1 << 10) (0x1 << 10)>;
+ pinctrl-single,bits = <0x8 (0x1 << 10) (0x7 << 10)>;
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v2 2/3] arm64: dts: lx2160a: fix IIC1 pinmux submask rejected by pinctrl-single
2026-08-24 13:12 ` [PATCH v2 2/3] arm64: dts: lx2160a: fix IIC1 pinmux submask rejected by pinctrl-single Vincent Jardin via B4 Relay
@ 2026-08-24 15:52 ` Josua Mayer
2026-08-24 21:30 ` Vincent Jardin
0 siblings, 1 reply; 8+ messages in thread
From: Josua Mayer @ 2026-08-24 15:52 UTC (permalink / raw)
To: vjardin@free.fr, Frank Li, Carlos Song, 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,
Thibaut Collet
Am 24.08.26 um 15:12 schrieb Vincent Jardin via B4 Relay:
> From: Vincent Jardin <vjardin@free.fr>
>
> IIC1_PMUX is a single bit field at RCWSR14 bit 10, so the mask for the
> two iic1 pinmux nodes was narrowed from 0x7 to 0x1 to avoid writing the
> two reserved bits next to it.
>
> With pinctrl-single,bit-per-mux the driver does not take the supplied
> mask as the bits to modify. It derives the field from the node's
> pinctrl-single,function-mask, which is 0x7 here, and then requires the
> supplied mask to match it exactly:
>
> bit_pos = __ffs(mask); /* 10 */
> mask_pos = ((pcs->fmask) << bit_pos); /* 0x7 << 10 = 0x1c00 */
> submask = mask & mask_pos; /* 0x400 */
> ...
> if (submask != mask_pos) {
> dev_warn(pcs->dev,
> "Invalid submask 0x%x for %pOFn at 0x%x\n",
> submask, np, offset);
> continue;
> }
>
> A one bit mask gives submask 0x400 against mask_pos 0x1c00, so both
> nodes are rejected and the pins are never muxed with this message:
>
> pinctrl-single 70010012c.pinmux: Invalid submask 0x400 for iic1-i2c-pins
> pinctrl-single 70010012c.pinmux: Invalid submask 0x400 for iic1-gpio-pins
>
> The values are not changed:
> - 0x0 selects IIC1
> - 0x1 << 10 selects GPIO_1[3:2].
>
> Fixes: 7a3cc49ad1fc ("arm64: dts: lx2160a: change i2c0 (iic1) pinmux mask to one bit")
> Signed-off-by: Vincent Jardin <vjardin@free.fr>
> ---
> arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
> index d4522a19405a9..fae705dd07669 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
> @@ -1688,11 +1688,11 @@ i2c6_i2c7_pins: iic8-iic7-i2c-pins {
>
> /* RCWSR14 */
> i2c0_pins: iic1-i2c-pins {
> - pinctrl-single,bits = <0x8 0x0 (0x1 << 10)>;
> + pinctrl-single,bits = <0x8 0x0 (0x7 << 10)>;
> };
>
> gpio0_3_2_pins: iic1-gpio-pins {
> - pinctrl-single,bits = <0x8 (0x1 << 10) (0x1 << 10)>;
Perhaps add a short comment here on reserved bits, e.g.:
> LX2160A RM describes bits 11 and 12 as reserved, but writing 0 to them was confirmed harmless.
Feel free to rephrase.
> + pinctrl-single,bits = <0x8 (0x1 << 10) (0x7 << 10)>;
> };
> };
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2 2/3] arm64: dts: lx2160a: fix IIC1 pinmux submask rejected by pinctrl-single
2026-08-24 15:52 ` Josua Mayer
@ 2026-08-24 21:30 ` Vincent Jardin
0 siblings, 0 replies; 8+ messages in thread
From: Vincent Jardin @ 2026-08-24 21:30 UTC (permalink / raw)
To: Josua Mayer
Cc: Frank Li, Carlos Song, 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,
Thibaut Collet
Hi Josua,
> >
> > gpio0_3_2_pins: iic1-gpio-pins {
> > - pinctrl-single,bits = <0x8 (0x1 << 10) (0x1 << 10)>;
>
> Perhaps add a short comment here on reserved bits, e.g.:
>
> "LX2160A RM describes bits 11 and 12 as reserved, but writing 0 to them was confirmed harmless."
>
> Feel free to rephrase.
Done into the v3:
https://lore.kernel.org/all/20260824-for-upstream-lx2160a-pinmux-fix-v3-2-5556ff1e6be2@free.fr/
Thank you also for the Reviewed-by on 1/3 and 3/3, v3 includes your Reviewed-by,
Vincent
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] arm64: dts: lx2160a: fix the iic5 spi3 pinmux offset and value
2026-08-24 13:12 [PATCH v2 0/3] arm64: dts: lx2160a: fix the malformed pinmux entries Vincent Jardin via B4 Relay
2026-08-24 13:12 ` [PATCH v2 1/3] arm64: dts: lx2160a: fix incorrect pinmux Vincent Jardin via B4 Relay
2026-08-24 13:12 ` [PATCH v2 2/3] arm64: dts: lx2160a: fix IIC1 pinmux submask rejected by pinctrl-single Vincent Jardin via B4 Relay
@ 2026-08-24 13:12 ` Vincent Jardin via B4 Relay
2026-08-24 16:24 ` Josua Mayer
2 siblings, 1 reply; 8+ messages in thread
From: Vincent Jardin via B4 Relay @ 2026-08-24 13:12 UTC (permalink / raw)
To: Frank Li, Carlos Song, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Josua Mayer
Cc: imx, linux-arm-kernel, devicetree, linux-kernel, Thibaut Collet,
Vincent Jardin
From: Vincent Jardin <vjardin@free.fr>
The iic5-spi3-pins node has both of its first two cells wrong.
The offset selects the register within the node's reg range, where:
0x0 is RCWSR12,
0x4 is RCWSR13,
0x8 is RCWSR14.
An offset of 0x3 is not one of them and is not even aligned for the
declared 32 bit register width. It is the only node in this pinmux that
does not use 0x0, 0x4 neither 0x8.
The value is wrong too:
IIC5_PMUX is RCWSR12[11:9] and it encodes 0b000 for IIC5,
0b001 for GPIO_1[25:24],
0b010 for SDHC1_CLK_SYNC_OUT/IN,
0b011 for {IIC5_SCL,IIC5_SDA} = {SPI3_SOUT,SPI3_SIN}.
This node selects the last of those, so it needs 0x3, not the 0x2, which
is the value of the neighbouring sdhc1 clock sync node it was copied
from.
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-lx216x.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
index fae705dd07669..bf5d9b671d858 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
@@ -1602,7 +1602,7 @@ esdhc0_clksync_pins: iic5-sdhc-clk-pins {
};
dspi2_miso_mosi_pins: iic5-spi3-pins {
- pinctrl-single,bits = <0x3 (0x2 << 9) (0x7 << 9)>;
+ pinctrl-single,bits = <0x0 (0x3 << 9) (0x7 << 9)>;
};
i2c5_pins: iic6-i2c-pins {
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v2 3/3] arm64: dts: lx2160a: fix the iic5 spi3 pinmux offset and value
2026-08-24 13:12 ` [PATCH v2 3/3] arm64: dts: lx2160a: fix the iic5 spi3 pinmux offset and value Vincent Jardin via B4 Relay
@ 2026-08-24 16:24 ` Josua Mayer
0 siblings, 0 replies; 8+ messages in thread
From: Josua Mayer @ 2026-08-24 16:24 UTC (permalink / raw)
To: vjardin@free.fr, Frank Li, Carlos Song, 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,
Thibaut Collet
Am 24.08.26 um 15:12 schrieb Vincent Jardin via B4 Relay:
> From: Vincent Jardin <vjardin@free.fr>
>
> The iic5-spi3-pins node has both of its first two cells wrong.
>
> The offset selects the register within the node's reg range, where:
> 0x0 is RCWSR12,
> 0x4 is RCWSR13,
> 0x8 is RCWSR14.
>
> An offset of 0x3 is not one of them and is not even aligned for the
> declared 32 bit register width. It is the only node in this pinmux that
> does not use 0x0, 0x4 neither 0x8.
>
> The value is wrong too:
> IIC5_PMUX is RCWSR12[11:9] and it encodes 0b000 for IIC5,
> 0b001 for GPIO_1[25:24],
> 0b010 for SDHC1_CLK_SYNC_OUT/IN,
> 0b011 for {IIC5_SCL,IIC5_SDA} = {SPI3_SOUT,SPI3_SIN}.
>
> This node selects the last of those, so it needs 0x3, not the 0x2, which
> is the value of the neighbouring sdhc1 clock sync node it was copied
> from.
>
> 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-lx216x.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
> index fae705dd07669..bf5d9b671d858 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi
> @@ -1602,7 +1602,7 @@ esdhc0_clksync_pins: iic5-sdhc-clk-pins {
> };
>
> dspi2_miso_mosi_pins: iic5-spi3-pins {
> - pinctrl-single,bits = <0x3 (0x2 << 9) (0x7 << 9)>;
> + pinctrl-single,bits = <0x0 (0x3 << 9) (0x7 << 9)>;
> };
>
> i2c5_pins: iic6-i2c-pins {
>
Reviewed-by: Josua Mayer <josua@solid-run.com>
Thanks for checking all these!
^ permalink raw reply [flat|nested] 8+ messages in thread