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

Commit fb78f1f1 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 PM660, PM660a and PM660l PMIC peripheral devices"

parents 6db5d8f2 8f14a6a8
Loading
Loading
Loading
Loading
+631 −0
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/interrupt-controller/irq.h>

&spmi_bus {
	qcom,pm660@0 {
		compatible ="qcom,spmi-pmic";
		reg = <0x0 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;

		pm660_revid: qcom,revid@100 {
			compatible = "qcom,qpnp-revid";
			reg = <0x100 0x100>;
			qcom,fab-id-valid;
		};

		pm660_misc: qcom,misc@900 {
			compatible = "qcom,qpnp-misc";
			reg = <0x900 0x100>;
		};

		qcom,power-on@800 {
			compatible = "qcom,qpnp-power-on";
			reg = <0x800 0x100>;
			interrupts = <0x0 0x8 0x0 IRQ_TYPE_NONE>,
				     <0x0 0x8 0x1 IRQ_TYPE_NONE>,
				     <0x0 0x8 0x4 IRQ_TYPE_NONE>,
				     <0x0 0x8 0x5 IRQ_TYPE_NONE>;
			interrupt-names = "kpdpwr", "resin",
					"resin-bark", "kpdpwr-resin-bark";
			qcom,pon-dbc-delay = <15625>;
			qcom,kpdpwr-sw-debounce;
			qcom,system-reset;
			qcom,store-hard-reset-reason;

			qcom,pon_1 {
				qcom,pon-type = <0>;
				qcom,pull-up = <1>;
				linux,code = <116>;
			};

			qcom,pon_2 {
				qcom,pon-type = <1>;
				qcom,pull-up = <1>;
				linux,code = <114>;
			};
		};

		qcom,temp-alarm@2400 {
			compatible = "qcom,qpnp-temp-alarm";
			reg = <0x2400 0x100>;
			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
			label = "pm660_tz";
			qcom,channel-num = <6>;
			qcom,temp_alarm-vadc = <&pm660_vadc>;
		};

		pm660_gpios: gpios {
			compatible = "qcom,qpnp-pin";
			gpio-controller;
			#gpio-cells = <2>;
			#address-cells = <1>;
			#size-cells = <1>;
			label = "pm660-gpio";

			gpio@c000 {
				reg = <0xc000 0x100>;
				qcom,pin-num = <1>;
				status = "disabled";
			};

			gpio@c100 {
				reg = <0xc100 0x100>;
				qcom,pin-num = <2>;
				status = "disabled";
			};

			gpio@c200 {
				reg = <0xc200 0x100>;
				qcom,pin-num = <3>;
				status = "disabled";
			};

			gpio@c300 {
				reg = <0xc300 0x100>;
				qcom,pin-num = <4>;
				status = "disabled";
			};

			gpio@c400 {
				reg = <0xc400 0x100>;
				qcom,pin-num = <5>;
				status = "disabled";
			};

			gpio@c500 {
				reg = <0xc500 0x100>;
				qcom,pin-num = <6>;
				status = "disabled";
			};

			gpio@c600 {
				reg = <0xc600 0x100>;
				qcom,pin-num = <7>;
				status = "disabled";
			};

			gpio@c700 {
				reg = <0xc700 0x100>;
				qcom,pin-num = <8>;
				status = "disabled";
			};

			gpio@c800 {
				reg = <0xc800 0x100>;
				qcom,pin-num = <9>;
				status = "disabled";
			};

			gpio@c900 {
				reg = <0xc900 0x100>;
				qcom,pin-num = <10>;
				status = "disabled";
			};

			gpio@ca00 {
				reg = <0xca00 0x100>;
				qcom,pin-num = <11>;
				status = "disabled";
			};

			gpio@cb00 {
				reg = <0xcb00 0x100>;
				qcom,pin-num = <12>;
				status = "disabled";
			};

			gpio@cc00 {
				reg = <0xcc00 0x100>;
				qcom,pin-num = <13>;
				status = "disabled";
			};
		};

		pm660_coincell: qcom,coincell@2800 {
			compatible = "qcom,qpnp-coincell";
			reg = <0x2800 0x100>;
		};

		pm660_rtc: qcom,pm660_rtc {
			compatible = "qcom,qpnp-rtc";
			#address-cells = <1>;
			#size-cells = <1>;
			qcom,qpnp-rtc-write = <0>;
			qcom,qpnp-rtc-alarm-pwrup = <0>;

			qcom,pm660_rtc_rw@6000 {
				reg = <0x6000 0x100>;
			};
			qcom,pm660_rtc_alarm@6100 {
				reg = <0x6100 0x100>;
				interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
			};
		};

		pm660_vadc: vadc@3100 {
			compatible = "qcom,qpnp-vadc-hc";
			reg = <0x3100 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "eoc-int-en-set";
			qcom,adc-bit-resolution = <15>;
			qcom,adc-vdd-reference = <1875>;

			chan@6 {
				label = "die_temp";
				reg = <6>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <3>;
				qcom,hw-settle-time = <0>;
				qcom,fast-avg-setup = <0>;
				qcom,cal-val = <0>;
			};

			chan@0 {
				label = "ref_gnd";
				reg = <0>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <0>;
				qcom,hw-settle-time = <0>;
				qcom,fast-avg-setup = <0>;
				qcom,cal-val = <0>;
			};

			chan@1 {
				label = "ref_1250v";
				reg = <1>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <0>;
				qcom,hw-settle-time = <0>;
				qcom,fast-avg-setup = <0>;
				qcom,cal-val = <0>;
			};

			chan@83 {
				label = "vph_pwr";
				reg = <0x83>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <1>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <0>;
				qcom,hw-settle-time = <0>;
				qcom,fast-avg-setup = <0>;
			};

			chan@85 {
				label = "vcoin";
				reg = <0x85>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <1>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <0>;
				qcom,hw-settle-time = <0>;
				qcom,fast-avg-setup = <0>;
			};

			chan@4c {
				label = "xo_therm";
				reg = <0x4c>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <4>;
				qcom,hw-settle-time = <2>;
				qcom,fast-avg-setup = <0>;
			};

			chan@4d {
				label = "msm_therm";
				reg = <0x4d>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <2>;
				qcom,hw-settle-time = <2>;
				qcom,fast-avg-setup = <0>;
			};

			chan@51 {
				label = "quiet_therm";
				reg = <0x51>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <2>;
				qcom,hw-settle-time = <2>;
				qcom,fast-avg-setup = <0>;
			};

			chan@4e {
				label = "emmc_therm";
				reg = <0x4e>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <2>;
				qcom,hw-settle-time = <2>;
				qcom,fast-avg-setup = <0>;
				qcom,vadc-thermal-node;
			};

			chan@4f {
				label = "pa_therm0";
				reg = <0x4f>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <2>;
				qcom,hw-settle-time = <2>;
				qcom,fast-avg-setup = <0>;
				qcom,vadc-thermal-node;
			};

			chan@1d {
				label = "drax_temp";
				reg = <0x1d>;
				qcom,decimation = <2>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <3>;
				qcom,hw-settle-time = <0>;
				qcom,fast-avg-setup = <0>;
				qcom,cal-val = <0>;
			};
		};

		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>;
			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>,
				     <0x0 0x17 0x3 IRQ_TYPE_EDGE_RISING>,
				     <0x0 0x17 0x4 IRQ_TYPE_EDGE_RISING>,
				     <0x0 0x17 0x5 IRQ_TYPE_EDGE_RISING>,
				     <0x0 0x17 0x6 IRQ_TYPE_EDGE_RISING>;

			interrupt-names = "sig-tx",
					  "sig-rx",
					  "msg-tx",
					  "msg-rx",
					  "msg-tx-failed",
					  "msg-tx-discarded",
					  "msg-rx-discarded";

			qcom,default-sink-caps = <5000 3000>, /* 5V @ 3A */
						 <9000 3000>; /* 9V @ 3A */
		};

		pm660_adc_tm: vadc@3400 {
			compatible = "qcom,qpnp-adc-tm-hc";
			reg = <0x3400 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "eoc-int-en-set";
			qcom,adc-bit-resolution = <15>;
			qcom,adc-vdd-reference = <1875>;
			qcom,adc_tm-vadc = <&pm660_vadc>;
			qcom,decimation = <0>;
			qcom,fast-avg-setup = <0>;

			chan@83 {
				label = "vph_pwr";
				reg = <0x83>;
				qcom,pre-div-channel-scaling = <1>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <0>;
				qcom,hw-settle-time = <0>;
				qcom,btm-channel-number = <0x60>;
			};

			chan@4d {
				label = "msm_therm";
				reg = <0x4d>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <2>;
				qcom,hw-settle-time = <2>;
				qcom,btm-channel-number = <0x68>;
				qcom,thermal-node;
			};

			chan@51 {
				label = "quiet_therm";
				reg = <0x51>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <2>;
				qcom,hw-settle-time = <2>;
				qcom,btm-channel-number = <0x70>;
				qcom,thermal-node;
			};

			chan@4c {
				label = "xo_therm";
				reg = <0x4c>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <4>;
				qcom,hw-settle-time = <2>;
				qcom,btm-channel-number = <0x78>;
				qcom,thermal-node;
			};
		};

		pm660_rradc: rradc@4500 {
			compatible = "qcom,rradc";
			reg = <0x4500 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			#io-channel-cells = <1>;
			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>,
				<0x4300 0xff>;
			reg-names = "fg_user_adc",
					"fg_lmh";
			interrupts = <0x0 0x42 0x0 IRQ_TYPE_NONE>,
					<0x0 0x42 0x2 IRQ_TYPE_NONE>;
			interrupt-names = "bcl-high-ibat-int",
					"bcl-low-vbat-int";
			qcom,vbat-polling-delay-ms = <100>;
			qcom,ibat-polling-delay-ms = <100>;
		};
	};

	qcom,pm660@1 {
		compatible ="qcom,spmi-pmic";
		reg = <0x1 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;
	};
};
+29 −0
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/* Disable WLED */
&pm660l_wled {
	status = "disabled";
};

/* disable LCDB */
&pm660l_lcdb {
	status = "disabled";
};

&pm660a_oledb {
	status = "okay";
};

&pm660a_labibb {
	status = "okay";
};
+470 −0

File added.

Preview size limit exceeded, changes collapsed.