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

Commit fbc26c66 authored by David Collins's avatar David Collins
Browse files

ARM: dts: msm: add pmxprairie and PM8150B PMIC devices for sdxprairie



Add top level SPMI slave devices for pmxprairie and PM8150B PMICs.
Also add some of the peripheral devices within the SPMI slave
devices.

Change-Id: Ibe33ba49b448cc03965d81dbd827092877b0487a
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 6d7b379c
Loading
Loading
Loading
Loading
+153 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018, 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/clock/qcom,rpmh.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/input/qcom,qpnp-power-on.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>

&spmi_bus {
	#address-cells = <2>;
	#size-cells = <0>;
	interrupt-controller;
	#interrupt-cells = <4>;

	qcom,pmxprairie@8 {
		compatible = "qcom,spmi-pmic";
		reg = <0x8 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;

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

			qcom,pon_1 {
				qcom,pon-type = <PON_POWER_ON_TYPE_KPDPWR>;
				linux,code = <KEY_POWER>;
				qcom,pull-up;
			};

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

		pmxprairie_tz: qcom,temp-alarm@2400 {
			compatible = "qcom,spmi-temp-alarm";
			reg = <0x2400 0x100>;
			interrupts = <0x8 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
			#thermal-sensor-cells = <0>;
			qcom,temperature-threshold-set = <1>;
		};

		pmxprairie_clkdiv: clock-controller@5b00 {
			compatible = "qcom,spmi-clkdiv";
			reg = <0x5b00 0x100>;
			#clock-cells = <1>;
			qcom,num-clkdivs = <1>;
			clock-output-names = "pmxprairie_div_clk1";
			clocks = <&clock_rpmh RPMH_CXO_CLK>;
			clock-names = "xo";
		};

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

			qcom,pmxprairie_rtc_rw@6000 {
				reg = <0x6000 0x100>;
			};

			qcom,pmxprairie_rtc_alarm@6100 {
				reg = <0x6100 0x100>;
				interrupts =
					<0x8 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
			};
		};

		pmxprairie_gpios: pinctrl@c000 {
			compatible = "qcom,spmi-gpio";
			reg = <0xc000 0xb00>;
			interrupts = <0x8 0xc0 0x0 IRQ_TYPE_NONE>,
					<0x8 0xc1 0x0 IRQ_TYPE_NONE>,
					<0x8 0xc3 0x0 IRQ_TYPE_NONE>,
					<0x8 0xc4 0x0 IRQ_TYPE_NONE>,
					<0x8 0xc5 0x0 IRQ_TYPE_NONE>,
					<0x8 0xc7 0x0 IRQ_TYPE_NONE>,
					<0x8 0xc8 0x0 IRQ_TYPE_NONE>,
					<0x8 0xc9 0x0 IRQ_TYPE_NONE>;
			interrupt-names = "pmxprairie_gpio1",
					"pmxprairie_gpio2",
					"pmxprairie_gpio4",
					"pmxprairie_gpio5",
					"pmxprairie_gpio6",
					"pmxprairie_gpio8",
					"pmxprairie_gpio9",
					"pmxprairie_gpio10";
			gpio-controller;
			#gpio-cells = <2>;
			qcom,gpios-disallowed = <3 7 11>;
		};
	};

	qcom,pmxprairie@9 {
		compatible ="qcom,spmi-pmic";
		reg = <0x9 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;
	};
};

&thermal_zones {
	pmxprairie_temp_alarm: pmxprairie_tz {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pmxprairie_tz>;

		trips {
			pmxprairie_trip0: trip0 {
				temperature = <95000>;
				hysteresis = <0>;
				type = "passive";
			};

			pmxprairie_trip1: trip1 {
				temperature = <115000>;
				hysteresis = <0>;
				type = "passive";
			};

			pmxprairie_trip2: trip2 {
				temperature = <145000>;
				hysteresis = <0>;
				type = "passive";
			};
		};
	};
};
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

/dts-v1/;

#include "sdxprairie.dtsi"
#include "sdxprairie-cdp.dtsi"

/ {
+1 −1
Original line number Diff line number Diff line
@@ -10,4 +10,4 @@
 * GNU General Public License for more details.
 */

#include "sdxprairie.dtsi"
#include "sdxprairie-pmic-overlay.dtsi"
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

/dts-v1/;

#include "sdxprairie.dtsi"
#include "sdxprairie-mtp.dtsi"

/ {
+1 −1
Original line number Diff line number Diff line
@@ -10,4 +10,4 @@
 * GNU General Public License for more details.
 */

#include "sdxprairie.dtsi"
#include "sdxprairie-pmic-overlay.dtsi"
Loading