Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Stefano Radaelli" <stefano.radaelli21@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org,
	Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v2 1/4] arm64: dts: imx93-var-som-symphony: add TPM support
Date: Fri, 29 May 2026 11:10:08 +0000	[thread overview]
Message-ID: <20260529111008.8B50D1F00893@smtp.kernel.org> (raw)
In-Reply-To: <64adb6f0cf9efe107c761e1a69b9a63c7dd0141a.1780051874.git.stefano.r@variscite.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The TPM device relies on a GPIO hog from a sibling I2C GPIO expander to be enabled, but lacks a structural device dependency, leading to a probe race condition and potential initialization failures.
--

commit 2c29a43f4e74b7d0f118dc8b7401c07e3617e874
Author: Stefano Radaelli <stefano.r@variscite.com>

arm64: dts: imx93-var-som-symphony: add TPM support

This commit adds the ST33KTPM2XI2C TPM device to the Symphony carrier
board. It uses a GPIO hog on the PCAL6408 GPIO expander to assert the
TPM enable line, since the binding lacks a dedicated enable GPIO property.

> diff --git a/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts b/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts
> index c0842fb3cfa33..f541308ebf6b8 100644
> --- a/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts
> +++ b/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts
[ ... ]
> @@ -208,6 +208,26 @@ &lpi2c1 {
>  	sda-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
>  	status = "okay";
>  
> +	pcal6408: gpio@21 {
> +		compatible = "nxp,pcal6408";
> +		reg = <0x21>;
> +		gpio-controller;
> +		#gpio-cells = <2>;
> +		status = "okay";
> +
> +		tpm-enable-hog {
> +			gpio-hog;
> +			gpios = <4 GPIO_ACTIVE_HIGH>;
> +			output-high;
> +			line-name = "tpm_en";
> +		};
> +	};
> +
> +	st33ktpm2xi2c: tpm@2e {
> +		compatible = "st,st33ktpm2xi2c", "tcg,tpm-tis-i2c";
> +		reg = <0x2e>;
> +	};

[Severity: High]
Since there is no explicit structural dependency between the TPM device and
the GPIO expander, could this introduce a probe order race condition?

Because fw_devlink is unaware of this relationship, if the drivers are
loaded asynchronously and the tpm_tis_i2c driver probes before the
gpio-pca953x driver, the enable line will remain deasserted. 

The TPM driver's initial I2C read might receive a NACK and return a
permanent error like -ENXIO instead of returning -EPROBE_DEFER.

Does this setup inadvertently rely on undefined probe ordering to ensure
the TPM is enabled before it is initialized?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1780051874.git.stefano.r@variscite.com?part=1

  reply	other threads:[~2026-05-29 11:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 10:52 [PATCH v2 0/4] arm64: dts: imx93-var-som-symphony: align DTS with hardware revision Stefano Radaelli
2026-05-29 10:52 ` [PATCH v2 1/4] arm64: dts: imx93-var-som-symphony: add TPM support Stefano Radaelli
2026-05-29 11:10   ` sashiko-bot [this message]
2026-05-29 10:52 ` [PATCH v2 2/4] arm64: dts: imx93-var-som-symphony: enable UART7 Stefano Radaelli
2026-05-29 10:52 ` [PATCH v2 3/4] arm64: dts: imx93-var-som-symphony: keep RGB_SEL low Stefano Radaelli
2026-05-29 10:52 ` [PATCH v2 4/4] arm64: dts: imx93-var-som-symphony: enable TPM3 PWM Stefano Radaelli

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=20260529111008.8B50D1F00893@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=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=stefano.radaelli21@gmail.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