[PATCH v2 0/3] arm64: dts: lx2160a: fix the malformed pinmux entries
Vincent Jardin <[email protected]>
| Newsgroups | org.kernel.feeds.b4-sent,dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <20260824-for-upstream-lx2160a-pinmux-fix-v2-0-0a525d5f4cd5@free.fr> |
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 <[email protected]>
---
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 | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
base-commit: 0a0d1d55dad570724bf8c7ea83409639cfb4be9b
change-id: 20260824-for-upstream-lx2160a-pinmux-fix-6d09e82bd5cb
Best regards,
--
Vincent Jardin <[email protected]>