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

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

Merge "ARM: dts: msm: specify dynamic VDD_GFX CPR floor voltages for msm8996v2"

parents 8fab913b 5da9f9a0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -154,7 +154,8 @@ HMSS specific properties:
		    the device.  This value is utilized by several other
		    properties.  Supported values are 1 up to the maximum
		    possible for a given regulator type.  For HMSS the maximum
		    supported value is 1.
		    supported value is 8.  These combos correspond to CPR
		    revision fuse values 0 to 7 in order.

- qcom,ldo-headroom-voltage
	Usage:      required if qcom,vdd-threadN-ldo-supply is specified for the
+18 −0
Original line number Diff line number Diff line
@@ -284,6 +284,24 @@ Platform independent properties:
		    The list and tuples must meet the same size requirements as
		    those specified for qcom,cpr-voltage-ceiling above.

- qcom,cpr-floor-to-ceiling-max-range
	Usage:      optional
	Value type: <prop-encoded-array>
	Definition: A list of integer tuples which each define the maximum
		    allowed difference between the final floor voltage and the
		    final ceiling voltage in microvolts for each voltage corner
		    in order from lowest to highest.  A negative value may be
		    specified for an element to indicate that there is no
		    limitation of the floor to ceiling voltage range for the
		    corresponding corner.

		    In the case that the initial floor to ceiling voltage is
		    greater than the max range specified, the floor voltage will
		    be increased in order to satisfy the max range constraint.

		    The list and tuples must meet the same size requirements as
		    those specified for qcom,cpr-voltage-ceiling above.

- qcom,system-voltage
	Usage:      optional
	Value type: <prop-encoded-array>
+56 −22
Original line number Diff line number Diff line
@@ -495,13 +495,13 @@
			compatible = "qcom,spm-regulator";
			reg = <0x3200 0x100>;
			regulator-name = "pm8994_s11";
			regulator-min-microvolt = <520000>;
			regulator-min-microvolt = <470000>;
			regulator-max-microvolt = <1015000>;
			qcom,cpu-num = <0>;

			pm8994_s11_limit: avs-limit-regulator {
				regulator-name = "pm8994_s11_avs_limit";
				regulator-min-microvolt = <520000>;
				regulator-min-microvolt = <470000>;
				regulator-max-microvolt = <1015000>;
			};
		};
@@ -593,7 +593,7 @@

				qcom,cpr-pd-bypass-mask = <0x07>;
				qcom,cpr-fuse-corners = <5>;
				qcom,cpr-fuse-combos = <1>;
				qcom,cpr-fuse-combos = <4>;
				qcom,cpr-corners = <19>;

				qcom,ldo-headroom-voltage = <150000>;
@@ -607,10 +607,16 @@
					 905000 1015000 1015000 1015000 1015000
					1015000 1015000 1015000 1015000>;
				qcom,cpr-voltage-floor =
					<520000  550000  555000  565000  585000
					 615000  635000  655000  690000  720000
					 740000  750000  760000  770000  780000
					 790000  815000  840000  850000>;
					<470000  470000  470000  470000  470000
					 470000  470000  470000  470000  470000
					 470000  470000  470000  470000  470000
					 470000  470000  470000  470000>;
				qcom,cpr-floor-to-ceiling-max-range =
					 <80000   80000   80000   80000   80000
					  80000   80000   80000   80000   80000
					  80000   80000   80000   80000   80000
					  80000   80000   80000   80000>;

				qcom,corner-frequencies =
					<192000000  268800000  307200000
					 345600000  403200000  480000000
@@ -633,8 +639,14 @@
				       2193 2201 2283 2296    0    0    0    0>;

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

				qcom,allow-voltage-interpolation;
@@ -649,7 +661,7 @@

				qcom,cpr-pd-bypass-mask = <0x18>;
				qcom,cpr-fuse-corners = <5>;
				qcom,cpr-fuse-combos = <1>;
				qcom,cpr-fuse-combos = <4>;
				qcom,cpr-corners = <10>;

				qcom,cpr-corner-fmax-map = <1 2 5 9 10>;
@@ -658,8 +670,11 @@
				       <605000  670000  745000  745000  745000
					905000  905000  905000  905000 1015000>;
				qcom,cpr-voltage-floor =
				       <520000  545000  565000  595000  635000
					660000  690000  730000  750000  850000>;
				       <470000  470000  470000  470000  470000
					470000  470000  470000  470000  470000>;
				qcom,cpr-floor-to-ceiling-max-range =
					<80000   80000   80000   80000   80000
					 80000   80000   80000   80000   80000>;

				qcom,corner-frequencies =
					<150000000  307200000  384000000
