1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, Linaro Limited
4 */
5
6#include <dt-bindings/input/input.h>
7#include <dt-bindings/interrupt-controller/irq.h>
8#include <dt-bindings/spmi/spmi.h>
9
10/ {
11	thermal-zones {
12		pmm8155au-2-thermal {
13			polling-delay-passive = <100>;
14			polling-delay = <0>;
15
16			thermal-sensors = <&pmm8155au_2_temp>;
17
18			trips {
19				trip0 {
20					temperature = <95000>;
21					hysteresis = <0>;
22					type = "passive";
23				};
24
25				trip1 {
26					temperature = <115000>;
27					hysteresis = <0>;
28					type = "hot";
29				};
30
31				trip2 {
32					temperature = <145000>;
33					hysteresis = <0>;
34					type = "critical";
35				};
36			};
37		};
38	};
39};
40
41&spmi_bus {
42	pmic@4 {
43		compatible = "qcom,pmm8155au", "qcom,spmi-pmic";
44		reg = <0x4 SPMI_USID>;
45		#address-cells = <1>;
46		#size-cells = <0>;
47
48		power-on@800 {
49			compatible = "qcom,pm8916-pon";
50			reg = <0x0800>;
51
52			status = "disabled";
53		};
54
55		pmm8155au_2_temp: temp-alarm@2400 {
56			compatible = "qcom,spmi-temp-alarm";
57			reg = <0x2400>;
58			interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
59			io-channels = <&pmm8155au_2_adc ADC5_DIE_TEMP>;
60			io-channel-names = "thermal";
61			#thermal-sensor-cells = <0>;
62		};
63
64		pmm8155au_2_adc: adc@3100 {
65			compatible = "qcom,spmi-adc5";
66			reg = <0x3100>;
67			#address-cells = <1>;
68			#size-cells = <0>;
69			#io-channel-cells = <1>;
70			interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
71
72			ref-gnd@0 {
73				reg = <ADC5_REF_GND>;
74				qcom,pre-scaling = <1 1>;
75				label = "ref_gnd";
76			};
77
78			vref-1p25@1 {
79				reg = <ADC5_1P25VREF>;
80				qcom,pre-scaling = <1 1>;
81				label = "vref_1p25";
82			};
83
84			die-temp@6 {
85				reg = <ADC5_DIE_TEMP>;
86				qcom,pre-scaling = <1 1>;
87				label = "die_temp";
88			};
89		};
90
91		pmm8155au_2_gpios: gpio@c000 {
92			compatible = "qcom,pmm8155au-gpio";
93			reg = <0xc000>;
94			gpio-controller;
95			#gpio-cells = <2>;
96			gpio-ranges = <&pmm8155au_2_gpios 0 0 10>;
97			interrupt-controller;
98			#interrupt-cells = <2>;
99		};
100	};
101
102	pmic@5 {
103		compatible = "qcom,pmm8155au", "qcom,spmi-pmic";
104		reg = <0x5 SPMI_USID>;
105		#address-cells = <1>;
106		#size-cells = <0>;
107	};
108};
109