Skip to content

Commit a48a40c

Browse files
aushasre123Raj Aryan
authored andcommitted
FROMLIST: arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au
Add ADC nodes for the four PMM8654au PMICs (pmm8654au_0 through pmm8654au_3) on the Lemans platform. Each ADC node exposes the following ADC channels: - DIE_TEMP: PMIC die temperature channel - VPH_PWR: Battery/supply voltage channel Also add the io-channels and io-channel-names properties under the temp-alarm nodes so that they can get temperature reading from the ADC die_temp channels. Signed-off-by: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com> Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
1 parent 27d0863 commit a48a40c

1 file changed

Lines changed: 102 additions & 0 deletions

File tree

arch/arm64/boot/dts/qcom/lemans-pmics.dtsi

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <dt-bindings/input/input.h>
77
#include <dt-bindings/spmi/spmi.h>
8+
#include "qcom-adc5-gen3.h"
89

910
/ {
1011
thermal-zones {
@@ -110,6 +111,8 @@
110111
reg = <0xa00>;
111112
interrupts-extended = <&spmi_bus 0x0 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
112113
#thermal-sensor-cells = <0>;
114+
io-channels = <&pmm8654au_0_adc ADC5_GEN3_DIE_TEMP(0)>;
115+
io-channel-names = "thermal";
113116
};
114117

115118
pmm8654au_0_pon: pon@1200 {
@@ -132,6 +135,36 @@
132135
};
133136
};
134137

138+
pmm8654au_0_rtc: rtc@6100 {
139+
compatible = "qcom,pmk8350-rtc";
140+
reg = <0x6100>,
141+
<0x6200>;
142+
reg-names = "rtc",
143+
"alarm";
144+
interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
145+
};
146+
147+
pmm8654au_0_adc: adc@8000 {
148+
compatible = "qcom,spmi-adc5-gen3";
149+
reg = <0x8000>;
150+
#address-cells = <1>;
151+
#size-cells = <0>;
152+
interrupts = <0x0 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
153+
#io-channel-cells = <1>;
154+
155+
channel@3 {
156+
reg = <ADC5_GEN3_DIE_TEMP(0)>;
157+
label = "pmm8654au_0_die_temp";
158+
qcom,pre-scaling = <1 1>;
159+
};
160+
161+
channel@8e {
162+
reg = <ADC5_GEN3_VPH_PWR(0)>;
163+
label = "pmm8654au_0_vph_pwr";
164+
qcom,pre-scaling = <1 3>;
165+
};
166+
};
167+
135168
pmm8654au_0_gpios: gpio@8800 {
136169
compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
137170
reg = <0x8800>;
@@ -167,6 +200,29 @@
167200
reg = <0xa00>;
168201
interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
169202
#thermal-sensor-cells = <0>;
203+
io-channels = <&pmm8654au_1_adc ADC5_GEN3_DIE_TEMP(2)>;
204+
io-channel-names = "thermal";
205+
};
206+
207+
pmm8654au_1_adc: adc@8000 {
208+
compatible = "qcom,spmi-adc5-gen3";
209+
reg = <0x8000>;
210+
#address-cells = <1>;
211+
#size-cells = <0>;
212+
interrupts = <0x2 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
213+
#io-channel-cells = <1>;
214+
215+
channel@203 {
216+
reg = <ADC5_GEN3_DIE_TEMP(2)>;
217+
label = "pmm8654au_1_die_temp";
218+
qcom,pre-scaling = <1 1>;
219+
};
220+
221+
channel@28e {
222+
reg = <ADC5_GEN3_VPH_PWR(2)>;
223+
label = "pmm8654au_1_vph_pwr";
224+
qcom,pre-scaling = <1 3>;
225+
};
170226
};
171227

172228
pmm8654au_1_gpios: gpio@8800 {
@@ -191,6 +247,29 @@
191247
reg = <0xa00>;
192248
interrupts-extended = <&spmi_bus 0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
193249
#thermal-sensor-cells = <0>;
250+
io-channels = <&pmm8654au_2_adc ADC5_GEN3_DIE_TEMP(4)>;
251+
io-channel-names = "thermal";
252+
};
253+
254+
pmm8654au_2_adc: adc@8000 {
255+
compatible = "qcom,spmi-adc5-gen3";
256+
reg = <0x8000>;
257+
#address-cells = <1>;
258+
#size-cells = <0>;
259+
interrupts = <0x4 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
260+
#io-channel-cells = <1>;
261+
262+
channel@403 {
263+
reg = <ADC5_GEN3_DIE_TEMP(4)>;
264+
label = "pmm8654au_2_die_temp";
265+
qcom,pre-scaling = <1 1>;
266+
};
267+
268+
channel@48e {
269+
reg = <ADC5_GEN3_VPH_PWR(4)>;
270+
label = "pmm8654au_2_vph_pwr";
271+
qcom,pre-scaling = <1 3>;
272+
};
194273
};
195274

196275
pmm8654au_2_gpios: gpio@8800 {
@@ -215,6 +294,29 @@
215294
reg = <0xa00>;
216295
interrupts-extended = <&spmi_bus 0x6 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
217296
#thermal-sensor-cells = <0>;
297+
io-channels = <&pmm8654au_3_adc ADC5_GEN3_DIE_TEMP(6)>;
298+
io-channel-names = "thermal";
299+
};
300+
301+
pmm8654au_3_adc: adc@8000 {
302+
compatible = "qcom,spmi-adc5-gen3";
303+
reg = <0x8000>;
304+
#address-cells = <1>;
305+
#size-cells = <0>;
306+
interrupts = <0x6 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
307+
#io-channel-cells = <1>;
308+
309+
channel@603 {
310+
reg = <ADC5_GEN3_DIE_TEMP(6)>;
311+
label = "pmm8654au_3_die_temp";
312+
qcom,pre-scaling = <1 1>;
313+
};
314+
315+
channel@68e {
316+
reg = <ADC5_GEN3_VPH_PWR(6)>;
317+
label = "pmm8654au_3_vph_pwr";
318+
qcom,pre-scaling = <1 3>;
319+
};
218320
};
219321

220322
pmm8654au_3_gpios: gpio@8800 {

0 commit comments

Comments
 (0)