Skip to content

Commit 6bf2dcd

Browse files
aushasre123jprakash-qc
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. Link: https://lore.kernel.org/all/20260430-adc5_gen3_dt-v1-2-ab2bb40fd490@oss.qualcomm.com/ Signed-off-by: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com> Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
1 parent 5faa357 commit 6bf2dcd

1 file changed

Lines changed: 93 additions & 0 deletions

File tree

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

Lines changed: 93 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 {
@@ -141,6 +144,27 @@
141144
interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
142145
};
143146

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+
144168
pmm8654au_0_gpios: gpio@8800 {
145169
compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
146170
reg = <0x8800>;
@@ -176,6 +200,29 @@
176200
reg = <0xa00>;
177201
interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
178202
#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+
};
179226
};
180227

181228
pmm8654au_1_gpios: gpio@8800 {
@@ -200,6 +247,29 @@
200247
reg = <0xa00>;
201248
interrupts-extended = <&spmi_bus 0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
202249
#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+
};
203273
};
204274

205275
pmm8654au_2_gpios: gpio@8800 {
@@ -224,6 +294,29 @@
224294
reg = <0xa00>;
225295
interrupts-extended = <&spmi_bus 0x6 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
226296
#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+
};
227320
};
228321

229322
pmm8654au_3_gpios: gpio@8800 {

0 commit comments

Comments
 (0)