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

Commit 05384e3b 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: add VDD_APC0/1 CPR support for SDM845 SPEED_BIN 1 parts" into msm-4.9

parents 970d1e13 e367ce6f
Loading
Loading
Loading
Loading
+110 −41
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@
			reg = <0x3800 0x100>;
			regulator-name = "pm8998_s13";
			regulator-min-microvolt = <568000>;
			regulator-max-microvolt = <928000>;
			regulator-max-microvolt = <996000>;
			qcom,enable-time = <500>;
			regulator-always-on;
		};
@@ -98,7 +98,7 @@
			"APSS_SILVER_CPRH_STATUS_1",
			"SILVER_SAW4_PMIC_STS";

		qcom,cpr-aging-ref-voltage = <928000>;
		qcom,cpr-aging-ref-voltage = <996000>;
		vdd-supply = <&pm8998_s13>;

		thread@1 {
@@ -111,33 +111,39 @@
			apc0_pwrcl_vreg: regulator {
				regulator-name = "apc0_pwrcl_corner";
				regulator-min-microvolt = <1>;
				regulator-max-microvolt = <17>;
				regulator-max-microvolt = <19>;

				qcom,cpr-fuse-corners = <3>;
				qcom,cpr-fuse-combos = <8>;
				qcom,cpr-speed-bins = <1>;
				qcom,cpr-speed-bin-corners = <17>;
				qcom,cpr-corners = <17>;
				qcom,cpr-fuse-corners = <4>;
				qcom,cpr-fuse-combos = <16>;
				qcom,cpr-speed-bins = <2>;
				qcom,cpr-speed-bin-corners = <19 19>;
				qcom,cpr-corners = <19>;

				qcom,cpr-corner-fmax-map = <6 12 17>;
				qcom,cpr-corner-fmax-map = <6 12 17 19>;

				qcom,cpr-voltage-ceiling =
					<872000  872000  872000  872000  872000
					 872000  872000  872000  872000  872000
					 872000  872000  872000  872000  872000
					 872000  928000>;
					 872000  928000  996000  996000>;

				qcom,cpr-voltage-floor =
					/* Speed bin 0 */
					<568000  568000  568000  568000  568000
					 568000  568000  568000  568000  584000
					 584000  584000  632000  632000  632000
					 632000  672000>;
					 632000  672000  996000  996000>,
					/* Speed bin 1 */
					<568000  568000  568000  568000  568000
					 568000  568000  568000  568000  584000
					 584000  584000  632000  632000  632000
					 632000  672000  712000  712000>;

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

				qcom,corner-frequencies =
					<300000000  422400000  499200000
@@ -145,7 +151,8 @@
					 825600000  902400000  979200000
					1056000000 1132800000 1209600000
					1286400000 1363200000 1440000000
					1516800000 1593600000>;
					1516800000 1593600000 1651200000
					1708800000>;

				qcom,cpr-ro-scaling-factor =
					<2594 2795 2576 2761 2469 2673 2198
@@ -154,24 +161,30 @@
					<2594 2795 2576 2761 2469 2673 2198
					 2553 3188 3255 3191 2962 3055 2984
					 2043 2947>,
					<2259 2389 2387 2531 2294 2464 2218
					 2476 2525 2855 2817 2836 2740 2490
					 1950 2632>,
					<2259 2389 2387 2531 2294 2464 2218
					 2476 2525 2855 2817 2836 2740 2490
					 1950 2632>;

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

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

				qcom,allow-voltage-interpolation;
				qcom,allow-quotient-interpolation;
				qcom,cpr-scaled-open-loop-voltage-as-ceiling;

				qcom,cpr-aging-max-voltage-adjustment = <15000>;
				qcom,cpr-aging-ref-corner = <17>;
				qcom,cpr-aging-ref-corner = <19>;
				qcom,cpr-aging-ro-scaling-factor = <1620>;
				qcom,allow-aging-voltage-adjustment =
					/* Speed bin 0 */
					<0 1 1 1 1 1 1 1>,
					/* Speed bin 1 */
					<0 1 1 1 1 1 1 1>;
				qcom,allow-aging-open-loop-voltage-adjustment =
					<1>;
@@ -188,32 +201,41 @@
			apc0_l3_vreg: regulator {
				regulator-name = "apc0_l3_corner";
				regulator-min-microvolt = <1>;
				regulator-max-microvolt = <9>;
				regulator-max-microvolt = <11>;

				qcom,cpr-fuse-corners = <3>;
				qcom,cpr-fuse-combos = <8>;
				qcom,cpr-speed-bins = <1>;
				qcom,cpr-speed-bin-corners = <9>;
				qcom,cpr-corners = <9>;
				qcom,cpr-fuse-corners = <4>;
				qcom,cpr-fuse-combos = <16>;
				qcom,cpr-speed-bins = <2>;
				qcom,cpr-speed-bin-corners = <11 11>;
				qcom,cpr-corners = <11>;

				qcom,cpr-corner-fmax-map = <4 7 9>;
				qcom,cpr-corner-fmax-map = <4 7 9 11>;

				qcom,cpr-voltage-ceiling =
					<872000  872000  872000  872000  872000
					 872000  872000  872000  928000>;
					 872000  872000  872000  928000  996000
					 996000>;

				qcom,cpr-voltage-floor =
					/* Speed bin 0 */
					<568000  568000  568000  568000  568000
					 584000  584000  632000  672000>;
					 584000  584000  632000  672000  996000
					 996000>,
					/* Speed bin 1 */
					<568000  568000  568000  568000  568000
					 584000  584000  632000  672000  712000
					 712000>;

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

				qcom,corner-frequencies =
					<300000000  422400000  499200000
					 576000000  652800000  729600000
					 806400000  883200000  960000000>;
					 806400000  883200000  960000000
					1036800000 1094400000>;

				qcom,cpr-ro-scaling-factor =
					<2857 3056 2828 2952 2699 2796 2447
@@ -222,24 +244,30 @@
					<2857 3056 2828 2952 2699 2796 2447
					 2631 2630 2579 2244 3343 3287 3137
					 3164 2656>,
					<2439 2577 2552 2667 2461 2577 2394
					 2536 2132 2307 2191 2903 2838 2912
					 2501 2095>,
					<2439 2577 2552 2667 2461 2577 2394
					 2536 2132 2307 2191 2903 2838 2912
					 2501 2095>;

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

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

				qcom,allow-voltage-interpolation;
				qcom,allow-quotient-interpolation;
				qcom,cpr-scaled-open-loop-voltage-as-ceiling;

				qcom,cpr-aging-max-voltage-adjustment = <15000>;
				qcom,cpr-aging-ref-corner = <9>;
				qcom,cpr-aging-ref-corner = <11>;
				qcom,cpr-aging-ro-scaling-factor = <1620>;
				qcom,allow-aging-voltage-adjustment =
					/* Speed bin 0 */
					<0 1 1 1 1 1 1 1>,
					/* Speed bin 1 */
					<0 1 1 1 1 1 1 1>;
				qcom,allow-aging-open-loop-voltage-adjustment =
					<1>;
@@ -305,39 +333,77 @@
			apc1_perfcl_vreg: regulator {
				regulator-name = "apc1_perfcl_corner";
				regulator-min-microvolt = <1>;
				regulator-max-microvolt = <24>;
				regulator-max-microvolt = <26>;

				qcom,cpr-fuse-corners = <3>;
				qcom,cpr-fuse-combos = <8>;
				qcom,cpr-speed-bins = <1>;
				qcom,cpr-speed-bin-corners = <22>;
				qcom,cpr-corners = <22>;
				qcom,cpr-fuse-combos = <16>;
				qcom,cpr-speed-bins = <2>;
				qcom,cpr-speed-bin-corners = <22 24>;
				qcom,cpr-corners =
					/* Speed bin 0 */
					<22 22 22 22 22 22 22 22>,
					/* Speed bin 1 */
					<24 24 24 24 24 24 24 24>;

				qcom,cpr-corner-fmax-map =
					<10 17 22>;
					/* Speed bin 0 */
					<10 17 22>,
					/* Speed bin 1 */
					<10 17 24>;

				qcom,cpr-voltage-ceiling =
					/* Speed bin 0 */
					<828000  828000  828000  828000  828000
					 828000  828000  828000  828000  828000
					 828000  828000  828000  828000  828000
					 828000  828000  884000  952000  952000
					1056000 1056000>,
					/* Speed bin 1 */
					<828000  828000  828000  828000  828000
					 828000  828000  828000  828000  828000
					 828000  828000  828000  828000  828000
					 828000  828000  884000  952000  952000
					1056000 1056000>;
					1056000 1056000 1056000 1056000>;

				qcom,cpr-voltage-floor =
					/* Speed bin 0 */
					<568000  568000  568000  568000  568000
					 568000  568000  568000  568000  568000
					 584000  584000  632000  632000  632000
					 632000  632000  672000  712000  712000
					 772000  772000>;
					 772000  772000>,
					/* Speed bin 1 */
					<568000  568000  568000  568000  568000
					 568000  568000  568000  568000  568000
					 584000  584000  632000  632000  632000
					 632000  632000  672000  712000  712000
					 772000  772000  772000  772000>;

				qcom,cpr-floor-to-ceiling-max-range =
					/* Speed bin 0 */
					<32000  32000  32000  32000  32000
					 32000  32000  32000  32000  32000
					 32000  32000  32000  32000  32000
					 32000  32000  40000  40000  40000
					 40000  40000>;
					 40000  40000>,
					/* Speed bin 1 */
					<32000  32000  32000  32000  32000
					 32000  32000  32000  32000  32000
					 32000  32000  32000  32000  32000
					 32000  32000  40000  40000  40000
					 40000  40000  40000  40000>;

				qcom,corner-frequencies =
					/* Speed bin 0 */
					<300000000  422400000  499200000
					 576000000  652800000  729600000
					 806400000  883200000  960000000
					1036800000 1113600000 1190400000
					1267200000 1344000000 1420800000
					1497600000 1574400000 1651200000
					1728000000 1804800000 1881600000
					1958400000>,
					/* Speed bin 1 */
					<300000000  422400000  499200000
					 576000000  652800000  729600000
					 806400000  883200000  960000000
@@ -345,7 +411,7 @@
					1267200000 1344000000 1420800000
					1497600000 1574400000 1651200000
					1728000000 1804800000 1881600000
					1958400000>;
					1958400000 2035200000 2092800000>;

				qcom,cpr-ro-scaling-factor =
					<2857 3056 2828 2952 2699 2796 2447
@@ -369,9 +435,12 @@
				qcom,cpr-scaled-open-loop-voltage-as-ceiling;

				qcom,cpr-aging-max-voltage-adjustment = <15000>;
				qcom,cpr-aging-ref-corner = <22>;
				qcom,cpr-aging-ref-corner = <22 24>;
				qcom,cpr-aging-ro-scaling-factor = <1700>;
				qcom,allow-aging-voltage-adjustment =
					/* Speed bin 0 */
					<0 1 1 1 1 1 1 1>,
					/* Speed bin 1 */
					<0 1 1 1 1 1 1 1>;
				qcom,allow-aging-open-loop-voltage-adjustment =
					<1>;
+33 −11
Original line number Diff line number Diff line
@@ -36,7 +36,14 @@

#define MSM8998_KBSS_FUSE_CORNERS			4
#define SDM660_KBSS_FUSE_CORNERS			5
#define SDM845_KBSS_FUSE_CORNERS	3

#define SDM845_KBSS_POWER_CLUSTER_FUSE_CORNERS		4
#define SDM845_KBSS_PERFORMANCE_CLUSTER_FUSE_CORNERS	3
/*
 * This must be set to the larger of SDM845_KBSS_POWER_CLUSTER_FUSE_CORNERS and
 * SDM845_KBSS_PERFORMANCE_CLUSTER_FUSE_CORNERS values.
 */
#define SDM845_KBSS_MAX_FUSE_CORNERS			4

/**
 * struct cprh_kbss_fuses - KBSS specific fuse data
@@ -79,7 +86,7 @@ struct cprh_kbss_fuses {
 */
#define CPRH_MSM8998_KBSS_FUSE_COMBO_COUNT	32
#define CPRH_SDM660_KBSS_FUSE_COMBO_COUNT	16
#define CPRH_SDM845_KBSS_FUSE_COMBO_COUNT	8
#define CPRH_SDM845_KBSS_FUSE_COMBO_COUNT	16

/*
 * Constants which define the name of each fuse corner.
@@ -146,16 +153,18 @@ static const char * const cprh_sdm660_perf_kbss_fuse_corner_name[] = {
#define CPRH_KBSS_PERFORMANCE_CLUSTER_THREAD_ID	0

static const char * const
cprh_sdm845_kbss_fuse_corner_name[2][SDM845_KBSS_FUSE_CORNERS] = {
cprh_sdm845_kbss_fuse_corner_name[2][SDM845_KBSS_MAX_FUSE_CORNERS] = {
	[CPRH_KBSS_POWER_CLUSTER_ID] = {
		"LowSVS",
		"SVS_L1",
		"NOM_L1",
		"TURBO",
	},
	[CPRH_KBSS_PERFORMANCE_CLUSTER_ID] = {
		"SVS",
		"NOM",
		"TURBO_L2",
		"",
	},
};

@@ -325,17 +334,19 @@ sdm660_kbss_quot_offset_param[2][SDM660_KBSS_FUSE_CORNERS][3] = {
 *		 different fuse rows.
 */
static const struct cpr3_fuse_param
sdm845_kbss_ro_sel_param[2][2][SDM845_KBSS_FUSE_CORNERS][3] = {
sdm845_kbss_ro_sel_param[2][2][SDM845_KBSS_MAX_FUSE_CORNERS][3] = {
	[CPRH_KBSS_POWER_CLUSTER_ID] = {
		[CPRH_KBSS_POWER_CLUSTER_THREAD_ID] = {
			{{66, 52, 55}, {} },
			{{66, 48, 51}, {} },
			{{66, 44, 47}, {} },
			{{66, 40, 43}, {} },
		},
		[CPRH_KBSS_L3_THREAD_ID] = {
			{{66, 52, 55}, {} },
			{{66, 48, 51}, {} },
			{{66, 44, 47}, {} },
			{{66, 40, 43}, {} },
		},
	},
	[CPRH_KBSS_PERFORMANCE_CLUSTER_ID] = {
@@ -348,17 +359,19 @@ sdm845_kbss_ro_sel_param[2][2][SDM845_KBSS_FUSE_CORNERS][3] = {
};

static const struct cpr3_fuse_param
sdm845_kbss_init_voltage_param[2][2][SDM845_KBSS_FUSE_CORNERS][3] = {
sdm845_kbss_init_voltage_param[2][2][SDM845_KBSS_MAX_FUSE_CORNERS][3] = {
	[CPRH_KBSS_POWER_CLUSTER_ID] = {
		[CPRH_KBSS_POWER_CLUSTER_THREAD_ID] = {
			{{67, 10, 15}, {} },
			{{67,  4,  9}, {} },
			{{66, 62, 63}, {67,  0,  3}, {} },
			{{66, 56, 61}, {} },
		},
		[CPRH_KBSS_L3_THREAD_ID] = {
			{{68, 47, 52}, {} },
			{{68, 41, 46}, {} },
			{{68, 35, 40}, {} },
			{{68, 29, 34}, {} },
		},
	},
	[CPRH_KBSS_PERFORMANCE_CLUSTER_ID] = {
@@ -371,17 +384,19 @@ sdm845_kbss_init_voltage_param[2][2][SDM845_KBSS_FUSE_CORNERS][3] = {
};

static const struct cpr3_fuse_param
sdm845_kbss_target_quot_param[2][2][SDM845_KBSS_FUSE_CORNERS][3] = {
sdm845_kbss_target_quot_param[2][2][SDM845_KBSS_MAX_FUSE_CORNERS][3] = {
	[CPRH_KBSS_POWER_CLUSTER_ID] = {
		[CPRH_KBSS_POWER_CLUSTER_THREAD_ID] = {
			{{67, 52, 63}, {} },
			{{67, 40, 51}, {} },
			{{67, 28, 39}, {} },
			{{67, 16, 27}, {} },
		},
		[CPRH_KBSS_L3_THREAD_ID] = {
			{{69, 25, 36}, {} },
			{{69, 13, 24}, {} },
			{{69,  1, 12}, {} },
			{{68, 53, 63}, {69,  0,  0}, {} },
		},
	},
	[CPRH_KBSS_PERFORMANCE_CLUSTER_ID] = {
@@ -394,17 +409,19 @@ sdm845_kbss_target_quot_param[2][2][SDM845_KBSS_FUSE_CORNERS][3] = {
};

static const struct cpr3_fuse_param
sdm845_kbss_quot_offset_param[2][2][SDM845_KBSS_FUSE_CORNERS][2] = {
sdm845_kbss_quot_offset_param[2][2][SDM845_KBSS_MAX_FUSE_CORNERS][2] = {
	[CPRH_KBSS_POWER_CLUSTER_ID] = {
		[CPRH_KBSS_POWER_CLUSTER_THREAD_ID] = {
			{{} },
			{{68, 14, 20}, {} },
			{{68,  7, 13}, {} },
			{{68,  0,  6}, {} },
		},
		[CPRH_KBSS_L3_THREAD_ID] = {
			{{} },
			{{69, 51, 57}, {} },
			{{69, 44, 50}, {} },
			{{69, 37, 43}, {} },
		},
	},
	[CPRH_KBSS_PERFORMANCE_CLUSTER_ID] = {
@@ -539,17 +556,19 @@ sdm660_kbss_fuse_ref_volt[2][SDM660_KBSS_FUSE_CORNERS] = {
 * Open loop voltage fuse reference voltages in microvolts for SDM845
 */
static const int
sdm845_kbss_fuse_ref_volt[2][2][SDM845_KBSS_FUSE_CORNERS] = {
sdm845_kbss_fuse_ref_volt[2][2][SDM845_KBSS_MAX_FUSE_CORNERS] = {
	[CPRH_KBSS_POWER_CLUSTER_ID] = {
		[CPRH_KBSS_POWER_CLUSTER_THREAD_ID] = {
			688000,
			812000,
			896000,
			900000,
		},
		[CPRH_KBSS_L3_THREAD_ID] = {
			688000,
			812000,
			896000,
			900000,
		},
	},
	[CPRH_KBSS_PERFORMANCE_CLUSTER_ID] = {
@@ -976,7 +995,10 @@ static int cprh_kbss_read_fuse_data(struct cpr3_regulator *vreg)
		break;
	case SDM845_V1_SOC_ID:
	case SDM845_V2_SOC_ID:
		fuse_corners = SDM845_KBSS_FUSE_CORNERS;
		fuse_corners = vreg->thread->ctrl->ctrl_id
					== CPRH_KBSS_POWER_CLUSTER_ID
				? SDM845_KBSS_POWER_CLUSTER_FUSE_CORNERS
				: SDM845_KBSS_PERFORMANCE_CLUSTER_FUSE_CORNERS;
		break;
	default:
		cpr3_err(vreg, "unsupported soc id = %d\n", soc_revision);