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

Commit 271ecf24 authored by Tirupathi Reddy's avatar Tirupathi Reddy
Browse files

ARM: dts: msm: enable APC CPR closed-loop operation for sdm632



Enable APC CPR HW closed-loop operation with multi-thread
configuration. Silver cluster and CCI sensors are mapped
to thread-0 and Gold cluster sensors are mapped to Thread-1.
CPR controller aggregates the individual thread recommendations
and update the rail voltage through CCI-SAW4 AVS interface.

Also, configure CPR consecutive down parameter to 0 for both
the threads to fix the thread aggregation logic.

Also, configure CPR controller to keep thread vote always
enabled.

CRs-Fixed: 2233565
Change-Id: Ib6a781f1e919b022585960cd9baf32013314a2f4
Signed-off-by: default avatarTirupathi Reddy <tirupath@codeaurora.org>
parent 2b798d62
Loading
Loading
Loading
Loading
+33 −14
Original line number Diff line number Diff line
@@ -114,6 +114,8 @@
		qcom,cpr-count-repeat = <14>;
		qcom,cpr-down-error-step-limit = <1>;
		qcom,cpr-up-error-step-limit = <1>;
		qcom,cpr-reset-step-quot-loop-en;
		qcom,cpr-thread-has-always-vote-en;

		qcom,apm-ctrl = <&apc_apm>;
		qcom,apm-threshold-voltage = <875000>;
@@ -131,10 +133,13 @@
			"APCS_ALIAS0_APM_CTLER_STATUS",
			"APCS0_CPR_CORE_ADJ_MODE_REG";

		qcom,cpr-enable;
		qcom,cpr-hw-closed-loop;

		thread@0 {
			qcom,cpr-thread-id = <0>;
			qcom,cpr-consecutive-up = <0>;
			qcom,cpr-consecutive-down = <2>;
			qcom,cpr-consecutive-down = <0>;
			qcom,cpr-up-threshold = <2>;
			qcom,cpr-down-threshold = <1>;

@@ -156,6 +161,10 @@
					<500000  500000 500000 500000 500000
					 500000  500000>;

				qcom,cpr-floor-to-ceiling-max-range =
					<50000  50000 50000 50000 50000
					 50000  50000>;

				qcom,mem-acc-voltage = <1 1 2 2 2 2 3>;

				qcom,corner-frequencies =
@@ -176,13 +185,19 @@
				qcom,allow-voltage-interpolation;
				qcom,allow-quotient-interpolation;
				qcom,cpr-scaled-open-loop-voltage-as-ceiling;

				qcom,cpr-open-loop-voltage-fuse-adjustment =
					< 0       0      0 10000>;

				qcom,cpr-closed-loop-voltage-fuse-adjustment =
					<(-10000) 0      0 10000>;
			};
		};

		thread@1 {
			qcom,cpr-thread-id = <1>;
			qcom,cpr-consecutive-up = <0>;
			qcom,cpr-consecutive-down = <2>;
			qcom,cpr-consecutive-down = <0>;
			qcom,cpr-up-threshold = <2>;
			qcom,cpr-down-threshold = <1>;

@@ -204,6 +219,10 @@
					<500000 500000 500000 500000 500000
					 500000 500000>;

				qcom,cpr-floor-to-ceiling-max-range =
					<50000  50000 50000 50000 50000
					 50000  50000>;

				qcom,mem-acc-voltage = <1 1 2 2 2 2 3>;

				qcom,corner-frequencies =
@@ -227,9 +246,9 @@

				qcom,cpr-open-loop-voltage-fuse-adjustment =
					/* Speed bin 0; CPR rev 0..7 */
					< 30000      0      0     0>,
					< 30000      0      0     0>,
					<     0      0      0     0>,
					< 30000      0  10000 20000>,
					< 30000      0  10000 20000>,
					<     0      0  10000 20000>,
					<     0      0      0     0>,
					<     0      0      0     0>,
					<     0      0      0     0>,
@@ -247,9 +266,9 @@
					<     0      0      0     0>,

					/* Speed bin 2; CPR rev 0..7 */
					< 30000      0      0     0>,
					< 30000      0      0     0>,
					<     0      0      0     0>,
					< 30000      0  10000 20000>,
					< 30000      0  10000 20000>,
					<     0      0  10000 20000>,
					<     0      0      0     0>,
					<     0      0      0     0>,
					<     0      0      0     0>,
@@ -287,9 +306,9 @@
					<     0      0      0     0>,

					/* Speed bin 6; CPR rev 0..7 */
					< 30000      0      0     0>,
					< 30000      0      0     0>,
					<     0      0      0     0>,
					< 30000      0  10000 20000>,
					< 30000      0  10000 20000>,
					<     0      0  10000 20000>,
					<     0      0      0     0>,
					<     0      0      0     0>,
					<     0      0      0     0>,
@@ -310,7 +329,7 @@
					/* Speed bin 0; CPR rev 0..7 */
					< 30000      0      0     0>,
					< 30000      0      0     0>,
					<     0      0      0     0>,
					<(-10000)    0      0     0>,
					<     0      0      0     0>,
					<     0      0      0     0>,
					<     0      0      0     0>,
@@ -330,7 +349,7 @@
					/* Speed bin 2; CPR rev 0..7 */
					< 30000      0      0     0>,
					< 30000      0      0     0>,
					<     0      0      0     0>,
					<(-10000)    0      0     0>,
					<     0      0      0     0>,
					<     0      0      0     0>,
					<     0      0      0     0>,
@@ -370,7 +389,7 @@
					/* Speed bin 6; CPR rev 0..7 */
					< 30000      0      0     0>,
					< 30000      0      0     0>,
					<     0      0      0     0>,
					<(-10000)    0      0     0>,
					<     0      0      0     0>,
					<     0      0      0     0>,
					<     0      0      0     0>,