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

Commit 0245d6b0 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: reduce VDD_APCC voltage margin for aging on msm8996v3"

parents 355bce25 429d3bc9
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
@@ -379,6 +379,39 @@ Platform independent properties:
		    single tuple may only be specified if all of the corner
		    counts in qcom,cpr-corners are the same.

- qcom,cpr-open-loop-voltage-min-diff
	Usage:      optional; only meaningful if the
		    qcom,cpr-open-loop-voltage-adjustment property is specified
	Value type: <prop-encoded-array>
	Definition: A list of integer tuples which each define the minimum
		    allowed open-loop voltage difference in microvolts between
		    each voltage corner and the one immediately preceding it.
		    The elements in a tuple are ordered from the lowest to the
		    highest corner.  The value specified for the first corner is
		    ignored since there is no corner before it.

		    Negative voltage values may be specified for this property.
		    A negative value means that the open-loop voltage of a
		    corner may be lower than that of the preceding corner.

		    The minimum difference is enforced after the open-loop
		    voltage values have been interpolated for intermediate
		    corners and after adjustments have been applied.

		    The list must contain either qcom,cpr-fuse-combos number of
		    tuples in which case the tuples are matched to fuse
		    combinations 1-to-1 or the list must contain exactly 1 tuple
		    which is used regardless of the fuse combination found on a
		    given chip.

		    Each tuple must be of the length defined in the
		    corresponding element of the qcom,cpr-corners property.  A
		    single tuple may only be specified if all of the corner
		    counts in qcom,cpr-corners are the same.

		    If this property is not specified, then the minimum
		    difference is assumed to be 0 uV for all corners.

- qcom,cpr-closed-loop-voltage-fuse-adjustment
	Usage:      optional
	Value type: <prop-encoded-array>
+41 −6
Original line number Diff line number Diff line
@@ -659,6 +659,20 @@
					<0 0 0 0 0>,
					<0 0 0 0 0>;

				qcom,cpr-open-loop-voltage-adjustment =
					<(-15000) (-15000) (-15000) (-15000)
					 (-50000) (-50000) (-50000) (-50000)
					 (-50000) (-50000) (-50000) (-50000)
					 (-50000) (-50000) (-50000) (-50000)>;
				qcom,cpr-open-loop-voltage-min-diff =
				       <0 0 0 0 (-50000) 0 0 0 0 0 0 0 0 0 0 0>;

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

				qcom,allow-voltage-interpolation;
				qcom,allow-quotient-interpolation;
				qcom,cpr-scaled-open-loop-voltage-as-ceiling;
@@ -714,18 +728,18 @@
				       2519 2257 2668 2372    0    0    0    0>;

				qcom,cpr-open-loop-voltage-fuse-adjustment =
					<0 0 (-45000) (-20000) (-45000)>,
					<0 0 (-45000) (-20000) (-45000)>,
					<0 0 0 0 0>,
				 <(-15000) (-15000) (-60000) (-35000) (-60000)>,
				 <(-15000) (-15000) (-60000) (-35000) (-60000)>,
				 <(-15000) (-15000) (-15000) (-15000) (-15000)>,
					<0 0 0 0 0>,
					<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>,
				 <(-10000) (-10000) (-10000) (-10000) (-10000)>,
				 <(-10000) (-10000) (-10000) (-10000) (-10000)>,
				 <(-10000) (-10000) (-10000) (-10000) (-10000)>,
					<0 0 0 0 0>,
					<0 0 0 0 0>,
					<0 0 0 0 0>,
@@ -821,6 +835,27 @@
					<0 0 0 0 0>,
					<0 0 0 0 0>;

				qcom,cpr-open-loop-voltage-adjustment =
					<(-15000) (-15000) (-15000) (-15000)
					 (-50000) (-50000) (-50000) (-50000)
					 (-50000) (-50000) (-50000) (-50000)
					 (-50000) (-50000) (-50000) (-50000)
					 (-50000) (-50000) (-50000) (-50000)
					 (-50000) (-50000) (-50000) (-50000)
					 (-50000)>;
				qcom,cpr-open-loop-voltage-min-diff =
					<0 0 0 0 (-50000) 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-adjustment =
					<(-10000) (-10000) (-10000) (-10000)
						0        0        0        0
						0        0        0        0
						0        0        0        0
						0        0        0        0
						0        0        0        0
						0>;

				qcom,allow-voltage-interpolation;
				qcom,allow-quotient-interpolation;
				qcom,cpr-scaled-open-loop-voltage-as-ceiling;
