Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bae66c3 authored by Mahesh Sivasubramanian's avatar Mahesh Sivasubramanian
Browse files

msm: lpm-levels: Support for cluster power management



Add power management support for multilevel cluster. The code is redesigned
to support low power modes with multiple hierarchies of clusters.

Change-Id: I0d0142e53bf2fe6152e7791f09bcb4d35a82e461
Signed-off-by: default avatarMahesh Sivasubramanian <msivasub@codeaurora.org>
parent 81406751
Loading
Loading
Loading
Loading
+254 −86
Original line number Diff line number Diff line
* 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 CPU and System low power modes based
on it latency and residency information of the individual CPU/System low power
levels.
management. The LPM module performs the System low power modes based on
the latency/residency information of the individual CPUs and clusters.

The first level node represents the properties of the system and includes
second level node to represent the low power modes of cpu and system.
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.

[First Level Nodes]
[Top Level Node]
Required properties:

- compatible: "qcom,lpm-levels"

The optional nodes for the First level nodes are:
- qcom,no-l2-saw: Indicates if this target has an L2 SAW (SPM and AVS wrapper).
- qcom,default-l2-state: Indicates what the default low power state of the L2
		SAW should be. This property should be mentioned when there is
		a L2 saw.
- qcom,allow-synced-levels:  Indicates if certain low power modes should be
		synchronized across all cores so as to configure a system
		low power mode.

[Second Level Nodes]
Required properties to define CPU low power modes :
- compatible = "qcom,cpu-modes";
- qcom,mode: The sleep mode of the processor, values for the property are:
[Node bindings for qcom,pm-cluster]
 Required properties:
	- reg - The numeric cluster id
	- label: Identifies the cluster name. The name will be
	used when reporting the stats for each low power mode.
	- qcom,spm-device-names: List of  SPM device names which control the
	low power modes for this driver. The lpm driver uses the device name
	to obtain a handle to the SPM driver that controls the cluster's low
	power mode.
	- qcom,default-level: The default low power level that a cluster is
	programmed. The SPM of the corresponding device is configured at this
	low power mode by default.
	- qcom,cpu: List of CPU phandles to identify the CPUs associated with
	this cluster. This property is required if and only if the cluster
	node contains a qcom,pm-cpu node.

	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:
	- reg: The numeric cluster level id
	- label: Name to identify the low power mode in stats
	module.
	- qcom,spm-<device-name>-mode: For each SPM device defined in
	qcom,spm-devices-names, a corresponding entry identifying the low
	power mode is expected. For example, the qcom,pm-cluster node contains
	a SPM device by name "l2" then the cluster level should contain a
	qcom,spm-l2-mode.  When a cluster level is chosen ,the SPM device is
	programmed with its
	corresponding low power mode. The accepted values for this property
	are:
		- "active"
		- "retention"
		- "gdhs"
		- "pc"
	- qcom,min-child-idx: The minimum level that a child CPU should be in
	before this level can be chosen.
	- qcom,latency-us: The latency in handling the interrupt if this level
	was chosen, in uSec
	- qcom,ss-power: The steady state power expelled when the processor is
	in this level in mWatts
	- qcom,energy-overhead: The energy used up in entering and exiting
	this level in mWatts.uSec
	- qcom,time-overhead: The time spent in entering and exiting this
	level in uS
 Optional properties:
	- qcom,notify-rpm: When set, the driver flushes the RPM sleep set and
	configures the virtual MPM driver in prepration for a RPM assisted
	sleep.
	- qcom,last-level - When set, the cluster level is applied only when
	there is 1 online core.

[Node bindings for qcom,pm-cpu]
qcom,pm-cpu contains the low power modes that a cpu could enter. Currently it
doesn't have any required properties and is a container for
qcom,pm-cpu-levels.

[Node bindings for qcom,pm-cpu-levels]
 Required properties:
	- reg: The numeric cpu level id
	- qcom,spm-cpu-mode: The sleep mode of the processor, values for the
	property are:
		"wfi" - Wait for Interrupt
		"retention" - Retention
		"standalone_pc" - Standalone power collapse
		"pc" - Power Collapse
- qcom,latency-us: The latency in handling the interrupt if this level was
		chosen, in uSec
- qcom,ss-power: The steady state power expelled when the processor is in this
		 level in mWatts
- qcom,energy-overhead: The energy used up in entering and exiting this level
		 in mWatts.uSec
