mirror of
https://github.com/Evolution-X-Devices/kernel_xiaomi_sm8450-devicetrees
synced 2026-02-01 08:51:30 +00:00
dt-bindings: msm: add PM drivers device bindings
Add system_pm, lpm_levels and RPMH master stats device bindings for power drivers. Change-Id: I31cff3d94a7e3649cc720e0ca02e34bdfd65b3f3
This commit is contained in:
237
bindings/arm/msm/lpm-levels.txt
Normal file
237
bindings/arm/msm/lpm-levels.txt
Normal file
@@ -0,0 +1,237 @@
|
||||
* Low Power Management Levels
|
||||
|
||||
The application processor in MSM can do a variety of C-States for low power
|
||||
management. The LPM module performs the System low power modes based on
|
||||
the latency/residency information of the individual CPUs and clusters.
|
||||
|
||||
LPM-levels defines a hierarchy of low power modes that a cluster and
|
||||
clusters/cpus within that cluster can enter. The bottom hierarchy level
|
||||
represents the low power modes that a CPU can enter. The CPU low power nodes
|
||||
are associated with a cluster that defines the low power modes that a cluster
|
||||
can enter. For system involving a hierarchy of clusters, the cluster low power
|
||||
modes can be contained within another cluster.
|
||||
|
||||
[Top Level Node]
|
||||
Required properties:
|
||||
|
||||
- compatible: "qcom,lpm-levels"
|
||||
|
||||
[Node bindings for qcom,pm-cluster]
|
||||
Required properties:
|
||||
- reg - The numeric cluster id
|
||||
- label: Identifies the cluster name. The name is used when reporting
|
||||
the stats for each low power mode.
|
||||
- qcom,psci-mode-shift: The property is used to determine with bit
|
||||
location of the cluster mode in the composite state ID used to define
|
||||
cluster low power modes in PSCI.
|
||||
- qcom,psci-mode-mask: The property is used to determine with bit
|
||||
mask of the cluster mode in the composite state ID used to define
|
||||
cluster low power modes in PSCI.
|
||||
|
||||
Optional properties:
|
||||
- qcom,disable-prediction: This property is used to indicate the LPM
|
||||
governor will not use LPM prediction for this cluster.
|
||||
- qcom,clstr-tmr-add: This property is used as correction timer for
|
||||
wrong prediction by lpm prediction algorithm for cluster predictions.
|
||||
This value should be between 100 to 1500. Higher values would mean
|
||||
longer time staying in shallower state before waking up to select a
|
||||
deeper state in case of wrong prediction.
|
||||
qcom,pm-cluster contains qcom,pm-cluster-level nodes which identify
|
||||
the various low power modes that the cluster can enter. The
|
||||
qcom,pm-cluster node should also include another cluster node or a cpu
|
||||
node that defines their respective low power modes.
|
||||
|
||||
[Node bindings for qcom,pm-cluster-level]
|
||||
Required properties:
|
||||
- compatible: must be "arm,idle-state"
|
||||
- reg: The numeric cpu level id
|
||||
- idle-state-name: Name to identify the low power mode in stats
|
||||
- qcom,psci-cpu-mode: ID to be passed into PSCI firmware.
|
||||
- arm,psci-suspend-param: State ID for the CPU idle state
|
||||
- entry-latency-us: The latency to enter LPM level, in uSec
|
||||
- exit-latency-us: The latency to exit LPM level, in uSec
|
||||
- min-residency-us: The minimum residency value from which entering
|
||||
to low power mode is beneficial, in uSec
|
||||
- qcom,min-child-idx: The minimum level that a child CPU should be in
|
||||
before this level can be chosen. This property is required for all
|
||||
non-default level.
|
||||
|
||||
Optional properties:
|
||||
- qcom,notify-rpm: When set, the driver configures the sleep and wake
|
||||
sets. It also configures the next wakeup time for APPS.
|
||||
- qcom,is-reset: This boolean property tells whether cluster level need
|
||||
power management notifications to be sent out or not for the drivers to
|
||||
prepare for cluster collapse.
|
||||
- qcom,reset-level: This property is used to determine in this
|
||||
low power mode only control logic power collapse happens or memory
|
||||
logic power collapse aswell happens or retention state.
|
||||
The accepted values for this property are:
|
||||
"LPM_RESET_LVL_NONE" - No power collapse
|
||||
"LPM_RESET_LVL_RET" - Retention state
|
||||
"LPM_RESET_LVL_GDHS" - Only control logic power collapse (GDHS)
|
||||
"LPM_RESET_LVL_PC" - Control logic and memory logic
|
||||
power collapse (PC)
|
||||
|
||||
[Node bindings for qcom,pm-cpu]
|
||||
qcom,pm-cpu contains the low power modes that a cpu could enter and the CPUs
|
||||
that share the parameters.It contains the following properties.
|
||||
- qcom,cpu: List of CPU phandles to identify the CPUs associated with
|
||||
this cluster.
|
||||
- qcom,psci-mode-shift: Same as cluster level fields.
|
||||
- qcom,psci-mode-mask: Same as cluster level fields.
|
||||
- qcom,pm-cpu-levels: The different low power modes that a CPU could
|
||||
enter. The following section explains the required properties of this
|
||||
node.
|
||||
|
||||
Optional properties:
|
||||
- qcom,disable-prediction: This property is used to indicate the
|
||||
LPM governor is to disable sleep prediction to this cpu.
|
||||
- qcom,ref-stddev: This property is used as reference standard deviation
|
||||
in lpm prediction algorithm. This value should be between 100 to 1000.
|
||||
Higher value would result in more predictions and thereby resulting in
|
||||
shallower low power modes.
|
||||
- qcom,tmr-add: This property is used as correction timer for wrong
|
||||
prediction by lpm prediction algorithm. This value should be between
|
||||
100 to 1500. Higher values would mean longer time staying in shallower
|
||||
state before waking up to select a deeper state in case of wrong prediction.
|
||||
- qcom,ref-premature-cnt: This property is used as reference premature
|
||||
count to predict next sleep state by the prediction algorithm. This value
|
||||
should be between 1 to 5. Higher value for this parameter would result in
|
||||
less predictions to disallow deeper low power modes.
|
||||
|
||||
[Node bindings for qcom,pm-cpu-levels]
|
||||
Required properties:
|
||||
- compatible: must be "arm,idle-state"
|
||||
- reg: The numeric cpu level id
|
||||
- idle-state-name: Name to identify the low power mode in stats
|
||||
- qcom,psci-cpu-mode: ID to be passed into PSCI firmware.
|
||||
- arm,psci-suspend-param: State ID for the CPU idle state
|
||||
- entry-latency-us: The latency to enter LPM level, in uSec
|
||||
- exit-latency-us: The latency to exit LPM level, in uSec
|
||||
- min-residency-us: The minimum residency value from which entering
|
||||
to low power mode is beneficial, in uSec
|
||||
|
||||
Optional properties:
|
||||
- qcom,is-reset: This boolean property maps to "power state" bit in PSCI
|
||||
state_id configuration. This property will tell whether CPU get reset for
|
||||
a particular LPM or not. This property is also used to notify the drivers
|
||||
in case of cpu reset.
|
||||
- qcom,use-broadcast-timer: Indicates that the timer gets reset during
|
||||
power collapse and the cpu relies on Broadcast timer for scheduled wakeups.
|
||||
Required only for states where the CPUs internal timer state is lost.
|
||||
|
||||
[Example dts]
|
||||
|
||||
qcom,lpm-levels {
|
||||
compatible = "qcom,lpm-levels";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
qcom,pm-cluster@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
idle-state-name = "L3";
|
||||
qcom,clstr-tmr-add = <1000>;
|
||||
qcom,psci-mode-shift = <4>;
|
||||
qcom,psci-mode-mask = <0xfff>;
|
||||
|
||||
CLUSTER_WFI: qcom,pm-cluster-level@0 { /* D1 */
|
||||
reg = <0>;
|
||||
compatible = "arm,idle-state";
|
||||
idle-state-name = "l3-wfi";
|
||||
entry-latency-us = <48>;
|
||||
exit-latency-us = <51>;
|
||||
min-residency-us = <99>;
|
||||
arm,psci-suspend-param = <0x10>;
|
||||
qcom,psci-mode = <0x1>;
|
||||
};
|
||||
|
||||
CLUSTER_OFF: qcom,pm-cluster-level@1 { /* LLCC off, AOSS sleep */
|
||||
reg = <1>;
|
||||
compatible = "arm,idle-state";
|
||||
idle-state-name = "llcc-off";
|
||||
entry-latency-us = <3263>;
|
||||
exit-latency-us = <6562>;
|
||||
min-residency-us = <9987>;
|
||||
arm,psci-suspend-param = <0xc240>;
|
||||
qcom,psci-mode = <0xc24>;
|
||||
qcom,is-reset;
|
||||
qcom,notify-rpm;
|
||||
qcom,min-child-idx = <1>;
|
||||
};
|
||||
|
||||
qcom,pm-cpu@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
qcom,psci-mode-shift = <0>;
|
||||
qcom,psci-mode-mask = <0xf>;
|
||||
qcom,ref-stddev = <500>;
|
||||
qcom,tmr-add = <1000>;
|
||||
qcom,ref-premature-cnt = <1>;
|
||||
qcom,cpu = <&CPU0 &CPU1 &CPU2 &CPU3>;
|
||||
|
||||
SLVR_WFI: qcom,pm-cpu-level@0 { /* C1 */
|
||||
reg = <0>;
|
||||
compatible = "arm,idle-state";
|
||||
idle-state-name = "wfi";
|
||||
entry-latency-us = <57>;
|
||||
exit-latency-us = <43>;
|
||||
min-residency-us = <100>;
|
||||
arm,psci-suspend-param = <0x1>;
|
||||
qcom,psci-cpu-mode = <0x1>;
|
||||
};
|
||||
|
||||
SLVR_RAIL_OFF: qcom,pm-cpu-level@1 { /* C4 */
|
||||
reg = <1>;
|
||||
compatible = "arm,idle-state";
|
||||
idle-state-name = "rail-pc";
|
||||
entry-latency-us = <360>;
|
||||
exit-latency-us = <531>;
|
||||
min-residency-us = <3934>;
|
||||
arm,psci-suspend-param = <0x40000004>;
|
||||
local-timer-stop;
|
||||
qcom,psci-cpu-mode = <0x4>;
|
||||
qcom,is-reset;
|
||||
qcom,use-broadcast-timer;
|
||||
};
|
||||
};
|
||||
|
||||
qcom,pm-cpu@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
qcom,psci-mode-shift = <0>;
|
||||
qcom,psci-mode-mask = <0xf>;
|
||||
qcom,cpu = <&CPU4 &CPU5 &CPU6 &CPU7>;
|
||||
|
||||
GOLD_WFI: qcom,pm-cpu-level@0 { /* C1 */
|
||||
reg = <0>;
|
||||
compatible = "arm,idle-state";
|
||||
idle-state-name = "wfi";
|
||||
entry-latency-us = <57>;
|
||||
exit-latency-us = <43>;
|
||||
min-residency-us = <83>;
|
||||
arm,psci-suspend-param = <0x1>;
|
||||
qcom,psci-cpu-mode = <0x1>;
|
||||
};
|
||||
|
||||
GOLD_RAIL_OFF: qcom,pm-cpu-level@1 { /* C4 */
|
||||
reg = <1>;
|
||||
compatible = "arm,idle-state";
|
||||
idle-state-name = "rail-pc";
|
||||
entry-latency-us = <702>;
|
||||
exit-latency-us = <1061>;
|
||||
min-residency-us = <4488>;
|
||||
arm,psci-suspend-param = <0x40000004>;
|
||||
local-timer-stop;
|
||||
qcom,psci-cpu-mode = <0x4>;
|
||||
qcom,is-reset;
|
||||
qcom,use-broadcast-timer;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
32
bindings/arm/msm/rpmh-master-stats.txt
Normal file
32
bindings/arm/msm/rpmh-master-stats.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
* RPMH Master Stats
|
||||
|
||||
Differet Subsystems maintains master data in SMEM.
|
||||
It tells about the individual masters information at any given
|
||||
time like "system sleep counts", "system sleep last entered at"
|
||||
and "system sleep accumulated duration" etc. These stats can be
|
||||
displayed using the sysfs interface.
|
||||
To achieve this, device tree node has been added.
|
||||
|
||||
Additionally, RPMH master stats also maintains application processor's
|
||||
master stats. It uses profiling units to calculate power down and power
|
||||
up stats.
|
||||
|
||||
The required properties for rpmh-master-stats are:
|
||||
|
||||
- compatible:
|
||||
Usage: required
|
||||
Value type: <string>
|
||||
Definition: Should be "qcom,rpmh-master-stats-v1".
|
||||
|
||||
- reg:
|
||||
Usage: required
|
||||
Value type: <prop-encoded-array>
|
||||
Definition: Specifies physical address of start of profiling unit.
|
||||
|
||||
Example:
|
||||
|
||||
qcom,rpmh-master-stats {
|
||||
compatible = "qcom,rpmh-master-stats";
|
||||
reg = <0xb221200 0x60>;
|
||||
};
|
||||
|
||||
20
bindings/arm/msm/system-pm.txt
Normal file
20
bindings/arm/msm/system-pm.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
SYSTEM PM
|
||||
|
||||
System PM device is a virtual device that handles all CPU subsystem low power
|
||||
mode activties. When entering core shutdown, resource state that were
|
||||
requested
|
||||
from the processor may be relinquished and set to idle and restored when the
|
||||
cores are brought out of sleep.
|
||||
|
||||
PROPERTIES
|
||||
|
||||
- compatible:
|
||||
Usage: required
|
||||
Value type: <string>
|
||||
Definition: must be "qcom,system-pm".
|
||||
|
||||
EXAMPLE
|
||||
|
||||
system_pm {
|
||||
compatible = "qcom,system-pm";
|
||||
};
|
||||
Reference in New Issue
Block a user