Commit | Line | Data |
---|---|---|
65397edf WD |
1 | * Power State Coordination Interface (PSCI) |
2 | ||
3 | Firmware implementing the PSCI functions described in ARM document number | |
4 | ARM DEN 0022A ("Power State Coordination Interface System Software on ARM | |
5 | processors") can be used by Linux to initiate various CPU-centric power | |
6 | operations. | |
7 | ||
8 | Issue A of the specification describes functions for CPU suspend, hotplug | |
9 | and migration of secure software. | |
10 | ||
11 | Functions are invoked by trapping to the privilege level of the PSCI | |
12 | firmware (specified as part of the binding below) and passing arguments | |
13 | in a manner similar to that specified by AAPCS: | |
14 | ||
15 | r0 => 32-bit Function ID / return value | |
16 | {r1 - r3} => Parameters | |
17 | ||
18 | Note that the immediate field of the trapping instruction must be set | |
19 | to #0. | |
20 | ||
21 | ||
22 | Main node required properties: | |
23 | ||
e1cd3b36 AC |
24 | - compatible : should contain at least one of: |
25 | ||
26 | * "arm,psci" : for implementations complying to PSCI versions prior to | |
27 | 0.2. For these cases function IDs must be provided. | |
28 | ||
29 | * "arm,psci-0.2" : for implementations complying to PSCI 0.2. Function | |
30 | IDs are not required and should be ignored by an OS with PSCI 0.2 | |
31 | support, but are permitted to be present for compatibility with | |
32 | existing software when "arm,psci" is later in the compatible list. | |
65397edf WD |
33 | |
34 | - method : The method of calling the PSCI firmware. Permitted | |
35 | values are: | |
36 | ||
37 | "smc" : SMC #0, with the register assignments specified | |
38 | in this binding. | |
39 | ||
40 | "hvc" : HVC #0, with the register assignments specified | |
41 | in this binding. | |
42 | ||
43 | Main node optional properties: | |
44 | ||
45 | - cpu_suspend : Function ID for CPU_SUSPEND operation | |
46 | ||
47 | - cpu_off : Function ID for CPU_OFF operation | |
48 | ||
49 | - cpu_on : Function ID for CPU_ON operation | |
50 | ||
51 | - migrate : Function ID for MIGRATE operation | |
52 | ||
3f8161b2 LP |
53 | Device tree nodes that require usage of PSCI CPU_SUSPEND function (ie idle |
54 | state nodes, as per bindings in [1]) must specify the following properties: | |
55 | ||
56 | - arm,psci-suspend-param | |
57 | Usage: Required for state nodes[1] if the corresponding | |
58 | idle-states node entry-method property is set | |
59 | to "psci". | |
60 | Value type: <u32> | |
61 | Definition: power_state parameter to pass to the PSCI | |
62 | suspend call. | |
65397edf WD |
63 | |
64 | Example: | |
65 | ||
e1cd3b36 AC |
66 | Case 1: PSCI v0.1 only. |
67 | ||
65397edf WD |
68 | psci { |
69 | compatible = "arm,psci"; | |
70 | method = "smc"; | |
71 | cpu_suspend = <0x95c10000>; | |
72 | cpu_off = <0x95c10001>; | |
73 | cpu_on = <0x95c10002>; | |
74 | migrate = <0x95c10003>; | |
75 | }; | |
e1cd3b36 | 76 | |
e1cd3b36 AC |
77 | Case 2: PSCI v0.2 only |
78 | ||
79 | psci { | |
80 | compatible = "arm,psci-0.2"; | |
81 | method = "smc"; | |
82 | }; | |
83 | ||
84 | Case 3: PSCI v0.2 and PSCI v0.1. | |
85 | ||
86 | A DTB may provide IDs for use by kernels without PSCI 0.2 support, | |
87 | enabling firmware and hypervisors to support existing and new kernels. | |
88 | These IDs will be ignored by kernels with PSCI 0.2 support, which will | |
89 | use the standard PSCI 0.2 IDs exclusively. | |
90 | ||
91 | psci { | |
92 | compatible = "arm,psci-0.2", "arm,psci"; | |
93 | method = "hvc"; | |
94 | ||
95 | cpu_on = < arbitrary value >; | |
96 | cpu_off = < arbitrary value >; | |
97 | ||
98 | ... | |
99 | }; | |
3f8161b2 LP |
100 | |
101 | [1] Kernel documentation - ARM idle states bindings | |
102 | Documentation/devicetree/bindings/arm/idle-states.txt |