All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sherry Sun (OSS)" <sherry.sun@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] arm64: dts: imx943-evk: Add Vaux supply to keep M.2 power enabled to avoid false wake-up
Date: Fri, 04 Dec 2026 08:22:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-249387@kernel.org> (raw)
In-Reply-To: <20261204-943-vpcie3v3aux-v1-1-022877cfc1b3@nxp.com>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] arm64: dts: imx943-evk: imx_pcie_host_init() glitches
  reg_m2_pwr on defer
- [Medium] arm64: dts: imx943-evk: imx_pcie_shutdown() leaves reg_m2_pwr
  powered on
- [Medium] arm64: dts: deprecated pcie0 vpcie3v3aux-supply duplicates
  reg_m2_pwr
--

commit f275ca2547acea4eede10dde401de8e9c4d1539c
Author: Sherry Sun <sherry.sun@nxp.com>

arm64: dts: imx943-evk: Add Vaux supply to keep M.2 power enabled to avoid false wake-up

This patch adds vpcie3v3aux-supply = <&reg_m2_pwr> to the &pcie0 node on
imx943-evk so the M.2 3.3V power rail stays enabled when the PCIe driver
would otherwise power it off during suspend.

> diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> index d8fe04b64191a..2a445d21821e8 100644
> --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> @@ -1428,6 +1428,16 @@ &pcie0 {
>  	clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux",
>  		      "ref", "extref";
>  	supports-clkreq;
> +	/*
> +	 * If the i.MX943-EVK installs a PCIe M.2 device that doesn't support wakeup
> +	 * or cannot generating PME from D3cold, the skip_pwrctrl_off flag in the
> +	 * PCIe driver will be set to false, causing the M.2 power to be turned off.
> +	 * This will generate falling edges on the BT_Wake and PCIE1_WAKE pins,
> +	 * falsely triggering the wake-up signal and preventing the system from
> +	 * entering sleep mode. Add this Vaux supply to keep the reg_m2_pwr enabled
> +	 * to work around this issue.
> +	 */
> +	vpcie3v3aux-supply = <&reg_m2_pwr>;

[Severity: Medium]
Should this deprecated host-bridge vpcie3v3aux-supply property be added to
&pcie0 when m2_connector already owns reg_m2_pwr?

The M.2 Key E connector node already claims reg_m2_pwr via vpcie3v3-supply
for pwrseq-pcie-m2, and host-bridge vpcie3v3aux-supply is deprecated for
new i.MX device trees.  Holding a second enable reference in pci-imx6 to
work around Linux's skip_pwrctrl_off flag prevents
pwrseq_pcie_m2_vregs_disable() from ever powering down the M.2 rail, even
during suspend or with no card installed.

Because &scmi_misc enables BRD_SM_CTRL_PCIE1_WAKE and BRD_SM_CTRL_BT_WAKE
board-wide, tying this workaround to &pcie0 still fails to cover unbind,
probe failure, or overlays that disable &pcie0.

If the board cannot tolerate reg_m2_pwr turning off while those wake lines
are armed, should that constraint live on reg_m2_pwr (for example with
regulator-always-on) or be handled in the PCIe/pwrctrl/SCMI wake path?

[Severity: Medium]
Can this glitch reg_m2_pwr on every probe deferral retry before
w-disable1-gpios is asserted?

In imx_pcie_host_init(), imx_pcie->vpcie_aux is enabled with a devres
disable action before pci_pwrctrl_power_on_devices() runs.  If
pwrseq-pcie-m2 has not yet probed to assert w-disable1-gpios,
pci_pwrctrl_power_on_device() returns -EPROBE_DEFER.

Devres unwind then disables reg_m2_pwr right after its 5 ms startup delay,
power-cycling the M.2 slot without w-disable1-gpios asserted and violating
M.2 power-up sequencing on each deferral retry.

[Severity: Medium]
Does this leave reg_m2_pwr powered on across system shutdown and warm
reboot?

imx_pcie_host_init() only schedules imx_pcie_vpcie_aux_disable() via
devm_add_action_or_reset(), which does not run on shutdown.
imx_pcie_shutdown() calls pci_pwrctrl_power_off_devices() to leave the
slot clean for the bootloader, but never disables imx_pcie->vpcie_aux.

With both pci-imx6 and pwrseq-pcie-m2 holding enable references,
pwrseq_disable() only drops reg_m2_pwr's enable count from 2 to 1, leaving
the M.2 rail energized instead of power-cycling the card on reboot.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-943-vpcie3v3aux-v1-1-022877cfc1b3@nxp.com?part=1

      reply	other threads:[~2026-12-04  8:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  8:01 [PATCH] arm64: dts: imx943-evk: Add Vaux supply to keep M.2 power enabled to avoid false wake-up Sherry Sun (OSS)
2026-12-04  8:22 ` 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=sashiko-outbox-249387@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=sherry.sun@oss.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 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.