From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Vincent Jardin <vjardin@free.fr>
Cc: Dong Aisheng <aisheng.dong@nxp.com>,
Fabio Estevam <festevam@gmail.com>, Frank Li <Frank.Li@nxp.com>,
Jacky Bai <ping.bai@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
NXP S32 Linux Team <s32@nxp.com>,
Linus Walleij <linusw@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: Re: [PATCH v6 4/5] pinctrl: freescale: add the Layerscape RCW pad-mux driver
Date: Tue, 17 Nov 2026 23:02:07 +0200 [thread overview]
Message-ID: <avykU0WMTq24_xkR@lxl00025.wbi.nxp.com> (raw)
In-Reply-To: <avyEUKJBiDwxpLt7@L23803.iliad.fr>
On Tue, Nov 17, 2026 at 05:44:00PM +0100, Vincent Jardin wrote:
> Hi Vladimir,
>
> > The "i2c" and "gpio" functions of lx2160a_sdhc2_data74_funcs[] here
> > hides some real unpleasantness. These 4 pins either get all assigned to
> > I2C7_SCL, I2C7_SDA, I2C8_SCL, I2C8_SDA, or they get all assigned to GPIO.
> > But they cannot be assigned in pairs of two (or individually, i.o.w. not
> > in the granularity we need), which makes independent I2C bus recovery
> > practically impossible (i2c6 as I2C while i2c7 is as GPIO).
>
> yep, the doc is clear about it: SDHC2_DAT74_PMUX is a single field for
> the 4 pads, 0b001 gives GPIO_2[18:15] and 0b010 gives IIC7 and IIC8
> together (RM rev 1, 4.9.8.9). IIC7 and IIC8 are not available on any
> other pad.
>
> Checking from other angles, the A-010650 workaround uses one write for both
> buses: 0x700100130 = RegA OR 0x031. That mask looks wrong to me though: bits 5:4
> belong to SDHC2_BASE_PMUX, and OR-ing 0x001 onto 0b010 gives the reserved
> 0b011. Could someone at NXP have a look ?
>
> > The way the code is currently written, the pin_request() call will fail here:
>
> Yes, in fact, it is not new with this series: both nodes have shared the
> same setting since
> 8a1365c7bbc1 ("arm64: dts: lx2160a: add pinmux and i2c gpio to support bus recovery")
> from Carlos Song (NXP) where the two pinctrl-single states covered the same
> bits, so the second controller would have failed the same way. Wihtin the
> kernel, there is no board that enables i2c6 or i2c7, so nobody did hit it!
>
> > Due to the fundamental issue of this limitation, I don't think it makes
> > sense to have the pinctrl states described in fsl-lx216x.dtsi for i2c6
> > and i2c7. Perhaps you could remove them in another change (either as a
> > follow-up, or another patch in v7 if you need to resend).
>
> Done for v7 as an additional patch: the DTS drops pinctrl-names, pinctrl-0/1
> and scl/sda-gpios from i2c6 and i2c7, and the two states nothing else uses.
> A board that needs one of these buses can add its own states, or set the
> field once with a hog on the pad-mux node.
I'm not entirely happy with my own suggestion either, I'll comment more
on v7.
>
> I tested on my board for regressions, since there those 4 pads carry
> the eMMC DAT[7:4]: the other I2C buses still set up their GPIO recovery,
> and the eMMC still runs in 8-bit HS400.
>
> I also went through the other fields. 7 more settings mix two
> controllers the same way:
> - flextimer on iic2, irq3-0, irq7-4, evt4-3 and evt2-0 (FTM1 and FTM2 channels)
> - sdhc-spi on sdhc1-base (SDHC1 with SPI3_PCS0) and usb on usb-ext (USB1 and USB2)
> No dts claims any of them.
>
> About your previous comment on clk-out: v7 names encoding 0 "clk-out".
> On my board, with debugfs, it shows now:
>
> pin 20 (evt2-0) 0:? evt
> pin 21 (clk-out) 0:? clk-out
> pin 22 (asleep) 0:? asleep
>
> and the U-Boot port of this driver shows "clk-out : clk-out" in
> "pinmux status".
> My take: the reserved marking comes from RM rev 1: its revision history
> says "Updated 0b000 as reserved" and the CLK_OUT configuration section was
> removed, while table 19 still lists 000 (CLK_OUT).
>
> There is a similar gap on EC1: the signal tables list CLK_OUT2 on
> EC1_TXD0/GPIO4_DAT03, but EC1_PMUX only has 0b00 RGMII and 0b01 GPIO,
> 0b10 and 0b11 being reserved. Would you know which value selects CLK_OUT2 ?
These are good questions. I've opened a ticket internally and I'm hoping
to get some answers regarding the correctness of the documented A-010650
workaround procedure and the CLK_OUT/CLK_OUT2 signals, which are in a weird
superposition of documented and not documented at the same time.
next prev parent reply other threads:[~2026-11-17 21:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 13:27 [PATCH v6 0/5] lx2160a: change the pad muxes through the RCW override Vincent Jardin via B4 Relay
2026-11-15 13:27 ` [PATCH v6 1/5] dt-bindings: pinctrl: add the NXP LX2160A RCW pad mux Vincent Jardin via B4 Relay
2026-11-16 17:02 ` Frank Li
2026-11-15 13:27 ` [PATCH v6 2/5] dt-bindings: soc: fsl: layerscape-dcfg: add the LX2160A pad-mux child Vincent Jardin via B4 Relay
2026-11-16 17:04 ` Frank Li
2026-11-15 13:27 ` [PATCH v6 3/5] soc: fsl: guts: add the RCW override of the pad muxes Vincent Jardin via B4 Relay
2026-11-16 17:08 ` Frank Li
2026-11-16 17:29 ` Vincent Jardin
2026-11-26 1:02 ` Linus Walleij
2026-11-26 2:36 ` Frank Li
2026-11-15 13:27 ` [PATCH v6 4/5] pinctrl: freescale: add the Layerscape RCW pad-mux driver Vincent Jardin via B4 Relay
2026-11-16 17:12 ` Frank Li
2026-11-16 17:36 ` Vladimir Oltean
2026-11-16 18:51 ` Vincent Jardin
2026-11-16 21:15 ` Vladimir Oltean
2026-11-17 16:44 ` Vincent Jardin
2026-11-17 21:02 ` Vladimir Oltean [this message]
2026-11-15 13:27 ` [PATCH v6 5/5] arm64: dts: lx2160a: describe the pad muxes as the DCFG RCW override Vincent Jardin via B4 Relay
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=avykU0WMTq24_xkR@lxl00025.wbi.nxp.com \
--to=vladimir.oltean@nxp.com \
--cc=Frank.Li@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=chleroy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=ioana.ciornei@nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=ping.bai@nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=s32@nxp.com \
--cc=shawnguo@kernel.org \
--cc=vjardin@free.fr \
/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
all inboxes | Powered by JetHome®