xref: /linux/arch/arm64/boot/dts/qcom/pm8994.dtsi (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1// SPDX-License-Identifier: GPL-2.0
2#include <dt-bindings/iio/qcom,spmi-vadc.h>
3#include <dt-bindings/input/linux-event-codes.h>
4#include <dt-bindings/interrupt-controller/irq.h>
5#include <dt-bindings/spmi/spmi.h>
6
7/ {
8	thermal-zones {
9		pm8994-thermal {
10			polling-delay-passive = <250>;
11
12			thermal-sensors = <&pm8994_temp>;
13
14			trips {
15				pm8994_alert0: pm8994-alert0 {
16					temperature = <95000>;
17					hysteresis = <2000>;
18					type = "passive";
19				};
20				pm8994_crit: pm8994-crit {
21					temperature = <125000>;
22					hysteresis = <2000>;
23					type = "critical";
24				};
25			};
26		};
27	};
28};
29
30&spmi_bus {
31
32	pmic@0 {
33		compatible = "qcom,pm8994", "qcom,spmi-pmic";
34		reg = <0x0 SPMI_USID>;
35		#address-cells = <1>;
36		#size-cells = <0>;
37
38		rtc@6000 {
39			compatible = "qcom,pm8941-rtc";
40			reg = <0x6000>, <0x6100>;
41			reg-names = "rtc", "alarm";
42			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
43		};
44
45		pm8994_pon: pon@800 {
46			compatible = "qcom,pm8916-pon";
47			reg = <0x800>;
48			mode-bootloader = <0x2>;
49			mode-recovery = <0x1>;
50
51			pwrkey {
52				compatible = "qcom,pm8941-pwrkey";
53				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
54				debounce = <15625>;
55				bias-pull-up;
56				linux,code = <KEY_POWER>;
57			};
58
59			pm8994_resin: resin {
60				compatible = "qcom,pm8941-resin";
61				interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
62				debounce = <15625>;
63				bias-pull-up;
64				status = "disabled";
65			};
66		};
67
68		pm8994_temp: temp-alarm@2400 {
69			compatible = "qcom,spmi-temp-alarm";
70			reg = <0x2400>;
71			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
72			io-channels = <&pm8994_vadc VADC_DIE_TEMP>;
73			io-channel-names = "thermal";
74			#thermal-sensor-cells = <0>;
75		};
76
77		pm8994_vadc: adc@3100 {
78			compatible = "qcom,spmi-vadc";
79			reg = <0x3100>;
80			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
81			#address-cells = <1>;
82			#size-cells = <0>;
83			#io-channel-cells = <1>;
84
85			channel@7 {
86				reg = <VADC_VSYS>;
87				qcom,pre-scaling = <1 3>;
88				label = "vph_pwr";
89			};
90			channel@8 {
91				reg = <VADC_DIE_TEMP>;
92				label = "die_temp";
93			};
94			channel@9 {
95				reg = <VADC_REF_625MV>;
96				label = "ref_625mv";
97			};
98			channel@a {
99				reg = <VADC_REF_1250MV>;
100				label = "ref_1250mv";
101			};
102			channel@e {
103				reg = <VADC_GND_REF>;
104			};
105			channel@f {
106				reg = <VADC_VDD_VADC>;
107			};
108		};
109
110		pm8994_gpios: gpio@c000 {
111			compatible = "qcom,pm8994-gpio", "qcom,spmi-gpio";
112			reg = <0xc000>;
113			gpio-controller;
114			gpio-ranges = <&pm8994_gpios 0 0 22>;
115			#gpio-cells = <2>;
116			interrupt-controller;
117			#interrupt-cells = <2>;
118		};
119
120		pm8994_mpps: mpps@a000 {
121			compatible = "qcom,pm8994-mpp", "qcom,spmi-mpp";
122			reg = <0xa000>;
123			gpio-controller;
124			#gpio-cells = <2>;
125			gpio-ranges = <&pm8994_mpps 0 0 8>;
126			interrupt-controller;
127			#interrupt-cells = <2>;
128		};
129	};
130
131	pmic@1 {
132		compatible = "qcom,pm8994", "qcom,spmi-pmic";
133		reg = <0x1 SPMI_USID>;
134		#address-cells = <1>;
135		#size-cells = <0>;
136
137		pm8994_lpg: pwm {
138			compatible = "qcom,pm8994-lpg";
139
140			#address-cells = <1>;
141			#size-cells = <0>;
142			#pwm-cells = <2>;
143
144			status = "disabled";
145		};
146
147		pm8994_spmi_regulators: regulators {
148			compatible = "qcom,pm8994-regulators";
149		};
150	};
151};
152