xref: /openbmc/linux/arch/arm64/boot/dts/qcom/pm8994.dtsi (revision 842ed298)
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 {
10			polling-delay-passive = <250>;
11			polling-delay = <1000>;
12
13			thermal-sensors = <&pm8994_temp>;
14
15			trips {
16				pm8994_alert0: pm8994-alert0 {
17					temperature = <95000>;
18					hysteresis = <2000>;
19					type = "passive";
20				};
21				pm8994_crit: pm8994-crit {
22					temperature = <125000>;
23					hysteresis = <2000>;
24					type = "critical";
25				};
26			};
27		};
28	};
29};
30
31&spmi_bus {
32
33	pmic@0 {
34		compatible = "qcom,pm8994", "qcom,spmi-pmic";
35		reg = <0x0 SPMI_USID>;
36		#address-cells = <1>;
37		#size-cells = <0>;
38
39		rtc@6000 {
40			compatible = "qcom,pm8941-rtc";
41			reg = <0x6000>, <0x6100>;
42			reg-names = "rtc", "alarm";
43			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
44		};
45
46		pon@800 {
47			compatible = "qcom,pm8916-pon";
48
49			reg = <0x800>;
50			mode-bootloader = <0x2>;
51			mode-recovery = <0x1>;
52
53			pwrkey {
54				compatible = "qcom,pm8941-pwrkey";
55				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
56				debounce = <15625>;
57				bias-pull-up;
58				linux,code = <KEY_POWER>;
59			};
60
61		};
62
63		pm8994_temp: temp-alarm@2400 {
64			compatible = "qcom,spmi-temp-alarm";
65			reg = <0x2400>;
66			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
67			io-channels = <&pm8994_vadc VADC_DIE_TEMP>;
68			io-channel-names = "thermal";
69			#thermal-sensor-cells = <0>;
70		};
71
72		pm8994_vadc: adc@3100 {
73			compatible = "qcom,spmi-vadc";
74			reg = <0x3100>;
75			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
76			#address-cells = <1>;
77			#size-cells = <0>;
78			#io-channel-cells = <1>;
79
80			adc-chan@7 {
81				reg = <VADC_VSYS>;
82				qcom,pre-scaling = <1 3>;
83				label = "vph_pwr";
84			};
85			adc-chan@8 {
86				reg = <VADC_DIE_TEMP>;
87				label = "die_temp";
88			};
89			adc-chan@9 {
90				reg = <VADC_REF_625MV>;
91				label = "ref_625mv";
92			};
93			adc-chan@a {
94				reg = <VADC_REF_1250MV>;
95				label = "ref_1250mv";
96			};
97			adc-chan@e {
98				reg = <VADC_GND_REF>;
99			};
100			adc-chan@f {
101				reg = <VADC_VDD_VADC>;
102			};
103		};
104
105		pm8994_gpios: gpios@c000 {
106			compatible = "qcom,pm8994-gpio", "qcom,spmi-gpio";
107			reg = <0xc000>;
108			gpio-controller;
109			gpio-ranges = <&pm8994_gpios 0 0 22>;
110			#gpio-cells = <2>;
111			interrupt-controller;
112			#interrupt-cells = <2>;
113		};
114
115		pm8994_mpps: mpps@a000 {
116			compatible = "qcom,pm8994-mpp";
117			reg = <0xa000>;
118			gpio-controller;
119			#gpio-cells = <2>;
120			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
121				     <0 0xa1 0 IRQ_TYPE_NONE>,
122				     <0 0xa2 0 IRQ_TYPE_NONE>,
123				     <0 0xa3 0 IRQ_TYPE_NONE>,
124				     <0 0xa4 0 IRQ_TYPE_NONE>,
125				     <0 0xa5 0 IRQ_TYPE_NONE>,
126				     <0 0xa6 0 IRQ_TYPE_NONE>,
127				     <0 0xa7 0 IRQ_TYPE_NONE>;
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_spmi_regulators: regulators {
138			compatible = "qcom,pm8994-regulators";
139		};
140	};
141};
142