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

Commit 4b983087 authored by Tirupathi Reddy's avatar Tirupathi Reddy
Browse files

ARM: dts: qcom: Move some pm660 devices into overlays for sdm670



Move the pm660 device nodes such as charger, fuel gauge, haptics
and display-bias into board specific device tree overlay files.
This ensures that these optional devices do not show up in the
base sdm670 device tree.

Also add device files to support pm660a based sdm670 platform.

CRs-Fixed: 2106445
Change-Id: I0ef29089db115bc2476c22d40e40a52e14e5b157
Signed-off-by: default avatarTirupathi Reddy <tirupath@codeaurora.org>
parent 7cf6dd03
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -69,15 +69,21 @@ ifeq ($(CONFIG_BUILD_ARM64_DT_OVERLAY),y)
	dtbo-$(CONFIG_ARCH_SDM670) += \
		sdm670-cdp-overlay.dtbo \
		sdm670-mtp-overlay.dtbo \
		sdm670-rumi-overlay.dtbo
		sdm670-rumi-overlay.dtbo \
		sdm670-pm660a-cdp-overlay.dtbo \
		sdm670-pm660a-mtp-overlay.dtbo

sdm670-cdp-overlay.dtbo-base := sdm670.dtb
sdm670-mtp-overlay.dtbo-base := sdm670.dtb
sdm670-rumi-overlay.dtbo-base := sdm670.dtb
sdm670-pm660a-cdp-overlay.dtbo-base := sdm670.dtb
sdm670-pm660a-mtp-overlay.dtbo-base := sdm670.dtb
else
dtb-$(CONFIG_ARCH_SDM670) += sdm670-rumi.dtb \
	sdm670-mtp.dtb \
	sdm670-cdp.dtb
	sdm670-cdp.dtb \
	sdm670-pm660a-mtp.dtb \
	sdm670-pm660a-cdp.dtb
endif

always		:= $(dtb-y)
+2 −229
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
#include <dt-bindings/interrupt-controller/irq.h>

