2023-03-24 07:41:41

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 1/6] arm64: dts: qcom: sm8250: drop incorrect domain idle states properties

Domain idle states do not use 'idle-state-name' and 'local-timer-stop':

sm8250-hdk.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+'

Reported-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 79d67b466856..9cf2de87c632 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -354,12 +354,10 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
domain-idle-states {
CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible = "domain-idle-state";
- idle-state-name = "cluster-llcc-off";
arm,psci-suspend-param = <0x4100c244>;
entry-latency-us = <3264>;
exit-latency-us = <6562>;
min-residency-us = <9987>;
- local-timer-stop;
};
};
};
--
2.34.1


2023-03-24 07:41:52

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 4/6] arm64: dts: qcom: sm8150: drop incorrect domain idle states properties

Domain idle states do not use 'idle-state-name' and 'local-timer-stop':

sm8150-hdk.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+'

Reported-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 0de406752a4c..da048f86c50e 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -287,12 +287,10 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
domain-idle-states {
CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible = "domain-idle-state";
- idle-state-name = "cluster-power-collapse";
arm,psci-suspend-param = <0x4100c244>;
entry-latency-us = <3263>;
exit-latency-us = <6562>;
min-residency-us = <9987>;
- local-timer-stop;
};
};
};
--
2.34.1

2023-03-24 07:41:54

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 5/6] arm64: dts: qcom: sm8350: drop incorrect domain idle states properties

Domain idle states do not use 'idle-state-name' and 'local-timer-stop':

sm8350-mtp.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+'

Reported-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 2431b77e38d8..05a4c33eaed9 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -248,12 +248,10 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
domain-idle-states {
CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible = "domain-idle-state";
- idle-state-name = "cluster-power-collapse";
arm,psci-suspend-param = <0x4100c344>;
entry-latency-us = <3263>;
exit-latency-us = <6562>;
min-residency-us = <9987>;
- local-timer-stop;
};
};
};
--
2.34.1

2023-03-24 07:41:56

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 6/6] arm64: dts: qcom: sc8280xp: drop incorrect domain idle states properties

Domain idle states do not use 'idle-state-name':

sc8280xp-crd.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name' does not match any of the regexes: 'pinctrl-[0-9]+'

Reported-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index 1a3d15e6d381..4adfff7583be 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -268,7 +268,6 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
domain-idle-states {
CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible = "domain-idle-state";
- idle-state-name = "cluster-power-collapse";
arm,psci-suspend-param = <0x4100c344>;
entry-latency-us = <3263>;
exit-latency-us = <6562>;
--
2.34.1

2023-03-24 07:42:42

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 3/6] arm64: dts: qcom: sm6375: drop incorrect domain idle states properties

Domain idle states do not use 'idle-state-name' and 'local-timer-stop':

sm6375-sony-xperia-murray-pdx225.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+'

Reported-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/qcom/sm6375.dtsi | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index a99a5641623f..c020f5bd6491 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -229,12 +229,10 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
domain-idle-states {
CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible = "domain-idle-state";
- idle-state-name = "cluster-power-collapse";
arm,psci-suspend-param = <0x41000044>;
entry-latency-us = <2752>;
exit-latency-us = <3048>;
min-residency-us = <6118>;
- local-timer-stop;
};
};
};
--
2.34.1

2023-03-28 23:05:21

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH 1/6] arm64: dts: qcom: sm8250: drop incorrect domain idle states properties

On 24/03/2023 09:38, Krzysztof Kozlowski wrote:
> Domain idle states do not use 'idle-state-name' and 'local-timer-stop':
>
> sm8250-hdk.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+'
>
> Reported-by: Neil Armstrong <[email protected]>
> Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index 79d67b466856..9cf2de87c632 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -354,12 +354,10 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
> domain-idle-states {
> CLUSTER_SLEEP_0: cluster-sleep-0 {
> compatible = "domain-idle-state";
> - idle-state-name = "cluster-llcc-off";
> arm,psci-suspend-param = <0x4100c244>;
> entry-latency-us = <3264>;
> exit-latency-us = <6562>;
> min-residency-us = <9987>;
> - local-timer-stop;

Hmm, so we support setting the broadcast timer when using plain PSCI
idle states, but not when using the domain-based idle states.

Ulf, Rafael, Daniel, is that an omission for the domain-based idle
support? Or is it handled in some other way?

> };
> };
> };

--
With best wishes
Dmitry

2023-03-29 09:48:57

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 1/6] arm64: dts: qcom: sm8250: drop incorrect domain idle states properties

