All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, robh@kernel.org,
	conor+dt@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: imx8mp-ultra-mach-sbc: fix CBTU02043 USB Type-C orientation switch
Date: Wed, 19 Aug 2026 15:06:08 +0000	[thread overview]
Message-ID: <20260819150609.178931F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260819-imx8m-typec-v1-2-befc92ecb70a@nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The GPIO hog for the CBTU02043 XSD pin incorrectly drives the physical pin HIGH, placing the switch into shutdown mode instead of keeping it enabled.
--

--- Patch [2]: [PATCH 2/2] arm64: dts: imx8mp-ultra-mach-sbc: fix CBTU02043 USB Type-C orientation switch ---
commit 9b2cdf94fea52f7b5503f6d6e284f01ff2cf262b
Author: Peng Fan <peng.fan@nxp.com>

arm64: dts: imx8mp-ultra-mach-sbc: fix CBTU02043 USB Type-C orientation switch

This commit drops the gpio-sbu-mux node, replacing it with an
orientation-gpios property in the ptn5110 TCPC node. It also adds a gpio-hog
to keep the CBTU02043 switch's XSD (shutdown) pin held low, ensuring the
device remains enabled.

> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-ultra-mach-sbc.dts b/arch/arm64/boot/dts/freescale/imx8mp-ultra-mach-sbc.dts
> index 3e6f9c88cc200..7e0550647751e 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-ultra-mach-sbc.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-ultra-mach-sbc.dts

[ ... ]

> @@ -217,6 +202,15 @@ &gpio2 {
>  		"", "", "", "", "#SD2_CD", "", "", "",
>  		"", "", "", "", "#USB-C_EN", "", "", "",
>  		"", "", "", "", "", "", "", "";
> +
> +	cbtu02043-xsd-hog {
> +		gpio-hog;
> +		gpios = <20 GPIO_ACTIVE_LOW>;
> +		output-low;

[Severity: High]
Will this configuration inadvertently drive the XSD pin HIGH, placing the
switch into shutdown mode?

The commit message notes that the CBTU02043 XSD pin is active-low (LOW for
normal operation, HIGH for shutdown).

However, the gpio-hog node specifies both gpios = <20 GPIO_ACTIVE_LOW> and
output-low. The output-low property in the device tree binding requests a
logical 0 (inactive state). The GPIO subsystem evaluates this against the
GPIO_ACTIVE_LOW flag and inverts the logical 0 into a physical 1 (HIGH).

Could this be resolved by either using output-high (to request a logical 1 /
physical LOW) or by changing the polarity to GPIO_ACTIVE_HIGH while retaining
output-low, to ensure the physical pin is correctly driven LOW?

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

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

      reply	other threads:[~2026-08-19 15:06 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
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 [this message]

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=20260819150609.178931F00A3A@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.