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

Commit 9b90c4c5 authored by Tirupathi Reddy's avatar Tirupathi Reddy
Browse files

ARM: dts: msm: Add SPM and APC CPR regulator nodes for 8909w-pm660



Add SPM regulator node for supporting voltage scaling on VDD_APC rail.
Enable 'bypass-spm' until the SAW support for 16-bit VCTL is enabled.
Add CPR regulator node with the required configuration for VDD_APC rail.

CRs-Fixed: 2037603
Change-Id: I06e2229a656799b079231071945555fdf609d8e2
Signed-off-by: default avatarTirupathi Reddy <tirupath@codeaurora.org>
parent b5698bd3
Loading
Loading
Loading
Loading
+96 −10
Original line number Diff line number Diff line
@@ -10,16 +10,6 @@
 * GNU General Public License for more details.
 */

/* CPR controlled regulator */
&soc {
	apc_vreg_corner: regulator-apc-corner {
		 compatible = "qcom,stub-regulator";
		  regulator-name = "apc_corner";
		  regulator-min-microvolt = <1>;
		  regulator-max-microvolt = <3>;
	 };
};

&rpm_bus {
	/* CX supply */
	rpm-regulator-smpa2 {
@@ -315,3 +305,99 @@
		};
	};
};

/* SPM controlled regulators */
&spmi_bus {
	qcom,pm660@1 {
		pm660_s1: spm-regulator@1400 {
			compatible = "qcom,spm-regulator";
			regulator-name = "pm660_s1";
			reg = <0x1400 0x100>;
			regulator-min-microvolt = <1052000>;
			regulator-max-microvolt = <1352000>;

			/* TODO: remove after SAW support is enabled */
			qcom,bypass-spm;
		};
	};
};

/* CPR controlled regulator */
&soc {
	mem_acc_vreg_corner: regulator@1942130 {
		compatible = "qcom,mem-acc-regulator";
		reg = <0x1942130 0x4>;
		reg-names = "acc-sel-l1";
		regulator-name = "mem_acc_corner";
		regulator-min-microvolt = <1>;
		regulator-max-microvolt = <3>;

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

	apc_vreg_corner: regulator@b018000 {
		compatible = "qcom,cpr-regulator";
		reg = <0xb018000 0x1000>, <0xb011064 4>, <0x58000 0x1000>;
		reg-names = "rbcpr", "rbcpr_clk", "efuse_addr";
		interrupts = <0 15 0>;
		regulator-name = "apc_corner";
		qcom,cpr-fuse-corners = <3>;
		regulator-min-microvolt = <1>;
		regulator-max-microvolt = <9>;

		qcom,cpr-voltage-ceiling = <1052000 1228000 1352000>;
		qcom,cpr-voltage-floor = <1052000 1052000 1156000>;
		vdd-apc-supply = <&pm660_s1>;

		qcom,vdd-mx-corner-map = <4 5 7>;
		qcom,vdd-mx-vmin-method = <4>;
		vdd-mx-supply = <&pm660_s3_corner_ao>;
		qcom,vdd-mx-vmax = <7>;

		mem-acc-supply = <&mem_acc_vreg_corner>;

		qcom,cpr-ref-clk = <19200>;
		qcom,cpr-timer-delay = <5000>;
		qcom,cpr-timer-cons-up = <0>;
		qcom,cpr-timer-cons-down = <2>;
		qcom,cpr-irq-line = <0>;
		qcom,cpr-step-quotient = <10>;
		qcom,cpr-up-threshold = <0>;
		qcom,cpr-down-threshold = <2>;
		qcom,cpr-idle-clocks = <15>;
		qcom,cpr-gcnt-time = <1>;
		qcom,vdd-apc-step-up-limit = <1>;
		qcom,vdd-apc-step-down-limit = <1>;
		qcom,cpr-apc-volt-step = <4000>;

		qcom,cpr-fuse-row = <26 0>;
		qcom,cpr-fuse-target-quot = <42 24 6>;
		qcom,cpr-fuse-ro-sel = <61 61 54>;
		qcom,cpr-fuse-bp-cpr-disable = <58>;
		qcom,cpr-fuse-init-voltage =
					<26 36 6 0>,
					<26 18 6 0>,
					<26 0 6 0>;
		qcom,cpr-fuse-revision = <26 59 2 0>;
		qcom,cpr-init-voltage-ref = <1052000 1228000 1352000>;
		qcom,cpr-init-voltage-step = <10000>;
		qcom,cpr-corner-map = <1 1 2 2 3 3 3 3 3>;
		qcom,cpr-init-voltage-as-ceiling;
		qcom,cpr-corner-frequency-map =
					<1 200000000>,
					<2 400000000>,
					<3 533330000>,
					<4 800000000>,
					<5 998400000>,
					<6 1094400000>,
					<7 1190400000>,
					<8 1248000000>,
					<9 1267200000>;
		qcom,speed-bin-fuse-sel = <1 34 3 0>;
		qcom,cpr-speed-bin-max-corners =
					<0 (-1) 2 4 9>,
					<2 (-1) 2 4 6>;
		qcom,cpr-quot-adjust-scaling-factor-max = <1400>;
	};
};