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

Commit 8f36e61c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: pm: Add support for System PC with multiple online cores."

parents 28c2395e a1cc0da7
Loading
Loading
Loading
Loading
+91 −29
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. These C-States are invoked by the CPUIdle framework when the core
becomes idle. But based on the time available until the next scheduled wakeup,
the system can do several low power modes. The combination is captured in the
device tree as lpm-level.
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.

The required nodes for lpm-levels are:
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.

[First Level Nodes]
Required properties:

- compatible: "qcom,lpm-levels"
- reg: The numeric level id

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:
		"wfi" - Wait for Interrupt
		"ramp_down_and_wfi" - Ramp down and wait for interrupt
		"retention" - Retention
		"standalone_pc" - Standalone power collapse
		"pc" - Power Collapse
		"retention" - Retention
		"pc_suspend" - Suspended Power Collapse
		"pc_no_xo_shutdown" - Power Collapse with no XO shutdown
- 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_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
@@ -31,22 +58,57 @@ The required nodes for lpm-levels are:
- 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

The optional nodes for lpm-levels 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 is used only when there is an L2 SAW.
- 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,lpm-levels {
	qcom,no-l2-saw;
	qcom,lpm-level@0 {
		reg = <0>;
		compatible = "qcom,lpm-levels";
		qcom,default-l2-state = "l2_cache_retention";
		#address-cells = <1>;
		#size-cells = <1>;

		qcom,cpu-modes {
			compatible = "qcom,cpu-modes";
			qcom,cpu-mode@0 {
				qcom,mode = "wfi";
		qcom,l2 = "l2_cache_active";
		qcom,latency-us = <100>;
		qcom,ss-power = <650>;
		qcom,energy-overhead = <801>;
		qcom,time-overhead = <200>;
				qcom,latency-us = <1>;
				qcom,ss-power = <715>;
				qcom,energy-overhead = <17700>;
				qcom,time-overhead = <2>;
			};

			qcom,cpu-mode@1 {
				qcom,mode = "retention";
				qcom,latency-us = <35>;
				qcom,ss-power = <542>;
				qcom,energy-overhead = <34920>;
				qcom,time-overhead = <40>;
			};
		};
		qcom,system-modes {
			compatible = "qcom,system-modes";

			qcom,system-mode@0 {
				qcom,l2 = "l2_cache_gdhs";
				qcom,latency-us = <20000>;
				qcom,ss-power = <163>;
				qcom,energy-overhead = <1577736>;
				qcom,time-overhead = <5067>;
			};

			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>;
			};
		};
};
+56 −44
Original line number Diff line number Diff line
@@ -134,57 +134,69 @@
		compatible = "qcom,lpm-levels";
		qcom,default-l2-state = "l2_cache_retention";
		#address-cells = <1>;
		#size-cells = <0>;
		#size-cells = <1>;

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

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

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


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

		qcom,lpm-level@3 {
			reg = <0x3>;
			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,latency-us = <2817>;
				qcom,latency-us = <20000>;
				qcom,ss-power = <163>;
				qcom,energy-overhead = <1577736>;
				qcom,time-overhead = <5067>;
				qcom,min-cpu-mode= "pc";
				qcom,send-rpm-sleep-set;
				qcom,sync-mode;
			};

		qcom,lpm-level@4 {
			reg = <0x4>;
			qcom,mode = "pc";
			qcom,system-mode@1 {
				qcom,l2 = "l2_cache_pc";
			qcom,latency-us = <3922>;
				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;
			};
		};
	};

