Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: "Frank Li" <Frank.Li@nxp.com>, "Peter Rosin" <peda@axentia.se>,
	"Linus Walleij" <linusw@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Rafał Miłecki" <rafal@milecki.pl>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>
Cc: imx@lists.linux.dev, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Haibo Chen <haibo.chen@nxp.com>,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 6/7] arm64: dts: imx8mp-evk: add board-level mux for CAN2 and MICFIL
Date: Mon, 16 Mar 2026 14:44:43 +0100	[thread overview]
Message-ID: <ea59ff34-73f2-491c-88cf-51d1ac3db424@pengutronix.de> (raw)
In-Reply-To: <20260311-pinctrl-mux-v3-6-236b1c17bf9b@nxp.com>

On 3/11/26 8:08 PM, Frank Li wrote:
> The board integrates an on-board mux to route shared signals to either
> CAN2 or PDM (MICFIL). The mux is controlled by a GPIO.
> 
> Add a pinctrl-based multiplexer node to describe this routing and ensure
> proper probe ordering of the dependent devices.
> 
> Previously, MICFIL operation implicitly depended on the default level of
> PCA6416 GPIO3. After adding the pinctrl-multiplexer, make the dependency
> explicit.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

I really like this new abstraction.

> +	can_mux_pinctrl: pinctrl-gpiomux {
> +		compatible = "pinctrl-multiplexer";
> +
> +		can_fun: can-grp {
> +			mux-states = <&can_mux 1>;
> +		};
> +
> +		pdm_fun: pdm-grp {
> +			mux-states = <&can_mux 0>;
> +		};
> +	};

Just to make sure: If both &flexcan2 and &micfil were enabled at the
same time, the existing pinctrl clash detection will also work for this
new pinctrl-multiplexer and point that out, right?

Thanks,
Ahmad

> +
>  	memory@40000000 {
>  		device_type = "memory";
>  		reg = <0x0 0x40000000 0 0xc0000000>,
> @@ -446,7 +465,7 @@ &flexcan1 {
>  
>  &flexcan2 {
>  	pinctrl-names = "default";
> -	pinctrl-0 = <&pinctrl_flexcan2>;
> +	pinctrl-0 = <&pinctrl_flexcan2>, <&can_fun>;
>  	phys = <&flexcan_phy 1>;
>  	status = "disabled";/* can2 pin conflict with pdm */
>  };
> @@ -712,7 +731,7 @@ &lcdif3 {
>  &micfil {
>  	#sound-dai-cells = <0>;
>  	pinctrl-names = "default";
> -	pinctrl-0 = <&pinctrl_pdm>;
> +	pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>;
>  	assigned-clocks = <&clk IMX8MP_CLK_PDM>;
>  	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
>  	assigned-clock-rates = <196608000>;
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2026-03-16 13:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 19:08 [PATCH v3 0/7] pinctrl: Add generic pinctrl for board-level mux chips Frank Li
2026-03-11 19:08 ` [PATCH v3 1/7] mux: add devm_mux_control_get_from_np() to get mux from child node Frank Li
2026-03-11 19:08 ` [PATCH v3 2/7] dt-bindings: pinctrl: Add generic pinctrl for board-level mux chips Frank Li
2026-03-11 19:08 ` [PATCH v3 3/7] pinctrl: pinctrl-generic: add __pinctrl_generic_pins_function_dt_node_to_map() Frank Li
2026-03-16  9:37   ` Linus Walleij
2026-03-18 23:04     ` Frank Li
2026-03-20 13:27       ` Linus Walleij
2026-03-20 13:54         ` Frank Li
2026-03-24 20:16           ` Frank Li
2026-03-25 10:33             ` Conor Dooley
2026-03-25 15:09               ` Frank Li
2026-03-25 17:34                 ` Conor Dooley
2026-03-11 19:08 ` [PATCH v3 4/7] pinctrl: add optional .release_mux() callback Frank Li
2026-03-16  9:39   ` Linus Walleij
2026-03-11 19:08 ` [PATCH v3 5/7] pinctrl: add generic board-level pinctrl driver using mux framework Frank Li
2026-03-11 19:08 ` [PATCH v3 6/7] arm64: dts: imx8mp-evk: add board-level mux for CAN2 and MICFIL Frank Li
2026-03-16 13:44   ` Ahmad Fatoum [this message]
2026-03-11 19:08 ` [PATCH v3 7/7] arm64: dts: imx8mp-evk: add flexcan2 overlay file Frank Li
2026-03-16  9:40 ` [PATCH v3 0/7] pinctrl: Add generic pinctrl for board-level mux chips Linus Walleij

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=ea59ff34-73f2-491c-88cf-51d1ac3db424@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=Frank.Li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=haibo.chen@nxp.com \
    --cc=imx@lists.linux.dev \
    --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=peda@axentia.se \
    --cc=rafal@milecki.pl \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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