+8 −0
Original line number Diff line number Diff line
@@ -133,6 +133,10 @@
		<0 0 0 0 0>,
		<0 0 0 0 0>,
		<0 0 0 0 0>;

	/delete-property/ qcom,cpr-open-loop-voltage-adjustment;
	/delete-property/ qcom,cpr-open-loop-voltage-min-diff;
	/delete-property/ qcom,cpr-closed-loop-voltage-adjustment;
};

&apc0_cbf_vreg {
@@ -237,6 +241,10 @@
		<0 0 0 20000 0>,
		<0 0 0 0 0>,
		<0 0 0 0 0>;

	/delete-property/ qcom,cpr-open-loop-voltage-adjustment;
	/delete-property/ qcom,cpr-open-loop-voltage-min-diff;
	/delete-property/ qcom,cpr-closed-loop-voltage-adjustment;
};

&gfx_cpr {
+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ static int acdcr_val_pwrcl = 0x002D5FFD;
module_param(acdcr_val_pwrcl, int, 0444);
static int acdcr_val_perfcl = 0x002D5FFD;
module_param(acdcr_val_perfcl, int, 0444);
int enable_acd;
int enable_acd = 1;
module_param(enable_acd, int, 0444);

#define WRITE_L2ACDCR(val) \
+30 −11
Original line number Diff line number Diff line
@@ -961,8 +961,8 @@ done:
int cpr3_adjust_open_loop_voltages(struct cpr3_regulator *vreg, int corner_sum,
		int combo_offset)
{
	int i, rc, prev_volt;
	int *volt_adjust;
	int i, rc, prev_volt, min_volt;
	int *volt_adjust, *volt_diff;

	if (!of_find_property(vreg->of_node,
			"qcom,cpr-open-loop-voltage-adjustment", NULL)) {
@@ -972,8 +972,11 @@ int cpr3_adjust_open_loop_voltages(struct cpr3_regulator *vreg, int corner_sum,

	volt_adjust = kcalloc(vreg->corner_count, sizeof(*volt_adjust),
				GFP_KERNEL);
	if (!volt_adjust)
		return -ENOMEM;
	volt_diff = kcalloc(vreg->corner_count, sizeof(*volt_diff), GFP_KERNEL);
	if (!volt_adjust || !volt_diff) {
		rc = -ENOMEM;
		goto done;
	}

	rc = cpr3_parse_array_property(vreg,
		"qcom,cpr-open-loop-voltage-adjustment",
@@ -993,20 +996,36 @@ int cpr3_adjust_open_loop_voltages(struct cpr3_regulator *vreg, int corner_sum,
		}
	}

	/* Ensure that open-loop voltages increase monotonically */
	if (of_find_property(vreg->of_node,
			"qcom,cpr-open-loop-voltage-min-diff", NULL)) {
		rc = cpr3_parse_array_property(vreg,
			"qcom,cpr-open-loop-voltage-min-diff",
			vreg->corner_count, corner_sum, combo_offset,
			volt_diff);
		if (rc) {
			cpr3_err(vreg, "could not load minimum open-loop voltage differences, rc=%d\n",
				rc);
			goto done;
		}
	}

	/*
	 * Ensure that open-loop voltages increase monotonically with respect
	 * to configurable minimum allowed differences.
	 */
	for (i = 1; i < vreg->corner_count; i++) {
		if (vreg->corner[i].open_loop_volt
		    < vreg->corner[i - 1].open_loop_volt) {
			cpr3_info(vreg, "adjusted corner %d open-loop voltage=%d uV < corner %d voltage=%d uV; overriding: corner %d voltage=%d\n",
		min_volt = vreg->corner[i - 1].open_loop_volt + volt_diff[i];
		if (vreg->corner[i].open_loop_volt < min_volt) {
			cpr3_info(vreg, "adjusted corner %d open-loop voltage=%d uV < corner %d voltage=%d uV + min diff=%d uV; overriding: corner %d voltage=%d\n",
				i, vreg->corner[i].open_loop_volt,
				i - 1, vreg->corner[i - 1].open_loop_volt,
				i, vreg->corner[i - 1].open_loop_volt);
			vreg->corner[i].open_loop_volt
				= vreg->corner[i - 1].open_loop_volt;
				volt_diff[i], i, min_volt);
			vreg->corner[i].open_loop_volt = min_volt;
		}
	}

done:
	kfree(volt_diff);
	kfree(volt_adjust);
	return rc;
}