+46 −25
Original line number Diff line number Diff line
@@ -32,34 +32,55 @@
		#address-cells = <1>;
		#size-cells = <0>;

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

		qcom,lpm-level@1 {
			reg = <0x1>;
			qcom,cpu-mode@1 {
				qcom,mode = "standalone_pc";
			qcom,l2 = "l2_cache_active";
				qcom,latency-us = <2000>;
				qcom,ss-power = <5000>;
				qcom,energy-overhead = <60100000>;
				qcom,time-overhead = <3000>;
			};

		qcom,lpm-level@2 {
			reg = <0x2>;
			qcom,cpu-mode@2 {
				qcom,mode = "pc";
				qcom,latency-us = <30000>;
				qcom,ss-power = <5000>;
				qcom,energy-overhead = <60350000>;
				qcom,time-overhead = <7300>;
			};
		};
		qcom,system-modes {
			compatible = "qcom,system-modes";

			qcom,system-mode@0 {
				qcom,l2 = "l2_cache_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,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;
			};
		};
	};

+60 −34
Original line number Diff line number Diff line
@@ -111,44 +111,70 @@
		#address-cells = <1>;
		#size-cells = <0>;

		qcom,lpm-level@0 {
			reg = <0x0>;
		qcom,cpu-modes {
			compatible = "qcom,cpu-modes";

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

		qcom,lpm-level@1 {
			reg = <0x1>;
			qcom,cpu-mode@1 {
				qcom,mode = "standalone_pc";
			qcom,l2 = "l2_cache_active";
				qcom,latency-us = <500>;
				qcom,ss-power = <410>;
				qcom,energy-overhead = <603400>;
				qcom,time-overhead = <1200>;
				qcom,use-broadcast-timer;
			};

		qcom,lpm-level@2 {
			reg = <0x2>;
			qcom,cpu-mode@2 {
				qcom,mode = "pc";
				qcom,latency-us = <550>;
				qcom,ss-power = <372>;
				qcom,energy-overhead = <700000>;
				qcom,time-overhead = <1410>;
				qcom,use-broadcast-timer;
			};
		};

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

			qcom,system-mode@0 {
				qcom,l2 = "l2_cache_gdhs";
				qcom,latency-us = <10700>;
				qcom,ss-power = <372>;
				qcom,energy-overhead = <738750>;
				qcom,time-overhead = <1410>;
				qcom,min-cpu-mode= "pc";
				qcom,send-rpm-sleep-set;
				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,lpm-level@3 {
			reg = <0x3>;
			qcom,mode = "pc";
			qcom,system-mode@2 {
				qcom,l2 = "l2_cache_pc";
			qcom,latency-us = <11000>;
				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;
			};
		};
	};

+59 −43
Original line number Diff line number Diff line
@@ -113,54 +113,70 @@
		#address-cells = <1>;
		#size-cells = <0>;

		qcom,lpm-level@0 {
			reg = <0x0>;
		qcom,cpu-modes {
			compatible = "qcom,cpu-modes";

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

		qcom,lpm-level@1 {
			reg = <0x1>;
			qcom,cpu-mode@1 {
				qcom,mode = "standalone_pc";
			qcom,l2 = "l2_cache_active";
				qcom,latency-us = <500>;
				qcom,ss-power = <410>;
				qcom,energy-overhead = <603400>;
				qcom,time-overhead = <1200>;
				qcom,use-broadcast-timer;
			};

		qcom,lpm-level@2 {
			reg = <0x2>;
			qcom,cpu-mode@2 {
				qcom,mode = "pc";
				qcom,latency-us = <550>;
				qcom,ss-power = <372>;
				qcom,energy-overhead = <700000>;
				qcom,time-overhead = <1410>;
				qcom,use-broadcast-timer;
			};
		};

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

			qcom,system-mode@0 {
				qcom,l2 = "l2_cache_gdhs";
				qcom,latency-us = <10700>;
				qcom,ss-power = <372>;
				qcom,energy-overhead = <738750>;
				qcom,time-overhead = <1410>;
				qcom,min-cpu-mode= "pc";
				qcom,send-rpm-sleep-set;
				qcom,sync-mode;
			};

		qcom,lpm-level@3 {
			reg = <0x3>;
			qcom,mode = "pc";
			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,lpm-level@4 {
			reg = <0x4>;
			qcom,mode = "pc";
			qcom,system-mode@2 {
				qcom,l2 = "l2_cache_pc";
			qcom,latency-us = <11000>;
				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;
			};
		};
	};

Loading