- qcom,time-overhead: The time spent in entering and exiting this level in uS
- qcom,use-broadcast-timer: Indicates that the timer gets reset during power
		collapse and the cpu relies on Broadcast timer for scheduled
		wakeups.

Required propertieis to define System low power mode :
- compatible: "qcom,system-modes"
- qcom,l2: The state of L2 cache. Values are:
		"l2_cache_pc" - L2 cache in power collapse
		"l2_cache_pc_no_rpm" - L2 cache in power collapse. This mode
				wouldn't inform the RPM
		"l2_cache_retenetion" - L2 cache in retention
		"l2_cache_gdhs" - L2 cache in GDHS
		"l2_cache_active" - L2 cache in active mode

- qcom,latency-us: The latency in handling the interrupt if this level was
		chosen, in uSec
- qcom,ss-power: The steady state power expelled when the processor is in this
		level in mWatts
- qcom,energy-overhead: The energy used up in entering and exiting this level
		in mWatts.uSec
- qcom,time-overhead: The time spent in entering and exiting this level in uS
- qcom,min-cpu-mode: The min cpu sleep mode at which the given system level is
		valid. All cpus should have entered this low power mode before
		this system level can be chosen.
- qcom,sync-mode: The entry into this system mode should be synchronized across
		between all online CPUs.
- qcom,send-rpm-sleep-set: The system mode notifies RPM of Apps sleep and should
		send the current sleep set votes and configure MPM before
		entering this low power mode.

