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

Commit 65bf0ffd 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 support"

parents 25deaa4c 15873333
Loading
Loading
Loading
Loading
+298 −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.
 */

&rpm_bus {
	rpm-regulator-smpa4 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "smpa";
		qcom,resource-id = <4>;
		qcom,regulator-type = <1>;
		status = "disabled";

		regulator-s4 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_s4";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-smpa5 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "smpa";
		qcom,resource-id = <5>;
		qcom,regulator-type = <1>;
		status = "disabled";

		regulator-s5 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_s5";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-smpa6 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "smpa";
		qcom,resource-id = <6>;
		qcom,regulator-type = <1>;
		status = "disabled";

		regulator-s6 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_s6";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa1 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <1>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l1 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l1";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa2 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <2>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l2 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l2";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa3 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <3>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l3 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l3";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa5 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <5>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l5 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l5";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa6 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <6>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l6 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l6";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa7 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <7>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l7 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l7";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa8 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <8>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l8 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l8";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa9 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <9>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l9 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l9";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa10 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <10>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l10 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l10";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa11 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <11>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l11 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l11";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa12 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <12>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l12 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l12";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa13 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <13>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l13 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l13";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa14 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <14>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l14 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l14";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa15 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <15>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l15 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l15";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa17 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <17>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l17 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l17";
			qcom,set = <3>;
			status = "disabled";
		};
	};

	rpm-regulator-ldoa19 {
		compatible = "qcom,rpm-smd-regulator-resource";
		qcom,resource-name = "ldoa";
		qcom,resource-id = <19>;
		qcom,regulator-type = <0>;
		status = "disabled";

		regulator-l19 {
			compatible = "qcom,rpm-smd-regulator";
			regulator-name = "pm660_l19";
			qcom,set = <3>;
			status = "disabled";
		};
	};
};
+335 −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,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@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>;
			};
		};
	};

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

		pm660_haptics: qcom,haptic@c000 {
			compatible = "qcom,qpnp-haptic";
			reg = <0xc000 0x100>;
			interrupts = <0x1 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
				     <0x1 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
			interrupt-names = "sc-irq", "play-irq";
			qcom,pmic-revid = <&pm660_revid>;
			qcom,pmic-misc = <&pm660_misc>;
			qcom,misc-clk-trim-error-reg = <0xf3>;
			qcom,actuator-type = "lra";
			qcom,play-mode = "direct";
			qcom,vmax-mv = <3200>;
			qcom,ilim-ma = <800>;
			qcom,wave-shape = "square";
			qcom,wave-play-rate-us = <6667>;
			qcom,int-pwm-freq-khz = <505>;
			qcom,sc-deb-cycles = <8>;
			qcom,en-brake;
			qcom,brake-pattern = [03 03 00 00];
			qcom,lra-high-z = "opt0";
			qcom,lra-auto-res-mode = "qwd";
			qcom,lra-calibrate-at-eop = <0>;
			qcom,correct-lra-drive-freq;
		};
	};
};