@@ -680,9 +695,15 @@
				       2193 2201 2283 2296    0    0    0    0>;

				qcom,cpr-open-loop-voltage-fuse-adjustment =
					<0 0 0 0 0>;
					<0 0 0 0 0>,
					<0 0 0 0 0>,
					<0 0 0 0 (-130000)>,
					<0 0 0 0 (-130000)>;
				qcom,cpr-closed-loop-voltage-fuse-adjustment =
					<0 0 0 0 0>;
					<0 0 0 0 0>,
					<0 0 0 0 0>,
					<0 0 0 0 (-115000)>,
					<0 0 0 0 (-115000)>;

				qcom,allow-voltage-interpolation;
				qcom,allow-quotient-interpolation;
@@ -704,7 +725,7 @@

				qcom,cpr-pd-bypass-mask = <0xe0>;
				qcom,cpr-fuse-corners = <5>;
				qcom,cpr-fuse-combos = <1>;
				qcom,cpr-fuse-combos = <4>;
				qcom,cpr-corners = <18>;

				qcom,ldo-headroom-voltage = <150000>;
@@ -718,10 +739,15 @@
					 905000 1015000 1015000 1015000 1015000
					1015000 1015000 1015000>;
				qcom,cpr-voltage-floor =
					<520000  530000  545000  590000  620000
					 635000  660000  685000  700000  730000
					 740000  750000  765000  790000  805000
					 815000  830000  850000>;
					<470000  470000  470000  470000  470000
					 470000  470000  470000  470000  470000
					 470000  470000  470000  470000  470000
					 470000  470000  470000>;
				qcom,cpr-floor-to-ceiling-max-range =
					 <80000   80000   80000   80000   80000
					  80000   80000   80000   80000   80000
					  80000   80000   80000   80000   80000
					  80000   80000   80000>;

				qcom,corner-frequencies =
					<307200000  345600000  403200000
@@ -744,9 +770,15 @@
				       2203 2210 2297 2297    0    0    0    0>;

				qcom,cpr-open-loop-voltage-fuse-adjustment =
					<0 0 0 5000 0>;
					<0 0 0 5000 0>,
					<0 0 0 5000 0>,
					<0 0 0 0 0>,
					<0 0 0 0 0>;
				qcom,cpr-closed-loop-voltage-fuse-adjustment =
					<0 0 0 20000 0>;
					<0 0 0 20000 0>,
					<0 0 0 20000 0>,
					<0 0 0 0 0>,
					<0 0 0 0 0>;

				qcom,allow-voltage-interpolation;
				qcom,allow-quotient-interpolation;
@@ -802,7 +834,7 @@
				qcom,cpr-voltage-ceiling =
					<400000 670000  745000  905000 1015000>;
				qcom,cpr-voltage-floor =
					<400000 545000  625000  755000  855000>;
					<400000 520000  520000  520000  520000>;

				qcom,system-voltage = <2 2 2 2 4>;

@@ -835,9 +867,11 @@
					  0 2539    0    0    0    0    0    0>;

				qcom,cpr-open-loop-voltage-fuse-adjustment =
					<55000 (-5000) (-50000) (-135000)>;
					<90000 (-5000) (-30000) (-115000)>;
				qcom,cpr-closed-loop-voltage-adjustment =
					<0 55000 (-10000) (-35000) (-85000)>;
					<0 75000 0 (-10000) (-65000)>;
				qcom,cpr-floor-to-ceiling-max-range =
					<0 130000 40000 85000 85000>;

				qcom,allow-voltage-interpolation;
				qcom,cpr-scaled-open-loop-voltage-as-ceiling;
+36 −0
Original line number Diff line number Diff line
@@ -53,6 +53,14 @@
	status = "disabled";
};

&pm8994_s11 {
	regulator-min-microvolt = <520000>;
};

&pm8994_s11_limit {
	regulator-min-microvolt = <520000>;
};

/* Ensure that both possible VDD_GFX supplies cannot be disabled. */
&pmi8994_s2 {
	regulator-always-on;
@@ -63,14 +71,42 @@
};

&apc0_pwrcl_vreg {
	qcom,cpr-fuse-combos = <2>;
	qcom,ldo-max-voltage = <783000>;
	qcom,cpr-voltage-floor =
		<520000 550000 555000 565000 585000 615000 635000 655000 690000
		 720000 740000 750000 760000 770000 780000 790000 815000 840000
		 850000>;
	/delete-property/ qcom,cpr-floor-to-ceiling-max-range;
	qcom,cpr-open-loop-voltage-fuse-adjustment =   <0 0 0 0 0>;
	qcom,cpr-closed-loop-voltage-fuse-adjustment = <0 0 0 0 0>;
};

