[PATCH v3 0/3] arm64: dts: lx2160a: fix the malformed pinmux entries

Vincent Jardin via B4 Relay posted 3 patches 1 month ago
arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
[PATCH v3 0/3] arm64: dts: lx2160a: fix the malformed pinmux entries
Posted by Vincent Jardin via B4 Relay 1 month ago
Every pinctrl-single,bits entry in the lx2160a pinmux@70010012c node was
reviewed against what pinctrl-single actually accepts in bit-per-mux mode:
 the offset has to name one of the three registers the node maps,
 the mask has to equal pinctrl-single,function-mask shifted to the field,
 the value has to fit inside that mask.

Three entries fail one of those rules, and each fails differently:

  1/3 the three gpio1 groups put the field value at bit 0 instead of at
      the field, so pcs_parse_bits_in_pinctrl_entry() masks it away and
      the mux write does nothing;

  2/3 the two iic1 groups carry a one bit mask, which the driver rejects
      outright with "Invalid submask", dropping both pinctrl states of
      i2c0 along with its bus recovery;

  3/3 iic5-spi3-pins has the field value in the offset cell, leaving an
      invalid offset and a value that selects the neighbouring sdhc1
      function rather than SPI3.

After the series no entry in that node is malformed anymore.

Only 1/3 was sent with the v1, as a single patch. The other two turned up
while checking whether it was the only one of its kind in that node.

They are 3 patches rather than 1 because each fails differently and
each requires the reviewer to check something different:
 1/3 is mask arithmetic,
 3/3 needs the IIC5_PMUX encoding table to confirm which
     function value is right,
 2/3 is a partial revert of a change that was made deliberately.

1/3 and 3/3 share a Fixes: tag and are still not folded together:
  - one is a value that is never shifted into its field,
  - the other is a value that ended up in the offset cell and also names
    the wrong function
and both they touch unrelated pads.

I can squash any of them if you would rather have them merged.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
Changes in v3:
- 2/3: RCWSR14[11:12] are reserved, writing 0 to them is harmless (Josua Mayer)
- Add Reviewed-by from Josua Mayer on 1/3 and 3/3
- Link to v2: https://lore.kernel.org/r/20260824-for-upstream-lx2160a-pinmux-fix-v2-0-0a525d5f4cd5@free.fr

Changes in v2:
- Rebased onto current mainline. fsl-lx2160a.dtsi was renamed to
  fsl-lx216x.dtsi by commit 285560f0d39d ("arm64: dts: lx2160a: split the
  dtsi to avoid delete-property"), which landed in the v7.3 merge window,
  so v1 no longer applied.
- Added 2/3 and 3/3: two more malformed entries in the same pinmux node,
  found by auditing the rest of it.
- Link to v1: https://lore.kernel.org/r/20260824-for-upstream-lx2160a-pinmux-fix-v1-1-33a3c8d5ea8a@free.fr

---
Vincent Jardin (3):
      arm64: dts: lx2160a: fix incorrect pinmux
      arm64: dts: lx2160a: fix IIC1 pinmux submask rejected by pinctrl-single
      arm64: dts: lx2160a: fix the iic5 spi3 pinmux offset and value

 arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
---
base-commit: 0a0d1d55dad570724bf8c7ea83409639cfb4be9b
change-id: 20260824-for-upstream-lx2160a-pinmux-fix-6d09e82bd5cb

Best regards,
-- 
Vincent Jardin <vjardin@free.fr>
Re: [PATCH v3 0/3] arm64: dts: lx2160a: fix the malformed pinmux entries
Posted by Frank.Li@oss.nxp.com 3 weeks, 4 days ago
From: Frank Li <Frank.Li@nxp.com>


On Mon, 24 Aug 2026 23:25:28 +0200, Vincent Jardin wrote:
> Every pinctrl-single,bits entry in the lx2160a pinmux@70010012c node was
> reviewed against what pinctrl-single actually accepts in bit-per-mux mode:
>  the offset has to name one of the three registers the node maps,
>  the mask has to equal pinctrl-single,function-mask shifted to the field,
>  the value has to fit inside that mask.
>
> Three entries fail one of those rules, and each fails differently:
>
> [...]

Applied to imx/fixes, thanks!

[1/3] arm64: dts: lx2160a: fix incorrect pinmux
      commit: 8188a59dd6782786556b18f515090b79cb701c45
[2/3] arm64: dts: lx2160a: fix IIC1 pinmux submask rejected by pinctrl-single
      commit: 6affdda171ca8f2e082e8c4fba56233a2f8c9910
[3/3] arm64: dts: lx2160a: fix the iic5 spi3 pinmux offset and value
      commit: f14f4dc8ea3810f8ed4f0f3ea13f8bba3e2b0f04

Best regards,
--
Frank Li <Frank.Li@nxp.com>