Skip to content

Commit 07ddb30

Browse files
committed
arm64: dts: qcom: sm8350: Add CPU topology and idle-states
Add CPU topology and define the idle states for the silver and gold cores as well as the cluster. Signed-off-by: Bjorn Andersson <[email protected]> Reviewed-by: Robert Foss <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 442ee1f commit 07ddb30

File tree

1 file changed

+141
-0
lines changed

1 file changed

+141
-0
lines changed

arch/arm64/boot/dts/qcom/sm8350.dtsi

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
enable-method = "psci";
4848
next-level-cache = <&L2_0>;
4949
qcom,freq-domain = <&cpufreq_hw 0>;
50+
power-domains = <&CPU_PD0>;
51+
power-domain-names = "psci";
5052
#cooling-cells = <2>;
5153
L2_0: l2-cache {
5254
compatible = "cache";
@@ -64,6 +66,8 @@
6466
enable-method = "psci";
6567
next-level-cache = <&L2_100>;
6668
qcom,freq-domain = <&cpufreq_hw 0>;
69+
power-domains = <&CPU_PD1>;
70+
power-domain-names = "psci";
6771
#cooling-cells = <2>;
6872
L2_100: l2-cache {
6973
compatible = "cache";
@@ -78,6 +82,8 @@
7882
enable-method = "psci";
7983
next-level-cache = <&L2_200>;
8084
qcom,freq-domain = <&cpufreq_hw 0>;
85+
power-domains = <&CPU_PD2>;
86+
power-domain-names = "psci";
8187
#cooling-cells = <2>;
8288
L2_200: l2-cache {
8389
compatible = "cache";
@@ -92,6 +98,8 @@
9298
enable-method = "psci";
9399
next-level-cache = <&L2_300>;
94100
qcom,freq-domain = <&cpufreq_hw 0>;
101+
power-domains = <&CPU_PD3>;
102+
power-domain-names = "psci";
95103
#cooling-cells = <2>;
96104
L2_300: l2-cache {
97105
compatible = "cache";
@@ -106,6 +114,8 @@
106114
enable-method = "psci";
107115
next-level-cache = <&L2_400>;
108116
qcom,freq-domain = <&cpufreq_hw 1>;
117+
power-domains = <&CPU_PD4>;
118+
power-domain-names = "psci";
109119
#cooling-cells = <2>;
110120
L2_400: l2-cache {
111121
compatible = "cache";
@@ -120,6 +130,8 @@
120130
enable-method = "psci";
121131
next-level-cache = <&L2_500>;
122132
qcom,freq-domain = <&cpufreq_hw 1>;
133+
power-domains = <&CPU_PD5>;
134+
power-domain-names = "psci";
123135
#cooling-cells = <2>;
124136
L2_500: l2-cache {
125137
compatible = "cache";
@@ -135,6 +147,8 @@
135147
enable-method = "psci";
136148
next-level-cache = <&L2_600>;
137149
qcom,freq-domain = <&cpufreq_hw 1>;
150+
power-domains = <&CPU_PD6>;
151+
power-domain-names = "psci";
138152
#cooling-cells = <2>;
139153
L2_600: l2-cache {
140154
compatible = "cache";
@@ -149,12 +163,86 @@
149163
enable-method = "psci";
150164
next-level-cache = <&L2_700>;
151165
qcom,freq-domain = <&cpufreq_hw 2>;
166+
power-domains = <&CPU_PD7>;
167+
power-domain-names = "psci";
152168
#cooling-cells = <2>;
153169
L2_700: l2-cache {
154170
compatible = "cache";
155171
next-level-cache = <&L3_0>;
156172
};
157173
};
174+
175+
cpu-map {
176+
cluster0 {
177+
core0 {
178+
cpu = <&CPU0>;
179+
};
180+
181+
core1 {
182+
cpu = <&CPU1>;
183+
};
184+
185+
core2 {
186+
cpu = <&CPU2>;
187+
};
188+
189+
core3 {
190+
cpu = <&CPU3>;
191+
};
192+
193+
core4 {
194+
cpu = <&CPU4>;
195+
};
196+
197+
core5 {
198+
cpu = <&CPU5>;
199+
};
200+
201+
core6 {
202+
cpu = <&CPU6>;
203+
};
204+
205+
core7 {
206+
cpu = <&CPU7>;
207+
};
208+
};
209+
};
210+
211+
idle-states {
212+
entry-method = "psci";
213+
214+
LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
215+
compatible = "arm,idle-state";
216+
idle-state-name = "silver-rail-power-collapse";
217+
arm,psci-suspend-param = <0x40000004>;
218+
entry-latency-us = <355>;
219+
exit-latency-us = <909>;
220+
min-residency-us = <3934>;
221+
local-timer-stop;
222+
};
223+
224+
BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
225+
compatible = "arm,idle-state";
226+
idle-state-name = "gold-rail-power-collapse";
227+
arm,psci-suspend-param = <0x40000004>;
228+
entry-latency-us = <241>;
229+
exit-latency-us = <1461>;
230+
min-residency-us = <4488>;
231+
local-timer-stop;
232+
};
233+
};
234+
235+
domain-idle-states {
236+
CLUSTER_SLEEP_0: cluster-sleep-0 {
237+
compatible = "domain-idle-state";
238+
idle-state-name = "cluster-power-collapse";
239+
arm,psci-suspend-param = <0x4100c344>;
240+
entry-latency-us = <3263>;
241+
exit-latency-us = <6562>;
242+
min-residency-us = <9987>;
243+
local-timer-stop;
244+
};
245+
};
158246
};
159247

160248
firmware {
@@ -178,6 +266,59 @@
178266
psci {
179267
compatible = "arm,psci-1.0";
180268
method = "smc";
269+
270+
CPU_PD0: cpu0 {
271+
#power-domain-cells = <0>;
272+
power-domains = <&CLUSTER_PD>;
273+
domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
274+
};
275+
276+
CPU_PD1: cpu1 {
277+
#power-domain-cells = <0>;
278+
power-domains = <&CLUSTER_PD>;
279+
domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
280+
};
281+
282+
CPU_PD2: cpu2 {
283+
#power-domain-cells = <0>;
284+
power-domains = <&CLUSTER_PD>;
285+
domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
286+
};
287+
288+
CPU_PD3: cpu3 {
289+
#power-domain-cells = <0>;
290+
power-domains = <&CLUSTER_PD>;
291+
domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
292+
};
293+
294+
CPU_PD4: cpu4 {
295+
#power-domain-cells = <0>;
296+
power-domains = <&CLUSTER_PD>;
297+
domain-idle-states = <&BIG_CPU_SLEEP_0>;
298+
};
299+
300+
CPU_PD5: cpu5 {
301+
#power-domain-cells = <0>;
302+
power-domains = <&CLUSTER_PD>;
303+
domain-idle-states = <&BIG_CPU_SLEEP_0>;
304+
};
305+
306+
CPU_PD6: cpu6 {
307+
#power-domain-cells = <0>;
308+
power-domains = <&CLUSTER_PD>;
309+
domain-idle-states = <&BIG_CPU_SLEEP_0>;
310+
};
311+
312+
CPU_PD7: cpu7 {
313+
#power-domain-cells = <0>;
314+
power-domains = <&CLUSTER_PD>;
315+
domain-idle-states = <&BIG_CPU_SLEEP_0>;
316+
};
317+
318+
CLUSTER_PD: cpu-cluster0 {
319+
#power-domain-cells = <0>;
320+
domain-idle-states = <&CLUSTER_SLEEP_0>;
321+
};
181322
};
182323

183324
reserved_memory: reserved-memory {

0 commit comments

Comments
 (0)