From f18c7dc673ad5f458366e2df1e8860b043410a87 Mon Sep 17 00:00:00 2001 From: Maulik Shah Date: Thu, 3 Mar 2022 16:01:40 +0530 Subject: [PATCH] ARM: dts: msm: Add idle states, cluster device and sleep stats for sm8150 Add various idle states used by CPUs and cluster device. Also add SoC sleep stats and subsystem sleep stats devices. Change-Id: I48cd194a68e0628a313ba5de64918db89edf436b --- qcom/sm8150.dtsi | 114 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/qcom/sm8150.dtsi b/qcom/sm8150.dtsi index d2e4892c..8872c1f0 100644 --- a/qcom/sm8150.dtsi +++ b/qcom/sm8150.dtsi @@ -28,6 +28,9 @@ compatible = "arm,armv8"; reg = <0x0 0x0>; enable-method = "psci"; + cpu-idle-states = <&SILVER_OFF>; + power-domains = <&CPU_PD0>; + power-domain-names = "psci"; capacity-dmips-mhz = <1024>; i-cache-size = <0x8000>; d-cache-size = <0x8000>; @@ -51,6 +54,9 @@ compatible = "arm,armv8"; reg = <0x0 0x100>; enable-method = "psci"; + cpu-idle-states = <&SILVER_OFF>; + power-domains = <&CPU_PD1>; + power-domain-names = "psci"; capacity-dmips-mhz = <1024>; i-cache-size = <0x8000>; d-cache-size = <0x8000>; @@ -68,6 +74,9 @@ compatible = "arm,armv8"; reg = <0x0 0x200>; enable-method = "psci"; + cpu-idle-states = <&SILVER_OFF>; + power-domains = <&CPU_PD2>; + power-domain-names = "psci"; capacity-dmips-mhz = <1024>; i-cache-size = <0x8000>; d-cache-size = <0x8000>; @@ -85,6 +94,9 @@ compatible = "arm,armv8"; reg = <0x0 0x300>; enable-method = "psci"; + cpu-idle-states = <&SILVER_OFF>; + power-domains = <&CPU_PD3>; + power-domain-names = "psci"; capacity-dmips-mhz = <1024>; i-cache-size = <0x8000>; d-cache-size = <0x8000>; @@ -102,6 +114,9 @@ compatible = "arm,armv8"; reg = <0x0 0x400>; enable-method = "psci"; + cpu-idle-states = <&GOLD_OFF>; + power-domains = <&CPU_PD4>; + power-domain-names = "psci"; capacity-dmips-mhz = <1740>; i-cache-size = <0x10000>; d-cache-size = <0x10000>; @@ -119,6 +134,9 @@ compatible = "arm,armv8"; reg = <0x0 0x500>; enable-method = "psci"; + cpu-idle-states = <&GOLD_OFF>; + power-domains = <&CPU_PD5>; + power-domain-names = "psci"; capacity-dmips-mhz = <1740>; i-cache-size = <0x10000>; d-cache-size = <0x10000>; @@ -136,6 +154,9 @@ compatible = "arm,armv8"; reg = <0x0 0x600>; enable-method = "psci"; + cpu-idle-states = <&GOLD_OFF>; + power-domains = <&CPU_PD6>; + power-domain-names = "psci"; capacity-dmips-mhz = <1740>; i-cache-size = <0x10000>; d-cache-size = <0x10000>; @@ -153,6 +174,9 @@ compatible = "arm,armv8"; reg = <0x0 0x700>; enable-method = "psci"; + cpu-idle-states = <&GOLD_OFF>; + power-domains = <&CPU_PD7>; + power-domain-names = "psci"; capacity-dmips-mhz = <1740>; i-cache-size = <0x10000>; d-cache-size = <0x10000>; @@ -206,9 +230,85 @@ }; }; + idle-states { + SILVER_OFF: silver-c4 { /* C4 */ + compatible = "arm,idle-state"; + idle-state-name = "rail-pc"; + entry-latency-us = <355>; + exit-latency-us = <909>; + min-residency-us = <3934>; + arm,psci-suspend-param = <0x40000004>; + local-timer-stop; + }; + + GOLD_OFF: gold-c4 { /* C4 */ + compatible = "arm,idle-state"; + idle-state-name = "rail-pc"; + entry-latency-us = <2411>; + exit-latency-us = <1461>; + min-residency-us = <4488>; + arm,psci-suspend-param = <0x40000004>; + local-timer-stop; + }; + + APSS_OFF: cluster-e3 { /* E3 */ + compatible = "domain-idle-state"; + idle-state-name = "llcc-off"; + entry-latency-us = <3263>; + exit-latency-us = <6562>; + min-residency-us = <9987>; + arm,psci-suspend-param = <0x4100c344>; + }; + }; + psci { compatible = "arm,psci-1.0"; method = "smc"; + + CPU_PD0: cpu-pd0 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + }; + + CPU_PD1: cpu-pd1 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + }; + + CPU_PD2: cpu-pd2 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + }; + + CPU_PD3: cpu-pd3 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + }; + + CPU_PD4: cpu-pd4 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + }; + + CPU_PD5: cpu-pd5 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + }; + + CPU_PD6: cpu-pd6 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + }; + + CPU_PD7: cpu-pd7 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + }; + + CLUSTER_PD: cluster-pd { + #power-domain-cells = <0>; + domain-idle-states = <&APSS_OFF>; + }; }; chosen { }; @@ -553,6 +653,7 @@ interrupts = , , ; + power-domains = <&CLUSTER_PD>; apps_rsc_drv2: drv@2 { qcom,drv-id = <2>; @@ -575,6 +676,11 @@ }; }; + cluster-device { + compatible = "qcom,lpm-cluster-dev"; + power-domains = <&CLUSTER_PD>; + }; + disp_rsc: rsc@af20000 { label = "disp_rsc"; compatible = "qcom,rpmh-rsc"; @@ -656,6 +762,14 @@ qcom,mem-buf-msgq { compatible = "qcom,mem-buf-msgq"; }; + + soc-sleep-stats@c3f0000 { + compatible = "qcom,rpmh-sleep-stats-legacy"; + reg = <0xc3f0000 0x400>; + ss-name = "modem", "adsp", "adsp_island", + "cdsp", "slpi", "slpi_island", + "apss"; + }; }; &firmware {