&spmi_bus {
	qcom,pm660@0 {
	pm660_0: qcom,pm660@0 {
		compatible ="qcom,spmi-pmic";
		reg = <0x0 SPMI_USID>;
		#address-cells = <2>;
@@ -245,149 +245,10 @@
			};
		};

		pm660_charger: qcom,qpnp-smb2 {
			compatible = "qcom,qpnp-smb2";
			#address-cells = <1>;
			#size-cells = <1>;

			qcom,pmic-revid = <&pm660_revid>;

			io-channels = <&pm660_rradc 8>,
				      <&pm660_rradc 10>,
				      <&pm660_rradc 3>,
				      <&pm660_rradc 4>;
			io-channel-names = "charger_temp",
					   "charger_temp_max",
					   "usbin_i",
					   "usbin_v";

			qcom,wipower-max-uw = <5000000>;

			/* Enable after the qusb_phy0 device node is added */
			/* dpdm-supply = <&qusb_phy0>; */

			qcom,thermal-mitigation
					= <3000000 2500000 2000000 1500000
						1000000 500000>;

			qcom,chgr@1000 {
				reg = <0x1000 0x100>;
				interrupts =
					<0x0 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x10 0x4 IRQ_TYPE_EDGE_RISING>;

				interrupt-names = "chg-error",
						  "chg-state-change",
						  "step-chg-state-change",
						  "step-chg-soc-update-fail",
						  "step-chg-soc-update-request";
			};

			qcom,otg@1100 {
				reg = <0x1100 0x100>;
				interrupts = <0x0 0x11 0x0 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x11 0x1 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x11 0x2 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x11 0x3 IRQ_TYPE_EDGE_BOTH>;

				interrupt-names = "otg-fail",
						  "otg-overcurrent",
						  "otg-oc-dis-sw-sts",
						  "testmode-change-detect";
			};

			qcom,bat-if@1200 {
				reg = <0x1200 0x100>;
				interrupts =
					<0x0 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x12 0x5 IRQ_TYPE_EDGE_BOTH>;

				interrupt-names = "bat-temp",
						  "bat-ocp",
						  "bat-ov",
						  "bat-low",
						  "bat-therm-or-id-missing",
						  "bat-terminal-missing";
			};

			qcom,usb-chgpth@1300 {
				reg = <0x1300 0x100>;
				interrupts =
					<0x0 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x13 0x5 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x13 0x7 IRQ_TYPE_EDGE_RISING>;

				interrupt-names = "usbin-collapse",
						  "usbin-lt-3p6v",
						  "usbin-uv",
						  "usbin-ov",
						  "usbin-plugin",
						  "usbin-src-change",
						  "usbin-icl-change",
						  "type-c-change";
			};

			qcom,dc-chgpth@1400 {
				reg = <0x1400 0x100>;
				interrupts =
					<0x0 0x14 0x0 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x14 0x1 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x14 0x2 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x14 0x3 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x14 0x4 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x14 0x5 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x14 0x6 IRQ_TYPE_EDGE_RISING>;

				interrupt-names = "dcin-collapse",
						  "dcin-lt-3p6v",
						  "dcin-uv",
						  "dcin-ov",
						  "dcin-plugin",
						  "div2-en-dg",
						  "dcin-icl-change";
			};

			qcom,chgr-misc@1600 {
				reg = <0x1600 0x100>;
				interrupts =
					<0x0 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x16 0x2 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x16 0x3 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x16 0x5 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x16 0x6 IRQ_TYPE_EDGE_FALLING>,
					<0x0 0x16 0x7 IRQ_TYPE_EDGE_BOTH>;

				interrupt-names = "wdog-snarl",
						  "wdog-bark",
						  "aicl-fail",
						  "aicl-done",
						  "high-duty-cycle",
						  "input-current-limiting",
						  "temperature-change",
						  "switcher-power-ok";
			};
		};

		pm660_pdphy: qcom,usb-pdphy@1700 {
			compatible = "qcom,qpnp-pdphy";
			reg = <0x1700 0x100>;
			vdd-pdphy-supply = <&pm660l_l7>;
			vbus-supply = <&smb2_vbus>;
			vconn-supply = <&smb2_vconn>;
			interrupts = <0x0 0x17 0x0 IRQ_TYPE_EDGE_RISING>,
				     <0x0 0x17 0x1 IRQ_TYPE_EDGE_RISING>,
				     <0x0 0x17 0x2 IRQ_TYPE_EDGE_RISING>,
@@ -497,73 +358,6 @@
			qcom,pmic-revid = <&pm660_revid>;
		};

		pm660_fg: qpnp,fg {
			compatible = "qcom,fg-gen3";
			#address-cells = <1>;
			#size-cells = <1>;
			qcom,pmic-revid = <&pm660_revid>;
			io-channels = <&pm660_rradc 0>,
				      <&pm660_rradc 7>;
			io-channel-names = "rradc_batt_id",
					   "rradc_die_temp";
			qcom,rradc-base = <0x4500>;
			qcom,fg-esr-timer-awake = <96 96>;
			qcom,fg-esr-timer-asleep = <256 256>;
			qcom,fg-esr-timer-charging = <0 96>;
			qcom,cycle-counter-en;
			status = "okay";

			qcom,fg-batt-soc@4000 {
				status = "okay";
				reg = <0x4000 0x100>;
				interrupts = <0x0 0x40 0x0 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x40 0x1 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x40 0x2
							IRQ_TYPE_EDGE_RISING>,
					     <0x0 0x40 0x3
							IRQ_TYPE_EDGE_RISING>,
					     <0x0 0x40 0x4 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x40 0x5
							IRQ_TYPE_EDGE_RISING>,
					     <0x0 0x40 0x6 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x40 0x7 IRQ_TYPE_EDGE_BOTH>;
				interrupt-names = "soc-update",
						  "soc-ready",
						  "bsoc-delta",
						  "msoc-delta",
						  "msoc-low",
						  "msoc-empty",
						  "msoc-high",
						  "msoc-full";
			};

			qcom,fg-batt-info@4100 {
				status = "okay";
				reg = <0x4100 0x100>;
				interrupts = <0x0 0x41 0x0 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x41 0x1 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x41 0x2 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x41 0x3 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x41 0x6 IRQ_TYPE_EDGE_BOTH>;
				interrupt-names = "vbatt-pred-delta",
						  "vbatt-low",
						  "esr-delta",
						  "batt-missing",
						  "batt-temp-delta";
			};

			qcom,fg-memif@4400 {
				status = "okay";
				reg = <0x4400 0x100>;
				interrupts = <0x0 0x44 0x0 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x44 0x1 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x44 0x2 IRQ_TYPE_EDGE_BOTH>;
				interrupt-names = "ima-rdy",
						  "mem-xcp",
						  "dma-grant";
			};
		};

		bcl@4200 {
			compatible = "qcom,msm-bcl-lmh";
			reg = <0x4200 0xff>,
@@ -579,32 +373,11 @@
		};
	};

	qcom,pm660@1 {
	pm660_1: qcom,pm660@1 {
		compatible ="qcom,spmi-pmic";
		reg = <0x1 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;

		pm660_haptics: qcom,haptics@c000 {
			compatible = "qcom,qpnp-haptics";
			reg = <0xc000 0x100>;
			interrupts = <0x1 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
				     <0x1 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
			interrupt-names = "hap-sc-irq", "hap-play-irq";
			qcom,pmic-revid = <&pm660_revid>;
			qcom,pmic-misc = <&pm660_misc>;
			qcom,misc-clk-trim-error-reg = <0xf3>;
			qcom,actuator-type = <0>;
			qcom,play-mode = "direct";
			qcom,vmax-mv = <3200>;
			qcom,ilim-ma = <800>;
			qcom,sc-dbc-cycles = <8>;
			qcom,wave-play-rate-us = <6667>;
			qcom,en-brake;
			qcom,lra-high-z = "opt0";
			qcom,lra-auto-res-mode = "qwd";
			qcom,lra-res-cal-period = <4>;
		};
	};
};

