* [PATCH 1/3] arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros
2026-04-30 8:58 [PATCH 0/3] Add ADC support for lemans and monaco Jishnu Prakash
@ 2026-04-30 8:58 ` Jishnu Prakash
2026-06-15 15:55 ` Konrad Dybcio
2026-04-30 8:58 ` [PATCH 2/3] arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au Jishnu Prakash
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Jishnu Prakash @ 2026-04-30 8:58 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa, Jishnu Prakash
Add macro definitions for virtual channels (combination of ADC channel
number and PMIC SID number), to be used in devicetree by clients of ADC5
GEN3 device and in the "reg" property of ADC channels.
Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/qcom-adc5-gen3.h | 88 +++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcom-adc5-gen3.h b/arch/arm64/boot/dts/qcom/qcom-adc5-gen3.h
new file mode 100644
index 000000000000..aa8e54d7e786
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/qcom-adc5-gen3.h
@@ -0,0 +1,88 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#ifndef __DTS_ARM64_QCOM_ADC5_GEN3_H__
+#define __DTS_ARM64_QCOM_ADC5_GEN3_H__
+
+/* ADC channels for PMIC5 Gen3 */
+
+#define VIRT_CHAN(sid, chan) ((sid) << 8 | (chan))
+
+#define ADC5_GEN3_REF_GND(sid) VIRT_CHAN(sid, 0x00)
+#define ADC5_GEN3_1P25VREF(sid) VIRT_CHAN(sid, 0x01)
+#define ADC5_GEN3_VREF_VADC(sid) VIRT_CHAN(sid, 0x02)
+#define ADC5_GEN3_DIE_TEMP(sid) VIRT_CHAN(sid, 0x03)
+
+#define ADC5_GEN3_AMUX1_THM(sid) VIRT_CHAN(sid, 0x04)
+#define ADC5_GEN3_AMUX2_THM(sid) VIRT_CHAN(sid, 0x05)
+#define ADC5_GEN3_AMUX3_THM(sid) VIRT_CHAN(sid, 0x06)
+#define ADC5_GEN3_AMUX4_THM(sid) VIRT_CHAN(sid, 0x07)
+#define ADC5_GEN3_AMUX5_THM(sid) VIRT_CHAN(sid, 0x08)
+#define ADC5_GEN3_AMUX6_THM(sid) VIRT_CHAN(sid, 0x09)
+#define ADC5_GEN3_AMUX1_GPIO(sid) VIRT_CHAN(sid, 0x0a)
+#define ADC5_GEN3_AMUX2_GPIO(sid) VIRT_CHAN(sid, 0x0b)
+#define ADC5_GEN3_AMUX3_GPIO(sid) VIRT_CHAN(sid, 0x0c)
+#define ADC5_GEN3_AMUX4_GPIO(sid) VIRT_CHAN(sid, 0x0d)
+
+#define ADC5_GEN3_CHG_TEMP(sid) VIRT_CHAN(sid, 0x10)
+#define ADC5_GEN3_USB_SNS_V_16(sid) VIRT_CHAN(sid, 0x11)
+#define ADC5_GEN3_VIN_DIV16_MUX(sid) VIRT_CHAN(sid, 0x12)
+#define ADC5_GEN3_VREF_BAT_THERM(sid) VIRT_CHAN(sid, 0x15)
+#define ADC5_GEN3_IIN_FB(sid) VIRT_CHAN(sid, 0x17)
+#define ADC5_GEN3_TEMP_ALARM_LITE(sid) VIRT_CHAN(sid, 0x18)
+#define ADC5_GEN3_IIN_SMB(sid) VIRT_CHAN(sid, 0x19)
+#define ADC5_GEN3_ICHG_SMB(sid) VIRT_CHAN(sid, 0x1b)
+#define ADC5_GEN3_ICHG_FB(sid) VIRT_CHAN(sid, 0xa1)
+
+/* 30k pull-up */
+#define ADC5_GEN3_AMUX1_THM_30K_PU(sid) VIRT_CHAN(sid, 0x24)
+#define ADC5_GEN3_AMUX2_THM_30K_PU(sid) VIRT_CHAN(sid, 0x25)
+#define ADC5_GEN3_AMUX3_THM_30K_PU(sid) VIRT_CHAN(sid, 0x26)
+#define ADC5_GEN3_AMUX4_THM_30K_PU(sid) VIRT_CHAN(sid, 0x27)
+#define ADC5_GEN3_AMUX5_THM_30K_PU(sid) VIRT_CHAN(sid, 0x28)
+#define ADC5_GEN3_AMUX6_THM_30K_PU(sid) VIRT_CHAN(sid, 0x29)
+#define ADC5_GEN3_AMUX1_GPIO_30K_PU(sid) VIRT_CHAN(sid, 0x2a)
+#define ADC5_GEN3_AMUX2_GPIO_30K_PU(sid) VIRT_CHAN(sid, 0x2b)
+#define ADC5_GEN3_AMUX3_GPIO_30K_PU(sid) VIRT_CHAN(sid, 0x2c)
+#define ADC5_GEN3_AMUX4_GPIO_30K_PU(sid) VIRT_CHAN(sid, 0x2d)
+
+/* 100k pull-up */
+#define ADC5_GEN3_AMUX1_THM_100K_PU(sid) VIRT_CHAN(sid, 0x44)
+#define ADC5_GEN3_AMUX2_THM_100K_PU(sid) VIRT_CHAN(sid, 0x45)
+#define ADC5_GEN3_AMUX3_THM_100K_PU(sid) VIRT_CHAN(sid, 0x46)
+#define ADC5_GEN3_AMUX4_THM_100K_PU(sid) VIRT_CHAN(sid, 0x47)
+#define ADC5_GEN3_AMUX5_THM_100K_PU(sid) VIRT_CHAN(sid, 0x48)
+#define ADC5_GEN3_AMUX6_THM_100K_PU(sid) VIRT_CHAN(sid, 0x49)
+#define ADC5_GEN3_AMUX1_GPIO_100K_PU(sid) VIRT_CHAN(sid, 0x4a)
+#define ADC5_GEN3_AMUX2_GPIO_100K_PU(sid) VIRT_CHAN(sid, 0x4b)
+#define ADC5_GEN3_AMUX3_GPIO_100K_PU(sid) VIRT_CHAN(sid, 0x4c)
+#define ADC5_GEN3_AMUX4_GPIO_100K_PU(sid) VIRT_CHAN(sid, 0x4d)
+
+/* 400k pull-up */
+#define ADC5_GEN3_AMUX1_THM_400K_PU(sid) VIRT_CHAN(sid, 0x64)
+#define ADC5_GEN3_AMUX2_THM_400K_PU(sid) VIRT_CHAN(sid, 0x65)
+#define ADC5_GEN3_AMUX3_THM_400K_PU(sid) VIRT_CHAN(sid, 0x66)
+#define ADC5_GEN3_AMUX4_THM_400K_PU(sid) VIRT_CHAN(sid, 0x67)
+#define ADC5_GEN3_AMUX5_THM_400K_PU(sid) VIRT_CHAN(sid, 0x68)
+#define ADC5_GEN3_AMUX6_THM_400K_PU(sid) VIRT_CHAN(sid, 0x69)
+#define ADC5_GEN3_AMUX1_GPIO_400K_PU(sid) VIRT_CHAN(sid, 0x6a)
+#define ADC5_GEN3_AMUX2_GPIO_400K_PU(sid) VIRT_CHAN(sid, 0x6b)
+#define ADC5_GEN3_AMUX3_GPIO_400K_PU(sid) VIRT_CHAN(sid, 0x6c)
+#define ADC5_GEN3_AMUX4_GPIO_400K_PU(sid) VIRT_CHAN(sid, 0x6d)
+
+/* 1/3 Divider */
+#define ADC5_GEN3_AMUX1_GPIO_DIV3(sid) VIRT_CHAN(sid, 0x8a)
+#define ADC5_GEN3_AMUX2_GPIO_DIV3(sid) VIRT_CHAN(sid, 0x8b)
+#define ADC5_GEN3_AMUX3_GPIO_DIV3(sid) VIRT_CHAN(sid, 0x8c)
+#define ADC5_GEN3_AMUX4_GPIO_DIV3(sid) VIRT_CHAN(sid, 0x8d)
+
+#define ADC5_GEN3_VPH_PWR(sid) VIRT_CHAN(sid, 0x8e)
+#define ADC5_GEN3_VBAT_SNS_QBG(sid) VIRT_CHAN(sid, 0x8f)
+
+#define ADC5_GEN3_VBAT_SNS_CHGR(sid) VIRT_CHAN(sid, 0x94)
+#define ADC5_GEN3_VBAT_2S_MID_QBG(sid) VIRT_CHAN(sid, 0x96)
+#define ADC5_GEN3_VBAT_2S_MID_CHGR(sid) VIRT_CHAN(sid, 0x9d)
+
+#endif /* __DTS_ARM64_QCOM_ADC5_GEN3_H__ */
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 1/3] arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros
2026-04-30 8:58 ` [PATCH 1/3] arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros Jishnu Prakash
@ 2026-06-15 15:55 ` Konrad Dybcio
2026-06-15 16:39 ` Neil Armstrong
0 siblings, 1 reply; 12+ messages in thread
From: Konrad Dybcio @ 2026-06-15 15:55 UTC (permalink / raw)
To: Jishnu Prakash, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa
On 4/30/26 10:58 AM, Jishnu Prakash wrote:
> Add macro definitions for virtual channels (combination of ADC channel
> number and PMIC SID number), to be used in devicetree by clients of ADC5
> GEN3 device and in the "reg" property of ADC channels.
>
> Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros
2026-06-15 15:55 ` Konrad Dybcio
@ 2026-06-15 16:39 ` Neil Armstrong
2026-06-15 16:48 ` Konrad Dybcio
0 siblings, 1 reply; 12+ messages in thread
From: Neil Armstrong @ 2026-06-15 16:39 UTC (permalink / raw)
To: Konrad Dybcio, Jishnu Prakash, Bjorn Andersson, Konrad Dybcio,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa
Hi,
On 6/15/26 17:55, Konrad Dybcio wrote:
> On 4/30/26 10:58 AM, Jishnu Prakash wrote:
>> Add macro definitions for virtual channels (combination of ADC channel
>> number and PMIC SID number), to be used in devicetree by clients of ADC5
>> GEN3 device and in the "reg" property of ADC channels.
>>
>> Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
>> ---
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
And what happens with my patch [1] ?
I had zero feedback so far
[1] https://lore.kernel.org/all/20260504-topic-sm8x50-adc5-gen3-v2-1-5cc04d6ecda0@linaro.org/
>
> Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros
2026-06-15 16:39 ` Neil Armstrong
@ 2026-06-15 16:48 ` Konrad Dybcio
2026-06-17 10:12 ` Neil Armstrong
0 siblings, 1 reply; 12+ messages in thread
From: Konrad Dybcio @ 2026-06-15 16:48 UTC (permalink / raw)
To: Neil Armstrong, Jishnu Prakash, Bjorn Andersson, Konrad Dybcio,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa
On 6/15/26 6:39 PM, Neil Armstrong wrote:
> Hi,
>
> On 6/15/26 17:55, Konrad Dybcio wrote:
>> On 4/30/26 10:58 AM, Jishnu Prakash wrote:
>>> Add macro definitions for virtual channels (combination of ADC channel
>>> number and PMIC SID number), to be used in devicetree by clients of ADC5
>>> GEN3 device and in the "reg" property of ADC channels.
>>>
>>> Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
>>> ---
>>
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> And what happens with my patch [1] ?
>
> I had zero feedback so far
>
> [1] https://lore.kernel.org/all/20260504-topic-sm8x50-adc5-gen3-v2-1-5cc04d6ecda0@linaro.org/
I think this approach (single generic header) is better. The existing
ADC7 bindings which your series draws inspiration from come with a ton
of boilerplate.
There are some non-trivial mappings in there though, e.g.:
+#define PM8550B_ADC5_GEN3_AMUX4_GPIO12_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX4_GPIO_100K_PU)
but these would presumably be deducible from downstream
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros
2026-06-15 16:48 ` Konrad Dybcio
@ 2026-06-17 10:12 ` Neil Armstrong
0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2026-06-17 10:12 UTC (permalink / raw)
To: Konrad Dybcio, Jishnu Prakash, Bjorn Andersson, Konrad Dybcio,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa
On 6/15/26 18:48, Konrad Dybcio wrote:
> On 6/15/26 6:39 PM, Neil Armstrong wrote:
>> Hi,
>>
>> On 6/15/26 17:55, Konrad Dybcio wrote:
>>> On 4/30/26 10:58 AM, Jishnu Prakash wrote:
>>>> Add macro definitions for virtual channels (combination of ADC channel
>>>> number and PMIC SID number), to be used in devicetree by clients of ADC5
>>>> GEN3 device and in the "reg" property of ADC channels.
>>>>
>>>> Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
>>>> ---
>>>
>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>
>> And what happens with my patch [1] ?
>>
>> I had zero feedback so far
>>
>> [1] https://lore.kernel.org/all/20260504-topic-sm8x50-adc5-gen3-v2-1-5cc04d6ecda0@linaro.org/
>
> I think this approach (single generic header) is better. The existing
> ADC7 bindings which your series draws inspiration from come with a ton
> of boilerplate.
>
> There are some non-trivial mappings in there though, e.g.:
>
> +#define PM8550B_ADC5_GEN3_AMUX4_GPIO12_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX4_GPIO_100K_PU)
>
> but these would presumably be deducible from downstream
I'll try to rebase on this patch, seems all the values are defined, I just need to match the old and new defines
Neil
>
> Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/3] arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au
2026-04-30 8:58 [PATCH 0/3] Add ADC support for lemans and monaco Jishnu Prakash
2026-04-30 8:58 ` [PATCH 1/3] arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros Jishnu Prakash
@ 2026-04-30 8:58 ` Jishnu Prakash
2026-06-15 15:56 ` Konrad Dybcio
2026-04-30 8:58 ` [PATCH 3/3] arm64: dts: qcom: monaco-pmics: Add ADC support for PMM8620AU Jishnu Prakash
2026-04-30 9:12 ` [PATCH 0/3] Add ADC support for lemans and monaco Neil Armstrong
3 siblings, 1 reply; 12+ messages in thread
From: Jishnu Prakash @ 2026-04-30 8:58 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa, Jishnu Prakash
From: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com>
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>
---
arch/arm64/boot/dts/qcom/lemans-pmics.dtsi | 93 ++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi b/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi
index 341119fc8244..6caec3e4df4b 100644
--- a/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi
@@ -5,6 +5,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/spmi/spmi.h>
+#include "qcom-adc5-gen3.h"
/ {
thermal-zones {
@@ -110,6 +111,8 @@ pmm8654au_0_temp_alarm: temp-alarm@a00 {
reg = <0xa00>;
interrupts-extended = <&spmi_bus 0x0 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
#thermal-sensor-cells = <0>;
+ io-channels = <&pmm8654au_0_adc ADC5_GEN3_DIE_TEMP(0)>;
+ io-channel-names = "thermal";
};
pmm8654au_0_pon: pon@1200 {
@@ -141,6 +144,27 @@ pmm8654au_0_rtc: rtc@6100 {
interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
};
+ pmm8654au_0_adc: adc@8000 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x0 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ #io-channel-cells = <1>;
+
+ channel@3 {
+ reg = <ADC5_GEN3_DIE_TEMP(0)>;
+ label = "pmm8654au_0_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@8e {
+ reg = <ADC5_GEN3_VPH_PWR(0)>;
+ label = "pmm8654au_0_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
+ };
+
pmm8654au_0_gpios: gpio@8800 {
compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
reg = <0x8800>;
@@ -176,6 +200,29 @@ pmm8654au_1_temp_alarm: temp-alarm@a00 {
reg = <0xa00>;
interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
#thermal-sensor-cells = <0>;
+ io-channels = <&pmm8654au_1_adc ADC5_GEN3_DIE_TEMP(2)>;
+ io-channel-names = "thermal";
+ };
+
+ pmm8654au_1_adc: adc@8000 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x2 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ #io-channel-cells = <1>;
+
+ channel@203 {
+ reg = <ADC5_GEN3_DIE_TEMP(2)>;
+ label = "pmm8654au_1_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@28e {
+ reg = <ADC5_GEN3_VPH_PWR(2)>;
+ label = "pmm8654au_1_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
};
pmm8654au_1_gpios: gpio@8800 {
@@ -200,6 +247,29 @@ pmm8654au_2_temp_alarm: temp-alarm@a00 {
reg = <0xa00>;
interrupts-extended = <&spmi_bus 0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
#thermal-sensor-cells = <0>;
+ io-channels = <&pmm8654au_2_adc ADC5_GEN3_DIE_TEMP(4)>;
+ io-channel-names = "thermal";
+ };
+
+ pmm8654au_2_adc: adc@8000 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x4 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ #io-channel-cells = <1>;
+
+ channel@403 {
+ reg = <ADC5_GEN3_DIE_TEMP(4)>;
+ label = "pmm8654au_2_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@48e {
+ reg = <ADC5_GEN3_VPH_PWR(4)>;
+ label = "pmm8654au_2_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
};
pmm8654au_2_gpios: gpio@8800 {
@@ -224,6 +294,29 @@ pmm8654au_3_temp_alarm: temp-alarm@a00 {
reg = <0xa00>;
interrupts-extended = <&spmi_bus 0x6 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
#thermal-sensor-cells = <0>;
+ io-channels = <&pmm8654au_3_adc ADC5_GEN3_DIE_TEMP(6)>;
+ io-channel-names = "thermal";
+ };
+
+ pmm8654au_3_adc: adc@8000 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x6 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ #io-channel-cells = <1>;
+
+ channel@603 {
+ reg = <ADC5_GEN3_DIE_TEMP(6)>;
+ label = "pmm8654au_3_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@68e {
+ reg = <ADC5_GEN3_VPH_PWR(6)>;
+ label = "pmm8654au_3_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
};
pmm8654au_3_gpios: gpio@8800 {
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 2/3] arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au
2026-04-30 8:58 ` [PATCH 2/3] arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au Jishnu Prakash
@ 2026-06-15 15:56 ` Konrad Dybcio
2026-06-18 10:21 ` Jishnu Prakash
0 siblings, 1 reply; 12+ messages in thread
From: Konrad Dybcio @ 2026-06-15 15:56 UTC (permalink / raw)
To: Jishnu Prakash, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa
On 4/30/26 10:58 AM, Jishnu Prakash wrote:
> From: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com>
>
> 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>
> ---
> arch/arm64/boot/dts/qcom/lemans-pmics.dtsi | 93 ++++++++++++++++++++++++++++++
> 1 file changed, 93 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi b/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi
> index 341119fc8244..6caec3e4df4b 100644
> --- a/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi
> @@ -5,6 +5,7 @@
>
> #include <dt-bindings/input/input.h>
> #include <dt-bindings/spmi/spmi.h>
> +#include "qcom-adc5-gen3.h"
>
> / {
> thermal-zones {
> @@ -110,6 +111,8 @@ pmm8654au_0_temp_alarm: temp-alarm@a00 {
> reg = <0xa00>;
> interrupts-extended = <&spmi_bus 0x0 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
> #thermal-sensor-cells = <0>;
> + io-channels = <&pmm8654au_0_adc ADC5_GEN3_DIE_TEMP(0)>;
> + io-channel-names = "thermal";
> };
>
> pmm8654au_0_pon: pon@1200 {
> @@ -141,6 +144,27 @@ pmm8654au_0_rtc: rtc@6100 {
> interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
> };
>
> + pmm8654au_0_adc: adc@8000 {
> + compatible = "qcom,spmi-adc5-gen3";
> + reg = <0x8000>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupts = <0x0 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
> + #io-channel-cells = <1>;
> +
> + channel@3 {
> + reg = <ADC5_GEN3_DIE_TEMP(0)>;
> + label = "pmm8654au_0_die_temp";
Are these labels namespaced, i.e. can the label be just "pm8654au_die_temp"
or "die_temp"?
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/3] arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au
2026-06-15 15:56 ` Konrad Dybcio
@ 2026-06-18 10:21 ` Jishnu Prakash
2026-06-30 11:57 ` Konrad Dybcio
0 siblings, 1 reply; 12+ messages in thread
From: Jishnu Prakash @ 2026-06-18 10:21 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa
Hi Konrad,
On 6/15/2026 9:26 PM, Konrad Dybcio wrote:
> On 4/30/26 10:58 AM, Jishnu Prakash wrote:
>> From: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com>
>>
>> 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>
>> ---
>> arch/arm64/boot/dts/qcom/lemans-pmics.dtsi | 93 ++++++++++++++++++++++++++++++
>> 1 file changed, 93 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi b/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi
>> index 341119fc8244..6caec3e4df4b 100644
>> --- a/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/lemans-pmics.dtsi
>> @@ -5,6 +5,7 @@
>>
>> #include <dt-bindings/input/input.h>
>> #include <dt-bindings/spmi/spmi.h>
>> +#include "qcom-adc5-gen3.h"
>>
>> / {
>> thermal-zones {
>> @@ -110,6 +111,8 @@ pmm8654au_0_temp_alarm: temp-alarm@a00 {
>> reg = <0xa00>;
>> interrupts-extended = <&spmi_bus 0x0 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
>> #thermal-sensor-cells = <0>;
>> + io-channels = <&pmm8654au_0_adc ADC5_GEN3_DIE_TEMP(0)>;
>> + io-channel-names = "thermal";
>> };
>>
>> pmm8654au_0_pon: pon@1200 {
>> @@ -141,6 +144,27 @@ pmm8654au_0_rtc: rtc@6100 {
>> interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
>> };
>>
>> + pmm8654au_0_adc: adc@8000 {
>> + compatible = "qcom,spmi-adc5-gen3";
>> + reg = <0x8000>;
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + interrupts = <0x0 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
>> + #io-channel-cells = <1>;
>> +
>> + channel@3 {
>> + reg = <ADC5_GEN3_DIE_TEMP(0)>;
>> + label = "pmm8654au_0_die_temp";
>
> Are these labels namespaced, i.e. can the label be just "pm8654au_die_temp"
> or "die_temp"?
From what I see, there's no functional issue with updating the label to either
of the names you suggested. We made it this way at first as we thought it would
be useful to have the exact PMIC instance name in the label of each channel.
Do you want any changes in the labels? If yes, which convention do you prefer?
Thanks,
Jishnu
>
> Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/3] arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au
2026-06-18 10:21 ` Jishnu Prakash
@ 2026-06-30 11:57 ` Konrad Dybcio
0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2026-06-30 11:57 UTC (permalink / raw)
To: Jishnu Prakash, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa
On 6/18/26 12:21 PM, Jishnu Prakash wrote:
> Hi Konrad,
>
> On 6/15/2026 9:26 PM, Konrad Dybcio wrote:
>> On 4/30/26 10:58 AM, Jishnu Prakash wrote:
>>> From: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com>
>>>
>>> Add ADC nodes for the four PMM8654au PMICs (pmm8654au_0 through
>>> pmm8654au_3) on the Lemans platform.
[...]
>>> + pmm8654au_0_adc: adc@8000 {
>>> + compatible = "qcom,spmi-adc5-gen3";
>>> + reg = <0x8000>;
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> + interrupts = <0x0 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
>>> + #io-channel-cells = <1>;
>>> +
>>> + channel@3 {
>>> + reg = <ADC5_GEN3_DIE_TEMP(0)>;
>>> + label = "pmm8654au_0_die_temp";
>>
>> Are these labels namespaced, i.e. can the label be just "pm8654au_die_temp"
>> or "die_temp"?
>
> From what I see, there's no functional issue with updating the label to either
> of the names you suggested. We made it this way at first as we thought it would
> be useful to have the exact PMIC instance name in the label of each channel.
>
> Do you want any changes in the labels? If yes, which convention do you prefer?
I poked around sysfs - let's stick with the existing ones, since
all we get is this label, without a "nice" way to identify which is
which
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/3] arm64: dts: qcom: monaco-pmics: Add ADC support for PMM8620AU
2026-04-30 8:58 [PATCH 0/3] Add ADC support for lemans and monaco Jishnu Prakash
2026-04-30 8:58 ` [PATCH 1/3] arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros Jishnu Prakash
2026-04-30 8:58 ` [PATCH 2/3] arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au Jishnu Prakash
@ 2026-04-30 8:58 ` Jishnu Prakash
2026-04-30 9:12 ` [PATCH 0/3] Add ADC support for lemans and monaco Neil Armstrong
3 siblings, 0 replies; 12+ messages in thread
From: Jishnu Prakash @ 2026-04-30 8:58 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa, Jishnu Prakash
From: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com>
Add ADC nodes for PMM8620AU PMIC instances (SID 0 and SID 2)
present on the Monaco platform.
Each ADC node exposes the following ADC channels:
- DIE_TEMP: PMIC die temperature channel
- VPH_PWR: Battery/supply voltage channel
Signed-off-by: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com>
Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/monaco-pmics.dtsi | 43 ++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/monaco-pmics.dtsi b/arch/arm64/boot/dts/qcom/monaco-pmics.dtsi
index e990d7367719..232bcb942b54 100644
--- a/arch/arm64/boot/dts/qcom/monaco-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/monaco-pmics.dtsi
@@ -5,6 +5,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/spmi/spmi.h>
+#include "qcom-adc5-gen3.h"
&spmi_bus {
pmm8620au_0: pmic@0 {
@@ -20,6 +21,27 @@ pmm8620au_0_rtc: rtc@6100 {
interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
};
+ pmm8620au_0_adc: adc@8000 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x0 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ #io-channel-cells = <1>;
+
+ channel@3 {
+ reg = <ADC5_GEN3_DIE_TEMP(0)>;
+ label = "pmm8620au_0_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@8e {
+ reg = <ADC5_GEN3_VPH_PWR(0)>;
+ label = "pmm8620au_0_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
+ };
+
pmm8620au_0_gpios: gpio@8800 {
compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
reg = <0x8800>;
@@ -37,6 +59,27 @@ pmm8650au_1: pmic@2 {
#address-cells = <1>;
#size-cells = <0>;
+ pmm8650au_1_adc: adc@8000 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x2 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ #io-channel-cells = <1>;
+
+ channel@203 {
+ reg = <ADC5_GEN3_DIE_TEMP(2)>;
+ label = "pmm8650au_1_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@28e {
+ reg = <ADC5_GEN3_VPH_PWR(2)>;
+ label = "pmm8650au_1_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
+ };
+
pmm8650au_1_gpios: gpio@8800 {
compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
reg = <0x8800>;
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 0/3] Add ADC support for lemans and monaco
2026-04-30 8:58 [PATCH 0/3] Add ADC support for lemans and monaco Jishnu Prakash
` (2 preceding siblings ...)
2026-04-30 8:58 ` [PATCH 3/3] arm64: dts: qcom: monaco-pmics: Add ADC support for PMM8620AU Jishnu Prakash
@ 2026-04-30 9:12 ` Neil Armstrong
3 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2026-04-30 9:12 UTC (permalink / raw)
To: Jishnu Prakash, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Ayyagari Ushasreevalli,
Kamal Wadhwa
Hi,
On 4/30/26 10:58, Jishnu Prakash wrote:
> This patch series adds Gen3 ADC channel macro definitions, with basic ADC
> support for lemans and monaco.
>
> Patch 1 adds ADC virtual channel macro definitions, which are used in
> the "reg" property of individual ADC channels and also by ADC clients
> to reference channels. These are a combination of PMIC SID and HW ADC
> channel number, which are parsed in the driver to identify the intended
> PMIC and channel under it.
>
> Patch 2 adds ADC nodes with channels under the PMIC instances on lemans.
>
> Patch 3 adds ADC nodes with channels under the PMIC instances on monaco.
I sent https://lore.kernel.org/all/20260427-topic-sm8x50-adc5-gen3-v1-0-8a70f7b90a75@linaro.org/
which has a similar goal.
Thanks,
Neil
>
> Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
> ---
> Ayyagari Ushasreevalli (2):
> arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au
> arm64: dts: qcom: monaco-pmics: Add ADC support for PMM8620AU
>
> Jishnu Prakash (1):
> arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros
>
> arch/arm64/boot/dts/qcom/lemans-pmics.dtsi | 93 ++++++++++++++++++++++++++++++
> arch/arm64/boot/dts/qcom/monaco-pmics.dtsi | 43 ++++++++++++++
> arch/arm64/boot/dts/qcom/qcom-adc5-gen3.h | 88 ++++++++++++++++++++++++++++
> 3 files changed, 224 insertions(+)
> ---
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
> change-id: 20260430-adc5_gen3_dt-f0434155ee25
>
> Best regards,
> --
> Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
>
^ permalink raw reply [flat|nested] 12+ messages in thread