Re: [PATCH v6 4/5] pinctrl: freescale: add the Layerscape RCW pad-mux driver

From: Vladimir Oltean

Date: Mon Nov 16 2026 - 12:36:32 EST


On Sun, Nov 15, 2026 at 02:27:34PM +0100, Vincent Jardin via B4 Relay wrote:
> +static const struct rcw_pmux_func lx2160a_clk_out_funcs[] = {
> + RCW_PMUX_FUNC("gpio", 1), RCW_PMUX_FUNC("flextimer", 2),
> +};

I was testing the /sys/kernel/debug/pinctrl/1e0012c.pinctrl/pins
debugfs, and I just noticed the clk-out pin group gets printed as raw 0x0.

I think you've uncovered a documentation bug here. The primary function
of CLK_OUT_PMUX should be 000, aka CLK_OUT (this is a debugging signal
of the SoC, along with ASLEEP). I may be missing some context as to why
the reference manual says this value is reserved, but it clearly does
something - because table 19 with the hardcoded RCW bits lists 000 as
the default value for this field. So the RM contradicts itself.

Also, I see the debugfs thinks our pin groups are individual pins:

cat /sys/kernel/debug/pinctrl/1e0012c.pinctrl/pins
registered pins: 30
pin 0 (iic2) 0:? sdhc
pin 1 (iic3) 0:? can
pin 2 (iic4) 0:? can
pin 3 (iic5) 0:? i2c
pin 4 (iic6) 0:? i2c
pin 5 (xspi1-data74) 0:? flexspi
pin 6 (xspi1-data30) 0:? flexspi
pin 7 (xspi1-base) 0:? flexspi
pin 8 (sdhc1-base) 0:? sdhc
pin 9 (sdhc1-dir) 0:? sdhc
pin 10 (sdhc2-data74) 0:? sdhc
pin 11 (sdhc2-base) 0:? sdhc
pin 12 (uart1-soutsin) 0:? uart
pin 13 (uart1-rtscts) 0:? uart
pin 14 (uart2-soutsin) 0:? uart
pin 15 (uart2-rtscts) 0:? uart
pin 16 (irq11-8) 0:? irq
pin 17 (irq7-4) 0:? irq
pin 18 (irq3-0) 0:? irq
pin 19 (evt4-3) 0:? evt
pin 20 (evt2-0) 0:? evt
pin 21 (clk-out) 0:? 0x0
pin 22 (asleep) 0:? asleep
pin 23 (reset-req) 0:? reset-req
pin 24 (iic1) 0:? i2c
pin 25 (ec1) 0:? rgmii
pin 26 (ec2) 0:? rgmii
pin 27 (usb-ext) 0:? usb
pin 28 (gtx-clk) 0:? gtx-clk
pin 29 (sdhc1-ds) 0:? sdhc

(which they're not - iic2 is a group consisting of SCL and SDA, whose
function cannot be selected independently, which is why you've grouped
them together).

I suppose this is OK? Not really a pinctrl expert here (and it predates
your work - pinctrl-simple worked the same way).