mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amelie Delaunay <amelie.delaunay@foss.st.com>
To: Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>
Cc: Linux STM32 <linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [Linux-stm32] [PATCH v2] arm64: dts: st: add PSCI idle state to STM32MP25 CPU domains
Date: Fri, 20 Nov 2026 14:06:43 +0100	[thread overview]
Message-ID: <46796ca1-5a03-446c-bfa2-173fac805dc9@foss.st.com> (raw)
In-Reply-To: <20261119185544.v2.1.Ia5e0774883d237f5825b7090962b454294922558@changeid>

On 11/19/26 18:55, Patrick Delaunay wrote:
> Define a PSCI CPU suspend state and reference it from both STM32MP25
> CPU power domains.
> 
> In OSI mode, PSCI power domains are initialized as off. The idle-state
> allows the CPU power-domain governor to manage them, avoiding probe
> stalls for devices that depend on the cluster power domain, including
> SDMMC1.
> 
> Fixes: 9c8d852dabbd ("arm64: dts: st: add power domain on stm32mp25")
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Tested on the stm32mp257f-ev1. The following logs
	root '/dev/disk/by-partuuid/e91c4e10-16e6-4c0e-bd0e-77becf4a3582' 
doesn't exist or does not contain a /dev.
	[   11.829563] platform 40130000.i2c: deferred probe pending: (reason 
unknown)
	[   11.830952] genpd_provider power-domain-cluster: sync_state() 
pending due to 40500000.ommanager
no longer appear.

Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Tested-by: Amelie Delaunay <amelie.delaunay@foss.st.com>

> ---
> Hi,
> 
> On kernel v7.4-rc1 and with TF-A BL31 compiled with the PSCI OSI support
> the boot of STM32MP25 boards failed because
> 1/ the domain are OFF by default since commit 6d3080bfe007 ("cpuidle:
>     psci: Initialize the PM domains in powered off state for OSI")
> 2/ the SDMMC1 uses the PSCI domain cluster since commit 4f454e51290d0
>     ("arm64: dts: st: add power-domains to sdmmc1 on stm32mp251").
> 
> In the trace we have:
> 
> [    0.000000] psci: probing for conduit method from DT.
> [    0.000000] psci: PSCIv1.1 detected in firmware.
> [    0.000000] psci: Using standard PSCI v0.2 function IDs
> [    0.000000] psci: Trusted OS migration not required
> [    0.000000] psci: SMC Calling Convention v1.5
> [    0.000000] psci: OSI mode supported.
> [    0.000000] Zone ranges:
> .....
> [    0.242188] CPUidle PSCI: Initialized CPU PM domain topology using OSI mode
> .....
> [    1.604962] PM: genpd: Disabling unused power domains
> ...
> [   11.833535] platform 40130000.i2c: deferred probe pending: (reason unknown)
> [   11.834888] amba 48220000.mmc: deferred probe pending: (reason unknown)
> [   11.841607] genpd_provider power-domain-cluster: sync_state() pending due to 40500000.ommanager
> 
> When I remove the power-domain in SDMMC node, I can check the
> genpd state and all the PSCI are OFF:
> 
> # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain                          status          children        performance
>     /device                         runtime status                  managed by
> ------------------------------------------------------------------------------
> power-domain-cpu1               off-0                           0
> power-domain-retention          off-0                           0
>                                                 power-domain-cluster
> power-domain-cluster            off-0                           0
>                                                 power-domain-cpu0, power-domain-cpu1
> power-domain-cpu0               off-0                           0
> 
> 
> I can confirm that without the PSCI power domain commit 6d3080bfe007
> ("cpuidle: psci: Initialize the PM domains in powered off state for
> OSI"), I come back to previous behavior:
> 
> cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain                          status          children        performance
>      /device                         runtime status                  managed by
> ------------------------------------------------------------------------------
> power-domain-cpu1               off-0                           0
> power-domain-retention          on                              0
>                                                  power-domain-cluster
> power-domain-cluster            on                              0
>                                                  power-domain-cpu0, power-domain-cpu1
>      40130000.i2c                    suspended                   0           SW
>      48030000.dcmipp                 suspended                   0           SW
> power-domain-cpu0               off-0
> 
> The proposed patch is the simplest solution to allow boot of STM32MP25
> with kernel v7.4-rc1 and before upstream of D1 power-domain and full
> PSCI OSI support.
> 
> V2 of patch [1]
> 
> [1] [PATCH] arm64: dts: st: add PSCI idle state to STM32MP25 CPU domains
> https://patchwork.kernel.org/project/linux-arm-kernel/patch/20261104102837.1.Ia5e0774883d237f5825b7090962b454294922558@changeid/
> https://lore.kernel.org/all/20261104102837.1.Ia5e0774883d237f5825b7090962b454294922558@changeid/
> 
> Regards
> 
> Patrick
> 
> Changes in v2:
> - Add "Fixes", requested by Amelie Delaunay
> 
>   arch/arm64/boot/dts/st/stm32mp251.dtsi | 14 ++++++++++++++
>   arch/arm64/boot/dts/st/stm32mp253.dtsi |  1 +
>   2 files changed, 15 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
> index dac3d2d23ff0..bf1542818be2 100644
> --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
> +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
> @@ -25,6 +25,19 @@ cpu0: cpu@0 {
>   			power-domains = <&CPU_PD0>;
>   			power-domain-names = "psci";
>   		};
> +
> +		idle-states {
> +			entry-method = "psci";
> +
> +			cpu_sleep: cpu-sleep {
> +				compatible = "arm,idle-state";
> +				arm,psci-suspend-param = <0x00000002>;
> +				local-timer-stop;
> +				entry-latency-us = <150>;
> +				exit-latency-us = <200>;
> +				min-residency-us = <1000>;
> +			};
> +		};
>   	};
>   
>   	arm-pmu {
> @@ -145,6 +158,7 @@ psci {
>   
>   		CPU_PD0: power-domain-cpu0 {
>   			#power-domain-cells = <0>;
> +			domain-idle-states = <&cpu_sleep>;
>   			power-domains = <&CLUSTER_PD>;
>   		};
>   
> diff --git a/arch/arm64/boot/dts/st/stm32mp253.dtsi b/arch/arm64/boot/dts/st/stm32mp253.dtsi
> index 7e82f01fdc10..19b3e55a4414 100644
> --- a/arch/arm64/boot/dts/st/stm32mp253.dtsi
> +++ b/arch/arm64/boot/dts/st/stm32mp253.dtsi
> @@ -26,6 +26,7 @@ arm-pmu {
>   	psci {
>   		CPU_PD1: power-domain-cpu1 {
>   			#power-domain-cells = <0>;
> +			domain-idle-states = <&cpu_sleep>;
>   			power-domains = <&CLUSTER_PD>;
>   		};
>   	};
> ---
> base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
> branch: master
> 


      reply	other threads:[~2026-11-20 13:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 17:55 Patrick Delaunay
2026-11-20 13:06 ` Amelie Delaunay [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=46796ca1-5a03-446c-bfa2-173fac805dc9@foss.st.com \
    --to=amelie.delaunay@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®