Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: Frank.Li@kernel.org, robh@kernel.org, imx@lists.linux.dev,
	conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] arm64: dts: imx8mp-evk: enable CBTU02043 for USB Type-C orientation switch
Date: Wed, 19 Aug 2026 15:04:02 +0000	[thread overview]
Message-ID: <20260819150403.1303E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260819-imx8m-typec-v1-1-befc92ecb70a@nxp.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The GPIO hog for the CBTU02043 XSD pin incorrectly drives the physical pin HIGH instead of LOW, placing the switch in shutdown mode.
- [High] The `pinctrl-names` and `pinctrl-0` properties inside the `gpio-hog` child node will be silently ignored by the `pinctrl` core.
--

--- Patch [1]: [PATCH 1/2] arm64: dts: imx8mp-evk: enable CBTU02043 for USB Type-C orientation switch ---
commit b6ef05965c4d69ccad672c2aa85487746c77918d
Author: Peng Fan <peng.fan@nxp.com>

arm64: dts: imx8mp-evk: enable CBTU02043 for USB Type-C orientation switch

This commit adds a gpio-hog to keep the CBTU02043 crossbar switch always
enabled by driving its XSD pin low. It also adds a pinctrl group for the
XSD pin to ensure it is properly multiplexed.

> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
> index 7bdd641292fb6..dc3baeac5e3d3 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
> @@ -935,6 +935,17 @@ usb3_data_hs: endpoint {
>  	};
>  };
>  
> +&gpio2 {
> +	cbtu02043-xsd-hog {
> +		gpio-hog;
> +		gpios = <20 GPIO_ACTIVE_LOW>;
> +		output-low;

[Severity: High]
Will this actually drive the physical pin HIGH instead of LOW?

In the gpiolib framework, "output-low" requests a logical 0. Because the
pin is specified as GPIO_ACTIVE_LOW, gpiod_direction_output_nonotify()
applies an inversion to the logical 0, resulting in the pad being driven
to a physical 1 (HIGH level).

Since the commit message notes that XSD must be driven LOW for normal
operation, should this use "output-high" with GPIO_ACTIVE_LOW, or
"output-low" with GPIO_ACTIVE_HIGH?

> +		line-name = "CBTU02043_XSD";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_cbtu02043_xsd>;

[Severity: High]
Will these pinctrl properties be silently ignored by the pinctrl core?

The pinctrl bindings are evaluated by the driver core via
pinctrl_bind_pins() only for nodes that instantiate an associated
struct device. A gpio-hog node is parsed manually by gpiolib as a firmware
subnode and does not instantiate a device.

Does this mean the MX8MP_IOMUXC_SD2_WP__GPIO2_IO20 pin will not be
multiplexed to its GPIO function, preventing the hog from controlling
the actual physical line? Should the pinctrl properties be placed in a
probed device node, like the parent &gpio2 or &iomuxc?

> +	};
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260819-imx8m-typec-v1-0-befc92ecb70a@nxp.com?part=1

  reply	other threads:[~2026-08-19 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 14:51 [PATCH 0/2] arm64: dts: imx8mp: fix USB Type-C CBTU02043 orientation switch handling Peng Fan (OSS)
2026-08-19 14:51 ` [PATCH 1/2] arm64: dts: imx8mp-evk: enable CBTU02043 for USB Type-C orientation switch Peng Fan (OSS)
2026-08-19 15:04   ` sashiko-bot [this message]
2026-08-19 15:33     ` Frank Li
2026-08-19 14:51 ` [PATCH 2/2] arm64: dts: imx8mp-ultra-mach-sbc: fix CBTU02043 " Peng Fan (OSS)
2026-08-19 15:06   ` 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=20260819150403.1303E1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=peng.fan@oss.nxp.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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