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

Commit 32ac012b authored by Srinivas Ramana's avatar Srinivas Ramana Committed by Vignesh Radhakrishnan
Browse files

ARM: dts: mpq8092: Add krait regulator nodes



MPQ8092 runs from a ganged PMIC regulator. Create krait regulator
devices to control LDO/BHS mode and phases/voltage on the PMIC gang.

While at it also add the device for the gang regulator. This device
is responsible for implementing overshoot workarounds and also for
checking PMIC gang configuration.

Enable Krait regulator driver for mpq8092.

Change-Id: I28a993729adde16e350fbc7340a37e53439d9d20
Signed-off-by: default avatarSrinivas Ramana <sramana@codeaurora.org>
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent dc90658c
Loading
Loading
Loading
Loading
+81 −9
Original line number Diff line number Diff line
@@ -53,15 +53,6 @@
			status = "okay";
		};

		pma8084_s6: regulator@2300 {
			regulator-min-microvolt = <945000>;
			regulator-max-microvolt = <945000>;
			qcom,enable-time = <500>;
			qcom,pull-down-enable = <1>;
			regulator-always-on;
			status = "okay";
		};

		pma8084_s12: regulator@3500 {
			regulator-min-microvolt = <1500000>;
			regulator-max-microvolt = <1500000>;
@@ -345,3 +336,84 @@
		 };
	};
};

&soc {
	krait_pdn: krait-pdn@f9011000 {
		reg = <0xf9011000 0x1000>,
		      <0xfc4b80b0 8>;
		reg-names = "apcs_gcc", "phase-scaling-efuse";
		compatible = "qcom,krait-pdn";
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		qcom,pfm-threshold = <76>;
		qcom,use-phase-switching;
		qcom,cores-per-phase = <2>;
		qcom,valid-phases = <1 2>;
		qcom,phase-coeff-threshold = <2000000 4000000>;

		krait0_vreg: regulator@f9088000 {
			compatible = "qcom,krait-regulator";
			regulator-name = "krait0";
			reg = <0xf9088000 0x1000>, /* APCS_ALIAS0_KPSS_ACS */
				<0xf908a800 0x1000>; /* APCS_ALIAS0_KPSS_MDD */
			reg-names = "acs", "mdd";
			regulator-min-microvolt = <500000>;
			regulator-max-microvolt = <1100000>;
			qcom,headroom-voltage = <150000>;
			qcom,retention-voltage = <675000>;
			qcom,ldo-default-voltage = <750000>;
			qcom,ldo-threshold-voltage = <850000>;
			qcom,ldo-delta-voltage = <25000>;
			qcom,cpu-num = <0>;
		};

		krait1_vreg: regulator@f9098000 {
			compatible = "qcom,krait-regulator";
			regulator-name = "krait1";
			reg = <0xf9098000 0x1000>, /* APCS_ALIAS1_KPSS_ACS */
				<0xf909a800 0x1000>; /* APCS_ALIAS1_KPSS_MDD */
			reg-names = "acs", "mdd";
			regulator-min-microvolt = <500000>;
			regulator-max-microvolt = <1100000>;
			qcom,headroom-voltage = <150000>;
			qcom,retention-voltage = <675000>;
			qcom,ldo-default-voltage = <750000>;
			qcom,ldo-threshold-voltage = <850000>;
			qcom,ldo-delta-voltage = <25000>;
			qcom,cpu-num = <1>;
		};

		krait2_vreg: regulator@f90a8000 {
			compatible = "qcom,krait-regulator";
			regulator-name = "krait2";
			reg = <0xf90a8000 0x1000>, /* APCS_ALIAS2_KPSS_ACS */
				<0xf90aa800 0x1000>; /* APCS_ALIAS2_KPSS_MDD */
			reg-names = "acs", "mdd";
			regulator-min-microvolt = <500000>;
			regulator-max-microvolt = <1100000>;
			qcom,headroom-voltage = <150000>;
			qcom,retention-voltage = <675000>;
			qcom,ldo-default-voltage = <750000>;
			qcom,ldo-threshold-voltage = <850000>;
			qcom,ldo-delta-voltage = <25000>;
			qcom,cpu-num = <2>;
		};

		krait3_vreg: regulator@f90b8000 {
			compatible = "qcom,krait-regulator";
			regulator-name = "krait3";
			reg = <0xf90b8000 0x1000>, /* APCS_ALIAS3_KPSS_ACS */
				<0xf90ba800 0x1000>; /* APCS_ALIAS3_KPSS_MDD */
			reg-names = "acs", "mdd";
			regulator-min-microvolt = <500000>;
			regulator-max-microvolt = <1100000>;
			qcom,headroom-voltage = <150000>;
			qcom,retention-voltage = <675000>;
			qcom,ldo-default-voltage = <750000>;
			qcom,ldo-threshold-voltage = <850000>;
			qcom,ldo-delta-voltage = <25000>;
			qcom,cpu-num = <3>;
		};
	};
};
+19 −0
Original line number Diff line number Diff line
@@ -743,3 +743,22 @@
#include "msm-pma8084-rpm-regulator.dtsi"
#include "msm-pma8084.dtsi"
#include "mpq8092-regulator.dtsi"

&krait_regulator_pmic {
	status = "ok";

	qcom,ctl@2300 {
		reg = <0x2300 0x100>;
		status = "ok";
	};

	qcom,ps@2400 {
		reg = <0x2400 0x100>;
		status = "ok";
	};

	qcom,freq@2500 {
		reg = <0x2500 0x100>;
		status = "ok";
	};
};
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ CONFIG_MSM_L2_ERP_2BIT_PANIC=y
CONFIG_MSM_CACHE_DUMP=y
CONFIG_MSM_CACHE_DUMP_ON_PANIC=y
CONFIG_MSM_ENABLE_WDOG_DEBUG_CONTROL=y
CONFIG_KRAIT_REGULATOR=y
CONFIG_SMP=y
# CONFIG_SMP_ON_UP is not set
CONFIG_SCHED_MC=y
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/regulator/qpnp-regulator.h>
#include <linux/regulator/krait-regulator.h>

#include "board-dt.h"
#include "clock.h"
@@ -76,6 +77,7 @@ void __init mpq8092_add_drivers(void)
	msm_rpm_driver_init();
	rpm_regulator_smd_driver_init();
	qpnp_regulator_init();
	krait_power_init();
	if (of_board_is_rumi())
		msm_clock_init(&mpq8092_rumi_clock_init_data);
	else