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

Commit 89c77097 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 GFX CPR device configuration for sdm660"

parents 0d0e8077 421bb324
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -239,3 +239,9 @@
#include "msm-pm660-rpm-regulator.dtsi"
#include "msm-pm660l-rpm-regulator.dtsi"
#include "sdm660-regulator.dtsi"

&soc {
	/* remove sdm660 MMSS CPR Controller node */
	/delete-node/cpr4-ctrl@05061000;
	/delete-node/regulator@01fcf004;
};
+141 −3
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@
 * GNU General Public License for more details.
 */

#include <dt-bindings/clock/qcom,gpu-sdm660.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

&rpm_bus {
	rpm-regulator-smpa4 {
		status = "okay";
@@ -489,10 +493,144 @@
/* Stub regulators */
/ {
	/* GFX Supply */
	gfx_vreg_corner: regulator-gfx-corner {
	gfx_stub_vreg: regulator-gfx-stub {
		compatible = "qcom,stub-regulator";
		regulator-name = "gfx_stub_corner";
		regulator-min-microvolt = <400000>;
		regulator-max-microvolt = <1070000>;
	};
};

&soc {
	/* MEM ACC regulators */
	gfx_mem_acc_vreg: regulator@01fcf004 {
		compatible = "qcom,mem-acc-regulator";
		reg = <0x01fcf004 0x4>;
		reg-names = "acc-sel-l1";
		regulator-name = "gfx_mem_acc_corner";
		regulator-min-microvolt = <1>;
		regulator-max-microvolt = <2>;

		qcom,corner-acc-map = <0x1 0x0>;
		qcom,acc-sel-l1-bit-pos = <0>;
		qcom,acc-sel-l1-bit-size = <1>;
	};

	gfx_ldo_vreg: ldo@0506e000 {
		compatible = "qcom,sdm660-gfx-ldo";
		reg = <0x0506e000 0x34>;
		reg-names = "ldo_addr";
		regulator-name = "msm_gfx_ldo";
		regulator-min-microvolt = <400000>;
		regulator-max-microvolt = <925000>;
	};

/* CPR controller regulators */
	/* MMSS CPR Controller node */
	gfx_cpr: cpr4-ctrl@05061000 {
		compatible = "qcom,cpr4-sdm660-mmss-ldo-regulator";
		reg = <0x05061000 0x4000>, <0x00784000 0x1000>;
		reg-names = "cpr_ctrl", "fuse_base";
		clocks = <&clock_gfx GPUCC_RBCPR_CLK>,
			 <&clock_rpmcc RPM_CNOC_CLK>;
		clock-names = "core_clk", "bus_clk";
		interrupts = <GIC_SPI 285 IRQ_TYPE_EDGE_RISING>;
		interrupt-names = "cpr";
		qcom,cpr-ctrl-name = "gfx";


		qcom,cpr-sensor-time = <1000>;
		qcom,cpr-loop-time = <5000000>;
		qcom,cpr-idle-cycles = <15>;
		qcom,cpr-step-quot-init-min = <12>;
		qcom,cpr-step-quot-init-max = <14>;
		qcom,cpr-count-mode = <0>;		/* All at once */
		qcom,cpr-count-repeat = <14>;

		vdd-supply = <&gfx_stub_vreg>;
		mem-acc-supply = <&gfx_mem_acc_vreg>;
		system-supply = <&pm660l_s3_level>; /* vdd_cx */
		qcom,voltage-step = <5000>;
		vdd-thread0-ldo-supply = <&gfx_ldo_vreg>;

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

			gfx_vreg_corner: regulator {
				regulator-name = "gfx_corner";
				regulator-min-microvolt = <1>;
				regulator-max-microvolt = <7>;

				qcom,cpr-fuse-corners = <6>;
				qcom,cpr-fuse-combos = <8>;
				qcom,cpr-corners = <7>;

				qcom,cpr-corner-fmax-map = <1 2 3 4 5 6>;

				qcom,cpr-voltage-ceiling =
					<585000  645000  725000  790000
					 870000  925000 1070000>;
				qcom,cpr-voltage-floor =
					<504000  504000  596000  652000
					 712000  744000 1070000>;

				qcom,mem-acc-voltage = <1 1 1 2 2 2 2>;
				qcom,system-voltage =
					<RPM_SMD_REGULATOR_LEVEL_LOW_SVS>,
					<RPM_SMD_REGULATOR_LEVEL_LOW_SVS>,
					<RPM_SMD_REGULATOR_LEVEL_SVS>,
					<RPM_SMD_REGULATOR_LEVEL_SVS_PLUS>,
					<RPM_SMD_REGULATOR_LEVEL_NOM>,
					<RPM_SMD_REGULATOR_LEVEL_NOM_PLUS>,
					<RPM_SMD_REGULATOR_LEVEL_TURBO>;

				qcom,corner-frequencies =
					<160000000 266000000 370000000
					 465000000 588000000 647000000
					 800000000>;

				qcom,cpr-target-quotients =
					<0    0    0    0     0    0  202  193
					331  326  337  345    0    0    0    0>,
					<0    0    0    0     0    0  202  193
					331  326  337  345    0    0    0    0>,
					<0    0    0    0     0    0  317  300
					476  463  489  489    0    0    0    0>,
					<0    0    0    0     0    0  411  387
					595  572  611  602    0    0    0    0>,
					<0    0    0    0     0    0  522  489
					727  696  748  732    0    0    0    0>,
					<0    0    0    0     0    0  606  568
					818  786  848  826    0    0    0    0>,
					<0    0    0    0     0    0    0    0
					 0    0    0    0     0    0    0    0>;

				qcom,cpr-ro-scaling-factor =
					<  0    0    0    0   0    0 1740 1620
					2040 1960 2160 2040   0    0    0    0>,
					<  0    0    0    0   0    0 1740 1620
					2040 1960 2160 2040   0    0    0    0>,
					<  0    0    0    0   0    0 1740 1620
					2040 1960 2160 2040   0    0    0    0>,
					<  0    0    0    0   0    0 1740 1620
					2040 1960 2160 2040   0    0    0    0>,
					<  0    0    0    0   0    0 1740 1620
					2040 1960 2160 2040   0    0    0    0>,
					<  0    0    0    0   0    0 1740 1620
					2040 1960 2160 2040   0    0    0    0>,
					<  0    0    0    0   0    0    0    0
					   0    0    0    0   0    0    0    0>;

				qcom,cpr-scaled-open-loop-voltage-as-ceiling;
				qcom,cpr-corner-allow-ldo-mode =
					<0 0 0 0 0 0 0>;
				qcom,cpr-corner-allow-closed-loop =
					<0 0 0 0 0 0 0>;
			};
		};
	};
};
+6 −6
Original line number Diff line number Diff line
@@ -122,12 +122,12 @@ static const struct cpr3_fuse_param sdm660_ldo_cpr_cl_enable_param[] = {

/* Open loop voltage fuse reference voltages in microvolts */
static const int sdm660_mmss_fuse_ref_volt[SDM660_MMSS_FUSE_CORNERS] = {
	584000,
	644000,
	724000,
	788000,
	868000,
	924000,
	585000,
	645000,
	725000,
	790000,
	870000,
	925000,
};

#define SDM660_MMSS_FUSE_STEP_VOLT		10000