Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb+git@google.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>,
	 Dmitry Baryshkov <lumag@kernel.org>,
	linux-arm-msm@vger.kernel.org
Subject: [PATCH 4/7] arm64: dts: qcom: c630: Use the idle states from the ACPI tables
Date: Wed, 11 Nov 2026 12:53:08 +0100	[thread overview]
Message-ID: <20261111115303.3749380-13-ardb+git@google.com> (raw)
In-Reply-To: <20261111115303.3749380-9-ardb+git@google.com>

From: Ard Biesheuvel <ardb@kernel.org>

Commit 07db10de262f ("arm64: dts: qcom: sdm850-lenovo-yoga-c630: lower
PSCI cluster idle") dropped bit 14 from the PSCI suspend parameter of the
cluster idle state, as the C630 would occasionally reset with the sdm845
default. However, the firmware refuses the resulting value of 0x41008244:
the cluster power domain is never entered, in EL1 or EL2, and the last CPU
of the cluster keeps retrying instead, including during suspend to idle.

In EL2, the firmware accepts the sdm845 default of 0x4100c244. However,
besides powering down the cluster, this state also puts the rest of the
SoC to sleep (LLCC off, AOSS sleep), and entering it at runtime while the
display is off, e.g., right after locking the screen, makes the C630
reset.

The _LPI objects in the C630's DSDT describe the states that Windows uses:
on top of CPU state C4 (0x40000004), the cluster container has
L3Cluster.D4 (0x40) at level 0x01000000, and the system container has
platform.F2 (0xc300). So use L3Cluster.D4, i.e., 0x41000044, which only
powers down the cluster and its L3 cache, as the cluster idle state.

Add platform.F2, i.e., 0x4100c344, as a second, deeper cluster idle state,
which lets the SoC reach AOSS sleep and CX collapse during suspend to idle.
It differs from the sdm845 default in bits 11:8, which are 3 rather than
2, like in the corresponding states of newer SoCs and of the sc8180x and
sc8280xp WoA platforms. Give it a minimum residency of about 71 minutes
to keep the runtime governor away from it: suspend to idle always picks
the deepest state that satisfies the CPU wakeup latency QoS constraint,
regardless of its residency.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 25 +++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
index 0645ab429177..3e4df4335be8 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -37,6 +37,24 @@ aliases {
 		serial1 = &uart6;
 	};
 
+	cpus {
+		domain-idle-states {
+			/*
+			 * platform.F2 on top of L3Cluster.D4 from the ACPI tables,
+			 * which also lets the rest of the SoC sleep. Suspend to idle
+			 * picks the deepest state regardless of its residency, so
+			 * use one that keeps the runtime governor away from it.
+			 */
+			cluster_sleep_1: cluster-sleep-1 {
+				compatible = "domain-idle-state";
+				arm,psci-suspend-param = <0x4100c344>;
+				entry-latency-us = <3263>;
+				exit-latency-us = <6562>;
+				min-residency-us = <0xffffffff>;
+			};
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -340,8 +358,13 @@ &cdsp_pas {
 	status = "okay";
 };
 
+&cluster_pd {
+	domain-idle-states = <&cluster_sleep_0>, <&cluster_sleep_1>;
+};
+
+/* L3Cluster.D4 from the ACPI tables: powers down the cluster and its L3 */
 &cluster_sleep_0 {
-	arm,psci-suspend-param = <0x41008244>;
+	arm,psci-suspend-param = <0x41000044>;
 };
 
 &gcc {
-- 
2.56.0.611.g1030f0b940-goog


  parent reply	other threads:[~2026-11-11 11:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 11:53 [PATCH 0/7] Lenovo Yoga C630 (sdm845) fixes Ard Biesheuvel
2026-11-11 11:53 ` [PATCH 1/7] arm64: dts: qcom: sdm845: Bump fastrpc shared DMA pool to 32MB for 16k pages Ard Biesheuvel
2026-11-11 14:42   ` Abel Vesa
2026-11-11 11:53 ` [PATCH 2/7] arm64: dts: qcom: c630: Use LN_BB_CLK2 as the eDP bridge reference clock Ard Biesheuvel
2026-11-11 12:43   ` Dmitry Baryshkov
2026-11-11 13:15     ` Ard Biesheuvel
2026-11-11 13:45       ` Ard Biesheuvel
2026-11-11 11:53 ` [PATCH 3/7] arm64: dts: qcom: c630: Enable DisplayPort alt mode Ard Biesheuvel
2026-11-11 12:50   ` Dmitry Baryshkov
2026-11-11 14:42   ` Abel Vesa
2026-11-11 11:53 ` Ard Biesheuvel [this message]
2026-11-11 12:56   ` [PATCH 4/7] arm64: dts: qcom: c630: Use the idle states from the ACPI tables Dmitry Baryshkov
2026-11-11 14:42   ` Abel Vesa
2026-11-11 11:53 ` [PATCH 5/7] arm64: dts: qcom: c630: Wait for the touchpad at resume Ard Biesheuvel
2026-11-11 12:22   ` Ard Biesheuvel
2026-11-11 12:58     ` Dmitry Baryshkov
2026-11-11 13:16       ` Ard Biesheuvel
2026-11-11 12:56   ` Dmitry Baryshkov
2026-11-11 11:53 ` [PATCH 6/7] platform: arm64: lenovo-yoga-c630: Disable the EC interrupt while suspended Ard Biesheuvel
2026-11-11 12:57   ` Dmitry Baryshkov
2026-11-11 11:53 ` [PATCH 7/7] platform: arm64: lenovo-yoga-c630: Expose the keyboard backlight as an LED Ard Biesheuvel

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=20261111115303.3749380-13-ardb+git@google.com \
    --to=ardb+git@google.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=ardb@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=lumag@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