blob: 8c899d148e461c4737c70f5d53f8568545b8b435 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (C) 2023 Luca Weiss <luca@z3ntu.xyz>
4 */
5
6#include <dt-bindings/iio/qcom,spmi-vadc.h>
7#include <dt-bindings/interrupt-controller/irq.h>
8#include <dt-bindings/spmi/spmi.h>
9
10/ {
11 thermal-zones {
12 pmi632-thermal {
13 polling-delay-passive = <100>;
Tom Rini53633a82024-02-29 12:33:36 -050014
15 thermal-sensors = <&pmi632_temp>;
16
17 trips {
18 trip0 {
19 temperature = <95000>;
20 hysteresis = <0>;
21 type = "passive";
22 };
23
24 trip1 {
25 temperature = <115000>;
26 hysteresis = <0>;
27 type = "hot";
28 };
29
30 trip2 {
31 temperature = <125000>;
32 hysteresis = <0>;
33 type = "critical";
34 };
35 };
36 };
37 };
38};
39
40&spmi_bus {
41 pmic@2 {
42 compatible = "qcom,pmi632", "qcom,spmi-pmic";
43 reg = <0x2 SPMI_USID>;
44 #address-cells = <1>;
45 #size-cells = <0>;
46
Tom Rini6bb92fc2024-05-20 09:54:58 -060047 pmi632_vbus: usb-vbus-regulator@1100 {
48 compatible = "qcom,pmi632-vbus-reg", "qcom,pm8150b-vbus-reg";
49 reg = <0x1100>;
50 status = "disabled";
51 };
52
53 pmi632_typec: typec@1500 {
54 compatible = "qcom,pmi632-typec";
55 reg = <0x1500>;
56 interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
57 <0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
58 <0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
59 <0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
60 <0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
61 <0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
62 <0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
63 <0x2 0x15 0x07 IRQ_TYPE_EDGE_RISING>;
64 interrupt-names = "or-rid-detect-change",
65 "vpd-detect",
66 "cc-state-change",
67 "vconn-oc",
68 "vbus-change",
69 "attach-detach",
70 "legacy-cable-detect",
71 "try-snk-src-detect";
72 vdd-vbus-supply = <&pmi632_vbus>;
73
74 status = "disabled";
75 };
76
Tom Rini53633a82024-02-29 12:33:36 -050077 pmi632_temp: temp-alarm@2400 {
78 compatible = "qcom,spmi-temp-alarm";
79 reg = <0x2400>;
80 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
81 #thermal-sensor-cells = <0>;
82 };
83
84 pmi632_adc: adc@3100 {
85 compatible = "qcom,spmi-adc5";
86 reg = <0x3100>;
87 #address-cells = <1>;
88 #size-cells = <0>;
89 #io-channel-cells = <1>;
90 interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
91
92 channel@0 {
93 reg = <ADC5_REF_GND>;
94 qcom,pre-scaling = <1 1>;
95 label = "ref_gnd";
96 };
97
98 channel@1 {
99 reg = <ADC5_1P25VREF>;
100 qcom,pre-scaling = <1 1>;
101 label = "vref_1p25";
102 };
103
104 channel@6 {
105 reg = <ADC5_DIE_TEMP>;
106 qcom,pre-scaling = <1 1>;
107 label = "die_temp";
108 };
109
110 channel@7 {
111 reg = <ADC5_USB_IN_I>;
112 qcom,pre-scaling = <1 1>;
113 label = "usb_in_i_uv";
114 };
115
116 channel@8 {
117 reg = <ADC5_USB_IN_V_16>;
118 qcom,pre-scaling = <1 16>;
119 label = "usb_in_v_div_16";
120 };
121
122 channel@9 {
123 reg = <ADC5_CHG_TEMP>;
124 qcom,pre-scaling = <1 1>;
125 label = "chg_temp";
126 };
127
128 channel@4b {
129 reg = <ADC5_BAT_ID_100K_PU>;
130 qcom,hw-settle-time = <200>;
131 qcom,pre-scaling = <1 1>;
132 qcom,ratiometric;
133 label = "bat_id";
134 };
135
136 channel@83 {
137 reg = <ADC5_VPH_PWR>;
138 qcom,pre-scaling = <1 3>;
139 label = "vph_pwr";
140 };
141
142 channel@84 {
143 reg = <ADC5_VBAT_SNS>;
144 qcom,pre-scaling = <1 3>;
145 label = "vbat_sns";
146 };
147 };
148
149 pmi632_adc_tm: adc-tm@3500 {
150 compatible = "qcom,spmi-adc-tm5";
151 reg = <0x3500>;
152 interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
153 #thermal-sensor-cells = <1>;
154 #address-cells = <1>;
155 #size-cells = <0>;
156 status = "disabled";
157 };
158
Tom Rini6bb92fc2024-05-20 09:54:58 -0600159 pmi632_pbs_client3: pbs@7400 {
160 compatible = "qcom,pmi632-pbs", "qcom,pbs";
161 reg = <0x7400>;
162 };
163
Tom Rini53633a82024-02-29 12:33:36 -0500164 pmi632_sdam_7: nvram@b600 {
165 compatible = "qcom,spmi-sdam";
166 reg = <0xb600>;
167 #address-cells = <1>;
168 #size-cells = <1>;
169 ranges = <0 0xb600 0x100>;
170 };
171
172 pmi632_gpios: gpio@c000 {
173 compatible = "qcom,pmi632-gpio", "qcom,spmi-gpio";
174 reg = <0xc000>;
175 gpio-controller;
176 gpio-ranges = <&pmi632_gpios 0 0 8>;
177 #gpio-cells = <2>;
178 interrupt-controller;
179 #interrupt-cells = <2>;
180 };
181 };
182
183 pmic@3 {
184 compatible = "qcom,pmi632", "qcom,spmi-pmic";
185 reg = <0x3 SPMI_USID>;
186 #address-cells = <1>;
187 #size-cells = <0>;
188
189 pmi632_lpg: pwm {
190 compatible = "qcom,pmi632-lpg";
191
Tom Rini6bb92fc2024-05-20 09:54:58 -0600192 nvmem = <&pmi632_sdam_7>;
193 nvmem-names = "lpg_chan_sdam";
194 qcom,pbs = <&pmi632_pbs_client3>;
195
Tom Rini53633a82024-02-29 12:33:36 -0500196 #address-cells = <1>;
197 #size-cells = <0>;
198 #pwm-cells = <2>;
199
200 status = "disabled";
201 };
Tom Rini6b642ac2024-10-01 12:20:28 -0600202
203 pmi632_vib: vibrator@5700 {
204 compatible = "qcom,pmi632-vib";
205 reg = <0x5700>;
206 status = "disabled";
207 };
Tom Rini53633a82024-02-29 12:33:36 -0500208 };
209};