Example:
	- qcom,latency-us: The latency in handling the interrupt if this level
	was chosen, in uSec
	- qcom,ss-power: The steady state power expelled when the processor is
	in this level in mWatts
	- qcom,energy-overhead: The energy used up in entering and exiting
	this level in mWatts.uSec
	- qcom,time-overhead: The time spent in entering and exiting this
	level in uS
	- 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 {
	#address-cells = <1>;
	#size-cells = <0>;
	compatible = "qcom,lpm-levels";
		qcom,default-l2-state = "l2_cache_retention";

	qcom,pm-cluster@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;
		label = "system";
		qcom,spm-device-names = "cci";
		qcom,default-level = <0>;

		qcom,pm-cluster-level@0{
			reg = <0>;
			label = "system-cci-retention";
			qcom,spm-cci-mode = "retention";
			qcom,latency-us = <100>;
			qcom,ss-power = <1000>;
			qcom,energy-overhead = <300000>;
			qcom,time-overhead = <100>;
		};

		qcom,pm-cluster-level@2{
			reg = <1>;
			label = "system-cci-pc";
			qcom,spm-cci-mode = "pc";
			qcom,latency-us = <30000>;
			qcom,ss-power = <83>;
			qcom,energy-overhead = <2274420>;
			qcom,time-overhead = <6605>;
			qcom,min-child-idx = <1>;
			qcom,notify-rpm;
		};

		qcom,pm-cluster@0{
			#address-cells = <1>;
		#size-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
			label = "a53";
			qcom,spm-device-names = "l2";
			qcom,default-level=<0>;
			qcom,cpu = <&CPU0 &CPU1 &CPU2 &CPU3>;

			qcom,pm-cluster-level@0{
				reg = <0>;
				label = "a53-l2-retention";
				qcom,spm-l2-mode = "retention";
				qcom,latency-us = <100>;
				qcom,ss-power = <1000>;
				qcom,energy-overhead = <300000>;
				qcom,time-overhead = <100>;
			};

		qcom,cpu-modes {
			compatible = "qcom,cpu-modes";
			qcom,cpu-mode@0 {
				qcom,mode = "wfi";
			qcom,pm-cluster-level@1{
				reg = <1>;
				label = "a53-l2-pc";
				qcom,spm-l2-mode = "pc";
				qcom,latency-us = <30000>;
				qcom,ss-power = <83>;
				qcom,energy-overhead = <2274420>;
				qcom,time-overhead = <6605>;
				qcom,min-child-idx = <3>;
			};

			qcom,pm-cpu {
				#address-cells = <1>;
				#size-cells = <0>;
				qcom,pm-cpu-level@0 {
					reg = <0>;
					qcom,spm-cpu-mode = "wfi";
					qcom,latency-us = <1>;
					qcom,ss-power = <715>;
					qcom,energy-overhead = <17700>;
					qcom,time-overhead = <2>;
				};

			qcom,cpu-mode@1 {
				qcom,mode = "retention";
				qcom,pm-cpu-level@1 {
					reg = <1>;
					qcom,spm-cpu-mode = "retention";
					qcom,latency-us = <35>;
					qcom,ss-power = <542>;
					qcom,energy-overhead = <34920>;
					qcom,time-overhead = <40>;
				};

				qcom,pm-cpu-level@2 {
					reg = <2>;
					qcom,spm-cpu-mode = "standalone_pc";
					qcom,latency-us = <300>;
					qcom,ss-power = <476>;
					qcom,energy-overhead = <225300>;
					qcom,time-overhead = <350>;
				};
		qcom,system-modes {
			compatible = "qcom,system-modes";

			qcom,system-mode@0 {
				qcom,l2 = "l2_cache_gdhs";
				qcom,latency-us = <20000>;
				qcom,pm-cpu-level@3 {
					reg = <3>;
					qcom,spm-cpu-mode = "pc";
					qcom,latency-us = <500>;
					qcom,ss-power = <163>;
				qcom,energy-overhead = <1577736>;
				qcom,time-overhead = <5067>;
					qcom,energy-overhead = <577736>;
					qcom,time-overhead = <1000>;
				};
			};
		};

		qcom,pm-cluster@1{
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
			label = "a57";
			qcom,spm-device-names = "l2";
			qcom,default-level=<0>;
			qcom,cpu = <&CPU4 &CPU5 &CPU6 &CPU7>;

			qcom,pm-cluster-level@0{
				reg = <0>;
				label = "a57-l2-retention";
				qcom,spm-l2-mode = "retention";
				qcom,latency-us = <100>;
				qcom,ss-power = <1000>;
				qcom,energy-overhead = <300000>;
				qcom,time-overhead = <100>;
			};

			qcom,system-mode@1 {
				qcom,l2 = "l2_cache_pc";
			qcom,pm-cluster-level@2{
				reg = <1>;
				label = "a57-l2-pc";
				qcom,spm-l2-mode = "pc";
				qcom,latency-us = <30000>;
				qcom,ss-power = <83>;
				qcom,energy-overhead = <2274420>;
				qcom,time-overhead = <6605>;
				qcom,min-child-idx = <3>;
			};

			qcom,pm-cpu {
				#address-cells = <1>;
				#size-cells = <0>;
				qcom,pm-cpu-level@0 {
					reg = <0>;
					qcom,spm-cpu-mode = "wfi";
					qcom,latency-us = <1>;
					qcom,ss-power = <715>;
					qcom,energy-overhead = <17700>;
					qcom,time-overhead = <2>;
				};

				qcom,pm-cpu-level@1 {
					reg = <1>;
					qcom,spm-cpu-mode = "retention";
					qcom,latency-us = <35>;
					qcom,ss-power = <542>;
					qcom,energy-overhead = <34920>;
					qcom,time-overhead = <40>;
				};

				qcom,pm-cpu-level@2 {
					reg = <2>;
					qcom,spm-cpu-mode = "standalone_pc";
					qcom,latency-us = <300>;
					qcom,ss-power = <476>;
					qcom,energy-overhead = <225300>;
					qcom,time-overhead = <350>;
				};

				qcom,pm-cpu-level@3 {
					reg = <3>;
					qcom,spm-cpu-mode = "pc";
					qcom,latency-us = <500>;
					qcom,ss-power = <163>;
					qcom,energy-overhead = <577736>;
					qcom,time-overhead = <1000>;
				};
			};
		};
	};


};
+70 −50
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0xf9012000 0x1000>;
		qcom,name = "l2";
		qcom,name = "system-l2";
		qcom,core-id = <0xffff>; /* L2/APCS SAW */
		qcom,saw2-ver-reg = <0xfd0>;
		qcom,saw2-cfg = <0x14>;
@@ -137,70 +137,90 @@

	qcom,lpm-levels {
		compatible = "qcom,lpm-levels";
		qcom,default-l2-state = "l2_cache_retention";
		qcom,allow-synced-levels;
		#address-cells = <1>;
		#size-cells = <1>;
		#size-cells = <0>;

		qcom,pm-cluster@0{
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
			label = "system";
			qcom,spm-device-names = "l2";
			qcom,default-level=<0>;

			qcom,pm-cluster-level@0{
				reg = <0>;
				label = "l2-retention";
				qcom,spm-l2-mode = "retention";
				qcom,latency-us = <100>;
				qcom,ss-power = <1000>;
				qcom,energy-overhead = <300000>;
				qcom,time-overhead = <100>;
				qcom,min-child-idx = <2>;
			};

			qcom,pm-cluster-level@1{
				reg = <1>;
				label = "l2-gdhs";
				qcom,spm-l2-mode = "gdhs";
				qcom,latency-us = <500>;
				qcom,ss-power = <163>;
				qcom,energy-overhead = <577736>;
				qcom,time-overhead = <1000>;
				qcom,min-child-idx = <2>;
			};

			qcom,pm-cluster-level@2{
				reg = <2>;
				label = "l2-pc";
				qcom,spm-l2-mode = "pc";
				qcom,latency-us = <30000>;
				qcom,ss-power = <83>;
				qcom,energy-overhead = <2274420>;
				qcom,time-overhead = <6605>;
				qcom,min-child-idx = <3>;
				qcom,notify-rpm;
			};

		qcom,cpu-modes {
			compatible = "qcom,cpu-modes";
			qcom,pm-cpu {
				#address-cells = <1>;
				#size-cells = <0>;

			qcom,cpu-mode@0 {
				qcom,mode = "wfi";
				qcom,pm-cpu-level@0 {
					reg = <0>;
					qcom,spm-cpu-mode = "wfi";
					qcom,latency-us = <1>;
					qcom,ss-power = <715>;
					qcom,energy-overhead = <17700>;
					qcom,time-overhead = <2>;
				};

			qcom,cpu-mode@1 {
				qcom,mode = "retention";
				qcom,pm-cpu-level@1 {
					reg = <1>;
					qcom,spm-cpu-mode = "retention";
					qcom,latency-us = <35>;
					qcom,ss-power = <542>;
					qcom,energy-overhead = <34920>;
					qcom,time-overhead = <40>;
				};

			qcom,cpu-mode@2 {
				qcom,mode = "standalone_pc";
				qcom,pm-cpu-level@2 {
					reg = <2>;
					qcom,spm-cpu-mode = "standalone_pc";
					qcom,latency-us = <300>;
					qcom,ss-power = <476>;
					qcom,energy-overhead = <225300>;
					qcom,time-overhead = <350>;
				};

			qcom,cpu-mode@3 {
				qcom,mode = "pc";
				qcom,latency-us = <500>;
				qcom,ss-power = <400>;
				qcom,energy-overhead = <280000>;
				qcom,time-overhead = <500>;
				qcom,use-broadcast-timer;
			};

		};
		qcom,system-modes {
			compatible = "qcom,system-modes";

			qcom,system-mode@0 {
				qcom,l2 = "l2_cache_gdhs";
				qcom,pm-cpu-level@3 {
					reg = <3>;
					qcom,spm-cpu-mode = "pc";
					qcom,latency-us = <500>;
					qcom,ss-power = <163>;
					qcom,energy-overhead = <577736>;
					qcom,time-overhead = <1000>;
				qcom,min-cpu-mode= "standalone_pc";
				qcom,sync-mode;
				};

			qcom,system-mode@1 {
				qcom,l2 = "l2_cache_pc";
				qcom,latency-us = <30000>;
				qcom,ss-power = <83>;
				qcom,energy-overhead = <2274420>;
				qcom,time-overhead = <6605>;
				qcom,min-cpu-mode = "pc";
				qcom,send-rpm-sleep-set;
				qcom,sync-mode;
			};
		};
	};
+50 −32
Original line number Diff line number Diff line
@@ -29,58 +29,76 @@

	qcom,lpm-levels {
		compatible = "qcom,lpm-levels";
		qcom,no-l2-saw;
		#address-cells = <1>;
		#size-cells = <0>;

		qcom,cpu-modes {
			compatible = "qcom,cpu-modes";
			qcom,cpu-mode@0 {
				qcom,mode = "wfi";
		qcom,pm-cluster@0{
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
			label = "system";
			qcom,default-level = <0>;

			qcom,pm-cluster-level@0 {
				reg = <0>;
				label = "l2-active";
				qcom,latency-us = <100>;
				qcom,ss-power = <8000>;
				qcom,energy-overhead = <100000>;
				qcom,time-overhead = <1>;
				qcom,energy-overhead = <60100000>;
				qcom,time-overhead = <3000>;
			};

			qcom,cpu-mode@1 {
				qcom,mode = "standalone_pc";
			qcom,pm-cluster-level@1 {
				reg = <1>;
				label = "l2-flush-no-rpm";
				qcom,latency-us = <2000>;
				qcom,ss-power = <5000>;
				qcom,energy-overhead = <60100000>;
				qcom,time-overhead = <3000>;
				qcom,min-child-idx = <1>;
			};

			qcom,cpu-mode@2 {
				qcom,mode = "pc";
			qcom,pm-cluster-level@2 {
				reg = <2>;
				label = "l2-pc";
				qcom,latency-us = <30000>;
				qcom,ss-power = <5000>;
				qcom,energy-overhead = <60350000>;
				qcom,time-overhead = <7300>;
				qcom,min-child-idx = <2>;
				qcom,notify-rpm;
			};

			qcom,pm-cpu {
				#address-cells = <1>;
				#size-cells = <0>;

				qcom,pm-cpu-level@0 {
					reg = <0>;
					qcom,spm-cpu-mode = "wfi";
					qcom,latency-us = <100>;
					qcom,ss-power = <8000>;
					qcom,energy-overhead = <100000>;
					qcom,time-overhead = <1>;
				};
		qcom,system-modes {
			compatible = "qcom,system-modes";

			qcom,system-mode@0 {
				qcom,l2 = "l2_cache_pc";
				qcom,pm-cpu-level@1 {
					reg = <1>;
					qcom,spm-cpu-mode = "standalone_pc";
					qcom,latency-us = <2000>;
					qcom,ss-power = <5000>;
					qcom,energy-overhead = <60100000>;
					qcom,time-overhead = <3000>;
				qcom,min-cpu-mode= "standalone_pc";
				qcom,sync-mode;
				};

			qcom,system-mode@1 {
				qcom,l2 = "l2_cache_pc";
				qcom,pm-cpu-level@2 {
					reg = <2>;
					qcom,spm-cpu-mode = "pc";
					qcom,latency-us = <30000>;
					qcom,ss-power = <5000>;
					qcom,energy-overhead = <60350000>;
					qcom,time-overhead = <7300>;
				qcom,min-cpu-mode= "pc";
				qcom,send-rpm-sleep-set;
				qcom,sync-mode;
				};
			};
		};
	};
+63 −44
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0xf9012000 0x1000>;
		qcom,name = "l2";
		qcom,name = "system-l2";
		qcom,core-id = <0xffff>; /* L2/APCS SAW */
		qcom,saw2-ver-reg = <0xfd0>;
		qcom,saw2-cfg = <0x14>;
@@ -104,31 +104,73 @@
		qcom,saw2-spm-cmd-pc = [00 32 b0 10 e0 d0 6b c0 42 f0
				11 07 01 b0 50 4e 02 02 c0 d0 12 e0 6b 02 32
				50 f0 0f]; /*APCS_PMIC_OFF_L2RAM_OFF*/
		qcom,saw2-spm-cmd-pc-no-rpm = [00 32 b0 10 e0 d0 6b c0 42 f0
				11 03 01 b0 50 4e 02 02 c0 d0 12 e0 6b 02 32
				50 f0 0f]; /*APCS_PMIC_OFF_L2RAM_OFF*/
		qcom,L2-spm-is-apcs-master;
	};

	qcom,lpm-levels {
		compatible = "qcom,lpm-levels";
		qcom,default-l2-state = "l2_cache_active";
		#address-cells = <1>;
		#size-cells = <0>;

		qcom,cpu-modes {
			compatible = "qcom,cpu-modes";
		qcom,pm-cluster@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
			label = "system";
			qcom,spm-device-names = "l2";
			qcom,default-level = <0>;

			qcom,pm-cluster-level@0 {
				reg = <0>;
				label = "l2-cache-active";
				qcom,spm-l2-mode = "active";
				qcom,latency-us = <10>;
				qcom,ss-power = <3000>;
				qcom,energy-overhead = <60000>;
				qcom,time-overhead = <110>;
			};

			qcom,pm-cluster-level@1 {
				reg = <1>;
				label = "l2-cache-pc-no-rpm";
				qcom,spm-l2-mode = "pc";
				qcom,latency-us = <1000>;
				qcom,ss-power = <315>;
				qcom,energy-overhead = <1027150>;
				qcom,time-overhead = <2400>;
				qcom,min-child-idx = <2>;
				qcom,last-core-only;
			};

			qcom,pm-cluster-level@2 {
				reg = <2>;
				label = "l2-cache-pc";
				qcom,spm-l2-mode = "pc";
				qcom,latency-us = <12700>;
				qcom,ss-power = <315>;
				qcom,energy-overhead = <1027150>;
				qcom,time-overhead = <2400>;
				qcom,min-child-idx = <2>;
				qcom,notify-rpm;
				qcom,last-core-only;
			};

			qcom,cpu-mode@0 {
				qcom,mode = "wfi";
			qcom,pm-cpu {
				#address-cells = <1>;
				#size-cells = <0>;

				qcom,pm-cpu-level@0{
					reg = <0>;
					qcom,spm-cpu-mode = "wfi";
					qcom,latency-us = <1>;
					qcom,ss-power = <530>;
					qcom,energy-overhead = <52800>;
					qcom,time-overhead = <100>;
				};

			qcom,cpu-mode@1 {
				qcom,mode = "standalone_pc";
				qcom,pm-cpu-level@1 {
					reg = <1>;
					qcom,spm-cpu-mode = "standalone_pc";
					qcom,latency-us = <500>;
					qcom,ss-power = <410>;
					qcom,energy-overhead = <603400>;
@@ -136,8 +178,9 @@
					qcom,use-broadcast-timer;
				};

			qcom,cpu-mode@2 {
				qcom,mode = "pc";
				qcom,pm-cpu-level@2 {
					reg = <2>;
					qcom,spm-cpu-mode = "pc";
					qcom,latency-us = <550>;
					qcom,ss-power = <372>;
					qcom,energy-overhead = <700000>;
@@ -145,30 +188,6 @@
					qcom,use-broadcast-timer;
				};
			};

		qcom,system-modes {
			compatible = "qcom,system-modes";

			qcom,system-mode@0 {
				qcom,l2 = "l2_cache_pc_no_rpm";
				qcom,latency-us = <1000>;
				qcom,ss-power = <315>;
				qcom,energy-overhead = <1027150>;
				qcom,time-overhead = <2400>;
				qcom,min-cpu-mode= "standalone_pc";
				qcom,sync-mode;
			};

			qcom,system-mode@1 {
				qcom,l2 = "l2_cache_pc";
				qcom,latency-us = <12700>;
				qcom,ss-power = <315>;
				qcom,energy-overhead = <1027150>;
				qcom,time-overhead = <2400>;
				qcom,min-cpu-mode= "pc";
				qcom,send-rpm-sleep-set;
				qcom,sync-mode;
			};
		};
	};

+70 −49
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0xf9012000 0x1000>;
		qcom,name = "l2";
		qcom,name = "system-l2";
		qcom,core-id = <0xffff>; /* L2/APCS SAW */
		qcom,saw2-ver-reg = <0xfd0>;
		qcom,saw2-cfg = <0x14>;
@@ -103,9 +103,6 @@
		qcom,saw2-spm-cmd-ret = [00 03 00 0f];
		qcom,saw2-spm-cmd-gdhs = [00 20 32 6b c0 e0 d0 42 03 50
				4e 02 02 d0 e0 c0 22 6b 02 32 50 0f];
		qcom,saw2-spm-cmd-pc-no-rpm = [00 32 b0 10 e0 d0 6b c0 42 f0
				11 03 01 b0 50 4e 02 02 c0 d0 12 e0 6b 02 32
				50 f0 0f]; /*APCS_PMIC_OFF_L2RAM_OFF*/
		qcom,saw2-spm-cmd-pc = [00 32 b0 10 e0 d0 6b c0 42 f0
				11 07 01 b0 50 4e 02 02 c0 d0 12 e0 6b 02 32
				50 f0 0f]; /*APCS_PMIC_OFF_L2RAM_OFF*/
@@ -114,23 +111,80 @@

	qcom,lpm-levels {
		compatible = "qcom,lpm-levels";
		qcom,default-l2-state = "l2_cache_active";
		#address-cells = <1>;
		#size-cells = <0>;

		qcom,cpu-modes {
			compatible = "qcom,cpu-modes";
		qcom,pm-cluster@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;
			label = "system";
			qcom,spm-device-names = "l2";
			qcom,default-level = <0>;

			qcom,pm-cluster-level@0 {
				reg = <0>;
				label = "l2-cache-active";
				qcom,spm-l2-mode = "active";
				qcom,latency-us = <10>;
				qcom,ss-power = <3000>;
				qcom,energy-overhead = <60000>;
				qcom,time-overhead = <110>;
			};

			qcom,pm-cluster-level@1 {
				reg = <1>;
				label = "l2-cache-gdhs";
				qcom,spm-l2-mode = "gdhs";
				qcom,latency-us = <700>;
				qcom,ss-power = <372>;
				qcom,energy-overhead = <738750>;
				qcom,time-overhead = <1410>;
				qcom,min-child-idx = <2>;
				qcom,last-core-only;
			};

			qcom,pm-cluster-level@2 {
				reg = <2>;
				label = "l2-cache-pc-no-rpm";
				qcom,spm-l2-mode = "pc";
				qcom,latency-us = <1000>;
				qcom,ss-power = <315>;
				qcom,energy-overhead = <1027150>;
				qcom,time-overhead = <2400>;
				qcom,min-child-idx = <2>;
				qcom,last-core-only;
			};

			qcom,pm-cluster-level@3 {
				reg = <3>;
				label = "l2-cache-pc";
				qcom,spm-l2-mode = "pc";
				qcom,latency-us = <12700>;
				qcom,ss-power = <315>;
				qcom,energy-overhead = <1027150>;
				qcom,time-overhead = <2400>;
				qcom,min-child-idx = <2>;
				qcom,notify-rpm;
				qcom,last-core-only;
			};

			qcom,cpu-mode@0 {
				qcom,mode = "wfi";
			qcom,pm-cpu {
				#address-cells = <1>;
				#size-cells = <0>;

				qcom,pm-cpu-level@0{
					reg = <0>;
					qcom,spm-cpu-mode = "wfi";
					qcom,latency-us = <1>;
					qcom,ss-power = <530>;
					qcom,energy-overhead = <52800>;
					qcom,time-overhead = <100>;
				};

			qcom,cpu-mode@1 {
				qcom,mode = "standalone_pc";
				qcom,pm-cpu-level@1 {
					reg = <1>;
					qcom,spm-cpu-mode = "standalone_pc";
					qcom,latency-us = <500>;
					qcom,ss-power = <410>;
					qcom,energy-overhead = <603400>;
@@ -138,8 +192,9 @@
					qcom,use-broadcast-timer;
				};

			qcom,cpu-mode@2 {
				qcom,mode = "pc";
				qcom,pm-cpu-level@2 {
					reg = <2>;
					qcom,spm-cpu-mode = "pc";
					qcom,latency-us = <550>;
					qcom,ss-power = <372>;
					qcom,energy-overhead = <700000>;
@@ -147,40 +202,6 @@
					qcom,use-broadcast-timer;
				};
			};

		qcom,system-modes {
			compatible = "qcom,system-modes";

			qcom,system-mode@0 {
				qcom,l2 = "l2_cache_gdhs";
				qcom,latency-us = <700>;
				qcom,ss-power = <372>;
				qcom,energy-overhead = <738750>;
				qcom,time-overhead = <1410>;
				qcom,min-cpu-mode= "standalone_pc";
				qcom,sync-mode;
			};

			qcom,system-mode@1 {
				qcom,l2 = "l2_cache_pc_no_rpm";
				qcom,latency-us = <1000>;
				qcom,ss-power = <315>;
				qcom,energy-overhead = <1027150>;
				qcom,time-overhead = <2400>;
				qcom,min-cpu-mode= "standalone_pc";
				qcom,sync-mode;
			};

			qcom,system-mode@2 {
				qcom,l2 = "l2_cache_pc";
				qcom,latency-us = <12700>;
				qcom,ss-power = <315>;
				qcom,energy-overhead = <1027150>;
				qcom,time-overhead = <2400>;
				qcom,min-cpu-mode= "pc";
				qcom,send-rpm-sleep-set;
				qcom,sync-mode;
			};
		};
	};

@@ -314,8 +335,8 @@
	qcom,pm@fe805664 {
		compatible = "qcom,pm";
		reg = <0xfe805664 0x40>;
		qcom,pc-mode = "tz_l2_int";
		qcom,use-sync-timer;
		qcom,pc-resets-timer;
		qcom,synced-clocks;
	};

Loading