arm64: dts: qcom: sm8150: Add support for deep CPU cluster idle
authorDanny Lin <danny@kdrag0n.dev>
Tue, 5 Jan 2021 20:10:00 +0000 (12:10 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 12 Jan 2021 14:10:51 +0000 (08:10 -0600)
commitb2e3f897684ccc03139c8455e17abcc27bb5d491
tree136c2ffa99009e542bbc7050a57484c760fa657b
parente5376f2ea2e2de4519092287382efdb226acec27
arm64: dts: qcom: sm8150: Add support for deep CPU cluster idle

This commit adds support for deep idling of the entire unified DynamIQ
CPU cluster on sm8150. In this idle state, the LLCC (Last-Level Cache
Controller) is powered off and the AOP (Always-On Processor) enters a
low-power sleep state.

I'm not sure what the per-CPU 0x400000f4 idle state previously
contributed by Qualcomm as the "cluster sleep" state is, but the
downstream kernel has no such state. The real deep cluster idle state
is 0x41000c244, composed of:

    Cluster idle state: (0xc24) << 4 = 0xc240
    Is reset state: 1 << 30 = 0x40000000
    Affinity level: 1 << 24 = 0x1000000
    CPU idle state: 0x4 (power collapse)

This setup can be replicated with the PSCI power domain cpuidle driver,
which utilizes OSI to enter cluster idle when the last active CPU
enters idle.

The cluster idle state cannot be used as a plain cpuidle state because
it requires that all CPUs in the cluster are idling.

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Link: https://lore.kernel.org/r/20210105201000.913183-1-danny@kdrag0n.dev
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/sm8150.dtsi