Devicetree
 help / color / mirror / Atom feed
From: Bough Chen <haibo.chen@oss.nxp.com>
To: Joy Zou <joy.zou@oss.nxp.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>, Frank Li <Frank.Li@nxp.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>, Ye Li <ye.li@nxp.com>,
	Peng Fan <peng.fan@nxp.com>, Jacky Bai <ping.bai@nxp.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/3] arm64: dts: imx952-frdm: model CAN/GPIO selector as gpio-mux
Date: Mon, 23 Nov 2026 10:15:08 +0800	[thread overview]
Message-ID: <20261123021508.c2s6kxcev2b557no@shlinux89> (raw)
In-Reply-To: <20261120-b4-imx937-frdm-v2-2-5e27ceec02df@oss.nxp.com>

On Fri, Nov 20, 2026 at 07:09:49PM +0800, Joy Zou wrote:
> Replace the gpio-hog used for CAN/GPIO selection with a gpio-mux
> controller and pinctrl-multiplexer states.
> 
> The board provides a GPIO-controlled mux between CAN and GPIO.
> Describe it explicitly instead of relying on a fixed GPIO state.
> 
> Signed-off-by: Joy Zou <joy.zou@oss.nxp.com>

Reviewed-by: Haibo Chen <haibo.chen@nxp.com>

Regards
Haibo Chen
> ---
> Changes in v2:
> 1. add a new patch to replace gpio-hog with gpio-mux in preparation for
>    i.MX937 code reuse.
> ---
>  arch/arm64/boot/dts/freescale/imx952-frdm.dtsi | 28 ++++++++++++++++++--------
>  1 file changed, 20 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx952-frdm.dtsi b/arch/arm64/boot/dts/freescale/imx952-frdm.dtsi
> index 4d325e848aa8..88e77d6e9c45 100644
> --- a/arch/arm64/boot/dts/freescale/imx952-frdm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx952-frdm.dtsi
> @@ -39,6 +39,25 @@ bt_sco_codec: audio-codec-bt-sco {
>  		#sound-dai-cells = <1>;
>  	};
>  
> +	can_mux: mux-controller-0 {
> +		compatible = "gpio-mux";
> +		#mux-control-cells = <0>;
> +		#mux-state-cells = <1>;
> +		mux-gpios = <&pcal6416 4 GPIO_ACTIVE_HIGH>;
> +	};
> +
> +	can_mux_pinctrl: pinctrl-gpiomux {
> +		compatible = "pinctrl-multiplexer";
> +
> +		can2_fun: can-grp {
> +			mux-states = <&can_mux 0>;
> +		};
> +
> +		gpio_fun: gpio-grp {
> +			mux-states = <&can_mux 1>;
> +		};
> +	};
> +
>  	chosen {
>  		stdout-path = &lpuart1;
>  	};
> @@ -274,7 +293,7 @@ &asrc2 {
>  
>  &flexcan2 {
>  	pinctrl-names = "default";
> -	pinctrl-0 = <&pinctrl_flexcan2>;
> +	pinctrl-0 = <&pinctrl_flexcan2>, <&can2_fun>;
>  	phys = <&flexcan2_phy>;
>  	status = "okay";
>  };
> @@ -304,13 +323,6 @@ pcal6416: gpio@20 {
>  		pinctrl-0 = <&pinctrl_pcal6416>;
>  		pinctrl-names = "default";
>  		vcc-supply = <&reg_3p3v>;
> -
> -		/* When low, select CAN; When high, select gpio. */
> -		can-gpio-sel-hog {
> -			gpios = <4 GPIO_ACTIVE_HIGH>;
> -			gpio-hog;
> -			output-low;
> -		};
>  	};
>  };
>  
> 
> -- 
> 2.34.1
> 

  reply	other threads:[~2026-11-23  2:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 11:09 [PATCH v2 0/3] arm64: dts: freescale: add i.MX937 FRDM board support Joy Zou
2026-11-20 11:09 ` [PATCH v2 1/3] dt-bindings: arm: fsl: add i.MX937 FRDM board Joy Zou
2026-11-20 11:12   ` sashiko-bot
2026-11-20 17:11   ` Frank Li
2026-11-20 11:09 ` [PATCH v2 2/3] arm64: dts: imx952-frdm: model CAN/GPIO selector as gpio-mux Joy Zou
2026-11-23  2:15   ` Bough Chen [this message]
2026-11-20 11:09 ` [PATCH v2 3/3] arm64: dts: freescale: add i.MX937 FRDM board support Joy Zou
2026-11-20 11:11   ` sashiko-bot

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=20261123021508.c2s6kxcev2b557no@shlinux89 \
    --to=haibo.chen@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=joy.zou@oss.nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=ping.bai@nxp.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=ye.li@nxp.com \
    /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