1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
4 */
5
6#include <dt-bindings/interrupt-controller/irq.h>
7#include <dt-bindings/spmi/spmi.h>
8
9/ {
10	thermal-zones {
11		pmd8028-thermal {
12			polling-delay-passive = <100>;
13			thermal-sensors = <&pmd8028_temp_alarm>;
14
15			trips {
16				pmd8028_trip0: trip0 {
17					temperature = <95000>;
18					hysteresis = <0>;
19					type = "passive";
20				};
21
22				pmd8028_trip1: trip1 {
23					temperature = <115000>;
24					hysteresis = <0>;
25					type = "hot";
26				};
27
28				pmd8028_trip2: trip2 {
29					temperature = <145000>;
30					hysteresis = <0>;
31					type = "critical";
32				};
33			};
34		};
35	};
36};
37
38&spmi_bus {
39	pmd8028: pmic@4 {
40		compatible = "qcom,pmd8028", "qcom,spmi-pmic";
41		reg = <0x4 SPMI_USID>;
42		#address-cells = <1>;
43		#size-cells = <0>;
44
45		pmd8028_temp_alarm: temp-alarm@a00 {
46			compatible = "qcom,spmi-temp-alarm";
47			reg = <0xa00>;
48			interrupts = <0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
49			#thermal-sensor-cells = <0>;
50		};
51
52		pmd8028_gpios: gpio@8800 {
53			compatible = "qcom,pmd8028-gpio", "qcom,spmi-gpio";
54			reg = <0x8800>;
55			gpio-controller;
56			gpio-ranges = <&pmd8028_gpios 0 0 4>;
57			#gpio-cells = <2>;
58			interrupt-controller;
59			#interrupt-cells = <2>;
60		};
61	};
62};
63