+0 −113
Original line number Diff line number Diff line
@@ -185,35 +185,6 @@
			};
		};

		pm660l_wled: qcom,leds@d800 {
			compatible = "qcom,qpnp-wled";
			reg = <0xd800 0x100>,
				<0xd900 0x100>;
			reg-names = "qpnp-wled-ctrl-base",
					"qpnp-wled-sink-base";
			interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "ovp-irq";
			linux,name = "wled";
			linux,default-trigger = "bkl-trigger";
			qcom,fdbk-output = "auto";
			qcom,vref-uv = <127500>;
			qcom,switch-freq-khz = <800>;
			qcom,ovp-mv = <29600>;
			qcom,ilim-ma = <970>;
			qcom,boost-duty-ns = <26>;
			qcom,mod-freq-khz = <9600>;
			qcom,dim-mode = "hybrid";
			qcom,hyb-thres = <625>;
			qcom,sync-dly-us = <800>;
			qcom,fs-curr-ua = <25000>;
			qcom,cons-sync-write-delay-us = <1000>;
			qcom,led-strings-list = [00 01 02];
			qcom,loop-auto-gm-en;
			qcom,pmic-revid = <&pm660l_revid>;
			qcom,auto-calibration-enable;
			status = "ok";
		};

		flash_led: qcom,leds@d300 {
			compatible = "qcom,qpnp-flash-led-v2";
			reg = <0xd300 0x100>;
@@ -322,89 +293,5 @@
				qcom,default-led-trigger = "switch1_trigger";
			};
		};

		pm660l_lcdb: qpnp-lcdb@ec00 {
			compatible = "qcom,qpnp-lcdb-regulator";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0xec00 0x100>;
			interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "sc-irq";

			qcom,pmic-revid = <&pm660l_revid>;

			lcdb_ldo_vreg: ldo {
				label = "ldo";
				regulator-name = "lcdb_ldo";
				regulator-min-microvolt = <4000000>;
				regulator-max-microvolt = <6000000>;
			};

			lcdb_ncp_vreg: ncp {
				label = "ncp";
				regulator-name = "lcdb_ncp";
				regulator-min-microvolt = <4000000>;
				regulator-max-microvolt = <6000000>;
			};
		};

		pm660a_oledb: qpnp-oledb@e000 {
		       compatible = "qcom,qpnp-oledb-regulator";
		       #address-cells = <1>;
		       #size-cells = <1>;
		       qcom,pmic-revid = <&pm660l_revid>;
		       reg = <0xe000 0x100>;
		       qcom,pbs-client = <&pm660l_pbs>;

		       label = "oledb";
		       regulator-name = "regulator-oledb";
		       regulator-min-microvolt = <5000000>;
		       regulator-max-microvolt = <8100000>;

		       qcom,swire-control;
		       qcom,ext-pin-control;
		       status = "disabled";
		};

		pm660a_labibb: qpnp-labibb-regulator {
			compatible = "qcom,qpnp-labibb-regulator";
			#address-cells = <1>;
			#size-cells = <1>;
			qcom,pmic-revid = <&pm660l_revid>;
			qcom,swire-control;
			status = "disabled";

			ibb_regulator: qcom,ibb@dc00 {
				reg = <0xdc00 0x100>;
				reg-names = "ibb_reg";
				regulator-name = "ibb_reg";

				regulator-min-microvolt = <4000000>;
				regulator-max-microvolt = <6300000>;

				qcom,qpnp-ibb-min-voltage = <1400000>;
				qcom,qpnp-ibb-step-size = <100000>;
				qcom,qpnp-ibb-slew-rate = <2000000>;
				qcom,qpnp-ibb-init-voltage = <4000000>;
				qcom,qpnp-ibb-init-amoled-voltage = <4000000>;
			};

			lab_regulator: qcom,lab@de00 {
				reg = <0xde00 0x100>;
				reg-names = "lab";
				regulator-name = "lab_reg";

				regulator-min-microvolt = <4600000>;
				regulator-max-microvolt = <6100000>;

				qcom,qpnp-lab-min-voltage = <4600000>;
				qcom,qpnp-lab-step-size = <100000>;
				qcom,qpnp-lab-slew-rate = <5000>;
				qcom,qpnp-lab-init-voltage = <4600000>;
				qcom,qpnp-lab-init-amoled-voltage = <4600000>;

				qcom,notify-lab-vreg-ok-sts;
			};
		};
	};
};
+4 −1
Original line number Diff line number Diff line
@@ -22,9 +22,12 @@
#include "sdm670-cdp.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. SDM670 CDP";
	model = "Qualcomm Technologies, Inc. SDM670 PM660 + PM660L CDP";
	compatible = "qcom,sdm670-cdp", "qcom,sdm670", "qcom,cdp";
	qcom,msm-id = <336 0x0>;
	qcom,board-id = <1 0>;
	qcom,pmic-id = <0x0001001b 0x0101011a 0x0 0x0>,
		       <0x0001001b 0x0102001a 0x0 0x0>,
		       <0x0001001b 0x0201011a 0x0 0x0>;
};
+4 −1
Original line number Diff line number Diff line
@@ -17,7 +17,10 @@
#include "sdm670-cdp.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. SDM670 CDP";
	model = "Qualcomm Technologies, Inc. SDM670 PM660 + PM660L CDP";
	compatible = "qcom,sdm670-cdp", "qcom,sdm670", "qcom,cdp";
	qcom,board-id = <1 0>;
	qcom,pmic-id = <0x0001001b 0x0101011a 0x0 0x0>,
		       <0x0001001b 0x0102001a 0x0 0x0>,
		       <0x0001001b 0x0201011a 0x0 0x0>;
};
Loading