On Wed, 29 Mar 2023 at 00:51, Dmitry Baryshkov
<[email protected]> wrote:
>
> On 24/03/2023 09:38, Krzysztof Kozlowski wrote:
> > Domain idle states do not use 'idle-state-name' and 'local-timer-stop':
> >
> > sm8250-hdk.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+'
> >
> > Reported-by: Neil Armstrong <[email protected]>
> > Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
> > ---
> > arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> > index 79d67b466856..9cf2de87c632 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> > @@ -354,12 +354,10 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
> > domain-idle-states {
> > CLUSTER_SLEEP_0: cluster-sleep-0 {
> > compatible = "domain-idle-state";
> > - idle-state-name = "cluster-llcc-off";
> > arm,psci-suspend-param = <0x4100c244>;
> > entry-latency-us = <3264>;
> > exit-latency-us = <6562>;
> > min-residency-us = <9987>;
> > - local-timer-stop;
>
> Hmm, so we support setting the broadcast timer when using plain PSCI
> idle states, but not when using the domain-based idle states.
>
> Ulf, Rafael, Daniel, is that an omission for the domain-based idle
> support? Or is it handled in some other way?

I am not sure that we need a DT binding specifically for this, or do we?

So far, the timer is managed from platform specific code. For some
Qcom based platforms, the timer should be managed in
rpmh_rsc_write_next_wakeup(), which makes use of
dev_pm_genpd_get_next_hrtimer().

[...]

Kind regards
Uffe

2023-03-29 09:54:23

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 1/6] arm64: dts: qcom: sm8250: drop incorrect domain idle states properties

On Fri, 24 Mar 2023 at 08:38, Krzysztof Kozlowski
<[email protected]> wrote:
>
> Domain idle states do not use 'idle-state-name' and 'local-timer-stop':
>
> sm8250-hdk.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+'
>
> Reported-by: Neil Armstrong <[email protected]>
> Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Reviewed-by: Ulf Hansson <[email protected]>

> ---
> arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index 79d67b466856..9cf2de87c632 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -354,12 +354,10 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
> domain-idle-states {
> CLUSTER_SLEEP_0: cluster-sleep-0 {
> compatible = "domain-idle-state";
> - idle-state-name = "cluster-llcc-off";

FYI: If someone wants to add support for this property, I wouldn't mind.

> arm,psci-suspend-param = <0x4100c244>;
> entry-latency-us = <3264>;
> exit-latency-us = <6562>;
> min-residency-us = <9987>;
> - local-timer-stop;
> };
> };
> };
> --
> 2.34.1
>

Kind regards
Uffe

2023-03-29 11:04:32

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH 1/6] arm64: dts: qcom: sm8250: drop incorrect domain idle states properties

On 29/03/2023 12:45, Ulf Hansson wrote:
> On Wed, 29 Mar 2023 at 00:51, Dmitry Baryshkov
> <[email protected]> wrote:
>>
>> On 24/03/2023 09:38, Krzysztof Kozlowski wrote:
>>> Domain idle states do not use 'idle-state-name' and 'local-timer-stop':
>>>
>>> sm8250-hdk.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+'
>>>
>>> Reported-by: Neil Armstrong <[email protected]>
>>> Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/
>>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>> ---
>>> arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 --
>>> 1 file changed, 2 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
>>> index 79d67b466856..9cf2de87c632 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
>>> @@ -354,12 +354,10 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
>>> domain-idle-states {
>>> CLUSTER_SLEEP_0: cluster-sleep-0 {
>>> compatible = "domain-idle-state";
>>> - idle-state-name = "cluster-llcc-off";
>>> arm,psci-suspend-param = <0x4100c244>;
>>> entry-latency-us = <3264>;
>>> exit-latency-us = <6562>;
>>> min-residency-us = <9987>;
>>> - local-timer-stop;
>>
>> Hmm, so we support setting the broadcast timer when using plain PSCI
>> idle states, but not when using the domain-based idle states.
>>
>> Ulf, Rafael, Daniel, is that an omission for the domain-based idle
>> support? Or is it handled in some other way?
>
> I am not sure that we need a DT binding specifically for this, or do we?
>
> So far, the timer is managed from platform specific code. For some
> Qcom based platforms, the timer should be managed in
> rpmh_rsc_write_next_wakeup(), which makes use of
> dev_pm_genpd_get_next_hrtimer().

I'm not sure whether I fully follow this (I might lack some
understanding here). I thought that with "local-timer-stop" (well,
CPUIDLE_FLAG_TIMER_STOP), we were switching to the broadcast timer
before a core/cluster goes into idle state with no local timer, while
with rpmh_rsc_write_next_wakeup() we write that only before shutting
down the last core (see the comment at rpmh_flush()).

This might be an expected thing, I probably don't have enough
understanding of the cpuidle internals to judge this.

>
> [...]
>
> Kind regards
> Uffe

--
With best wishes
Dmitry

2023-04-05 04:07:49

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 1/6] arm64: dts: qcom: sm8250: drop incorrect domain idle states properties

On Fri, 24 Mar 2023 08:38:08 +0100, Krzysztof Kozlowski wrote:
> Domain idle states do not use 'idle-state-name' and 'local-timer-stop':
>
> sm8250-hdk.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+'
>
>

Applied, thanks!

[1/6] arm64: dts: qcom: sm8250: drop incorrect domain idle states properties
commit: dffc4b5c086cf1d3dae4761427122a56b9d1253a
[2/6] arm64: dts: qcom: sdm845: drop incorrect domain idle states properties
commit: 1766e9155d086cd238c24113a7be9740d35c2ebe
[3/6] arm64: dts: qcom: sm6375: drop incorrect domain idle states properties
commit: ac7944f01b771af7718a81793ca5b38b0e3a0c21
[4/6] arm64: dts: qcom: sm8150: drop incorrect domain idle states properties
commit: 770f85c19536fde3591f4f2f70ac32f33d86b975
[5/6] arm64: dts: qcom: sm8350: drop incorrect domain idle states properties
commit: 7983224c6a6cea77aa0b9b4e23bb7651241df961
[6/6] arm64: dts: qcom: sc8280xp: drop incorrect domain idle states properties
commit: ea1811e2614cd66608961ae3c5a9ee6038fc424b

Best regards,
--
Bjorn Andersson <[email protected]>