&apc0_cbf_vreg {
	qcom,cpr-fuse-combos = <2>;
	qcom,cpr-voltage-floor =
		<520000 545000 565000 595000 635000 660000 690000 730000 750000
		 850000>;
	/delete-property/ qcom,cpr-floor-to-ceiling-max-range;
	qcom,cpr-open-loop-voltage-fuse-adjustment =   <0 0 0 0 0>;
	qcom,cpr-closed-loop-voltage-fuse-adjustment = <0 0 0 0 0>;
};

&apc1_vreg {
	qcom,cpr-fuse-combos = <2>;
	qcom,ldo-max-voltage = <780000>;
	qcom,cpr-voltage-floor =
		<520000 530000 545000 590000 620000 635000 660000 685000 700000
		 730000 740000 750000 765000 790000 805000 815000 830000
		 850000>;
	/delete-property/ qcom,cpr-floor-to-ceiling-max-range;
	qcom,cpr-open-loop-voltage-fuse-adjustment =   <0 0 0 5000 0>;
	qcom,cpr-closed-loop-voltage-fuse-adjustment = <0 0 0 20000 0>;
};

&gfx_vreg {
	qcom,cpr-voltage-floor = <400000 545000 625000 755000 855000>;
	/delete-property/ qcom,cpr-floor-to-ceiling-max-range;
	qcom,corner-frequencies = <0 120000000 205000000 360000000 480000000>;
	qcom,cpr-open-loop-voltage-fuse-adjustment = <35000 0 0 0>;
	qcom,cpr-closed-loop-voltage-adjustment = <0 45000 0 0 0>;
+29 −3
Original line number Diff line number Diff line
@@ -74,14 +74,28 @@ struct cpr3_msm8996_hmss_fuses {
/**
 * enum cpr3_msm8996_hmss_fuse_combo - fuse combinations supported by the HMSS
 *			CPR3 controller on MSM8996
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_DEFAULT:	Initial default combination
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV0:	Part with CPR fusing rev == 0
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV1:	Part with CPR fusing rev == 1
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV2:	Part with CPR fusing rev == 2
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV3:	Part with CPR fusing rev == 3
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV4:	Part with CPR fusing rev == 4
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV5:	Part with CPR fusing rev == 5
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV6:	Part with CPR fusing rev == 6
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV7:	Part with CPR fusing rev == 7
 * %CPR3_MSM8996_HMSS_FUSE_COMBO_COUNT:		Defines the number of
 *						combinations supported
 *
 * This list will be expanded as new requirements are added.
 */
enum cpr3_msm8996_hmss_fuse_combo {
	CPR3_MSM8996_HMSS_FUSE_COMBO_DEFAULT = 0,
	CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV0 = 0,
	CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV1 = 1,
	CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV2 = 2,
	CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV3 = 3,
	CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV4 = 4,
	CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV5 = 5,
	CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV6 = 6,
	CPR3_MSM8996_HMSS_FUSE_COMBO_CPR_REV7 = 7,
	CPR3_MSM8996_HMSS_FUSE_COMBO_COUNT
};

@@ -447,11 +461,17 @@ static int cpr3_msm8996_hmss_read_fuse_data(struct cpr3_regulator *vreg)
		}
	}

	vreg->fuse_combo = fuse->cpr_fusing_rev;
	if (vreg->fuse_combo >= CPR3_MSM8996_HMSS_FUSE_COMBO_COUNT) {
		cpr3_err(vreg, "invalid CPR fuse combo = %d found\n",
			vreg->fuse_combo);
		return -EINVAL;
	}

	vreg->speed_bin_fuse	= fuse->speed_bin;
	vreg->cpr_rev_fuse	= fuse->cpr_fusing_rev;
	vreg->fuse_corner_count	= MSM8996_HMSS_FUSE_CORNERS;
	vreg->platform_fuses	= fuse;
	vreg->fuse_combo	= CPR3_MSM8996_HMSS_FUSE_COMBO_DEFAULT;

	return 0;
}
@@ -1169,6 +1189,12 @@ static int cpr3_hmss_init_regulator(struct cpr3_regulator *vreg)

	cpr3_open_loop_voltage_as_ceiling(vreg);

	rc = cpr3_limit_floor_voltages(vreg, corner_sum, combo_offset);
	if (rc) {
		cpr3_err(vreg, "unable to limit floor voltages, rc=%d\n", rc);
		return rc;
	}

	rc = cpr3_msm8996_hmss_calculate_target_quotients(vreg, corner_sum,
			combo_offset);
	if (rc) {
Loading