1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2023, Linaro Limited
4 */
5
6#include <dt-bindings/input/input.h>
7#include <dt-bindings/spmi/spmi.h>
8
9/ {
10	thermal-zones {
11		pmm8654au_0_thermal: pm8775-0-thermal {
12			polling-delay-passive = <100>;
13			polling-delay = <0>;
14			thermal-sensors = <&pmm8654au_0_temp_alarm>;
15
16			trips {
17				trip0 {
18					temperature = <105000>;
19					hysteresis = <0>;
20					type = "passive";
21				};
22
23				trip1 {
24					temperature = <125000>;
25					hysteresis = <0>;
26					type = "critical";
27				};
28			};
29		};
30
31		pmm8654au_1_thermal: pm8775-1-thermal {
32			polling-delay-passive = <100>;
33			polling-delay = <0>;
34			thermal-sensors = <&pmm8654au_1_temp_alarm>;
35
36			trips {
37				trip0 {
38					temperature = <105000>;
39					hysteresis = <0>;
40					type = "passive";
41				};
42
43				trip1 {
44					temperature = <125000>;
45					hysteresis = <0>;
46					type = "critical";
47				};
48			};
49		};
50
51		pmm8654au_2_thermal: pm8775-2-thermal {
52			polling-delay-passive = <100>;
53			polling-delay = <0>;
54			thermal-sensors = <&pmm8654au_2_temp_alarm>;
55
56			trips {
57				trip0 {
58					temperature = <105000>;
59					hysteresis = <0>;
60					type = "passive";
61				};
62
63				trip1 {
64					temperature = <125000>;
65					hysteresis = <0>;
66					type = "critical";
67				};
68			};
69		};
70
71		pmm8654au_3_thermal: pm8775-3-thermal {
72			polling-delay-passive = <100>;
73			polling-delay = <0>;
74			thermal-sensors = <&pmm8654au_3_temp_alarm>;
75
76			trips {
77				trip0 {
78					temperature = <105000>;
79					hysteresis = <0>;
80					type = "passive";
81				};
82
83				trip1 {
84					temperature = <125000>;
85					hysteresis = <0>;
86					type = "critical";
87				};
88			};
89		};
90	};
91};
92
93&spmi_bus {
94	pmm8654au_0: pmic@0 {
95		compatible = "qcom,pmm8654au", "qcom,spmi-pmic";
96		reg = <0x0 SPMI_USID>;
97		#address-cells = <1>;
98		#size-cells = <0>;
99
100		pmm8654au_0_temp_alarm: temp-alarm@a00 {
101			compatible = "qcom,spmi-temp-alarm";
102			reg = <0xa00>;
103			interrupts-extended = <&spmi_bus 0x0 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
104			#thermal-sensor-cells = <0>;
105		};
106
107		pmm8654au_0_pon: pon@1200 {
108			compatible = "qcom,pmk8350-pon";
109			reg = <0x1200>, <0x800>;
110			reg-names = "hlos", "pbs";
111			mode-recovery = <0x1>;
112			mode-bootloader = <0x2>;
113
114			pmm8654au_0_pon_pwrkey: pwrkey {
115				compatible = "qcom,pmk8350-pwrkey";
116				interrupts-extended = <&spmi_bus 0x0 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
117				linux,code = <KEY_POWER>;
118				debounce = <15625>;
119			};
120
121			pmm8654au_0_pon_resin: resin {
122				compatible = "qcom,pmk8350-resin";
123				interrupts-extended = <&spmi_bus 0x0 0x12 0x6 IRQ_TYPE_EDGE_BOTH>;
124				debounce = <15625>;
125				status = "disabled";
126			};
127		};
128
129		pmm8654au_0_gpios: gpio@8800 {
130			compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
131			reg = <0x8800>;
132			gpio-controller;
133			gpio-ranges = <&pmm8654au_0_gpios 0 0 12>;
134			#gpio-cells = <2>;
135			interrupt-controller;
136			#interrupt-cells = <2>;
137		};
138	};
139
140	pmm8654au_1: pmic@2 {
141		compatible = "qcom,pmm8654au", "qcom,spmi-pmic";
142		reg = <0x2 SPMI_USID>;
143		#address-cells = <1>;
144		#size-cells = <0>;
145
146		pmm8654au_1_temp_alarm: temp-alarm@a00 {
147			compatible = "qcom,spmi-temp-alarm";
148			reg = <0xa00>;
149			interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
150			#thermal-sensor-cells = <0>;
151		};
152
153		pmm8654au_1_gpios: gpio@8800 {
154			compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
155			reg = <0x8800>;
156			gpio-controller;
157			gpio-ranges = <&pmm8654au_2_gpios 0 0 12>;
158			#gpio-cells = <2>;
159			interrupt-controller;
160			#interrupt-cells = <2>;
161		};
162	};
163
164	pmm8654au_2: pmic@4 {
165		compatible = "qcom,pmm8654au", "qcom,spmi-pmic";
166		reg = <0x4 SPMI_USID>;
167		#address-cells = <1>;
168		#size-cells = <0>;
169
170		pmm8654au_2_temp_alarm: temp-alarm@a00 {
171			compatible = "qcom,spmi-temp-alarm";
172			reg = <0xa00>;
173			interrupts-extended = <&spmi_bus 0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
174			#thermal-sensor-cells = <0>;
175		};
176
177		pmm8654au_2_gpios: gpio@8800 {
178			compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
179			reg = <0x8800>;
180			gpio-controller;
181			gpio-ranges = <&pmm8654au_2_gpios 0 0 12>;
182			#gpio-cells = <2>;
183			interrupt-controller;
184			#interrupt-cells = <2>;
185		};
186	};
187
188	pmm8654au_3: pmic@6 {
189		compatible = "qcom,pmm8654au", "qcom,spmi-pmic";
190		reg = <0x6 SPMI_USID>;
191		#address-cells = <1>;
192		#size-cells = <0>;
193
194		pmm8654au_3_temp_alarm: temp-alarm@a00 {
195			compatible = "qcom,spmi-temp-alarm";
196			reg = <0xa00>;
197			interrupts-extended = <&spmi_bus 0x6 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
198			#thermal-sensor-cells = <0>;
199		};
200
201		pmm8654au_3_gpios: gpio@8800 {
202			compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
203			reg = <0x8800>;
204			gpio-controller;
205			gpio-ranges = <&pmm8654au_3_gpios 0 0 12>;
206			#gpio-cells = <2>;
207			interrupt-controller;
208			#interrupt-cells = <2>;
209		};
210	};
211};
212