[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241212-mbg-v2-support-v2-4-3249a4339b6e@quicinc.com>
Date: Thu, 12 Dec 2024 21:41:23 +0530
From: Satya Priya Kakitapalli <quic_skakitap@...cinc.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano
<daniel.lezcano@...aro.org>,
Zhang Rui <rui.zhang@...el.com>, Lukasz Luba
<lukasz.luba@....com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski
<krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Jonathan Cameron
<jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>, Lee Jones
<lee@...nel.org>,
Stephen Boyd <sboyd@...nel.org>, Amit Kucheria
<amitk@...nel.org>,
Thara Gopinath <thara.gopinath@...il.com>,
"Bjorn
Andersson" <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>
CC: Ajit Pandey <quic_ajipan@...cinc.com>,
Imran Shaik
<quic_imrashai@...cinc.com>,
Taniya Das <quic_tdas@...cinc.com>,
"Jagadeesh
Kona" <quic_jkona@...cinc.com>, <quic_kamalw@...cinc.com>,
<quic_jprakash@...cinc.com>, <linux-arm-msm@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-iio@...r.kernel.org>,
"Satya Priya
Kakitapalli" <quic_skakitap@...cinc.com>
Subject: [PATCH RFC v2 4/5] arm64: dts: qcom: sa8775p-pmics: Add vadc
support on SA8775P
Add support for reading the adc channels of pm8775 on SA8775P platforms.
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@...cinc.com>
---
arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 94 +++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
index 1369c3d43f866de9d8cd5cd4985241b99c0a0454..e87f95e9ba9f59e3f067af0d5565b8e3ed4b37fc 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
@@ -1,8 +1,10 @@
// SPDX-License-Identifier: BSD-3-Clause
/*
* Copyright (c) 2023, Linaro Limited
+ * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
*/
+#include <dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pm8775.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/spmi/spmi.h>
@@ -105,6 +107,29 @@ pmm8654au_0: pmic@0 {
#address-cells = <1>;
#size-cells = <0>;
+ pmm8654au_0_vadc: adc@...0 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x0 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "adc-sdam0";
+ #thermal-sensor-cells = <1>;
+ #io-channel-cells = <1>;
+
+ channel@0 {
+ reg = <PM8775_ADC5_GEN3_DIE_TEMP(0)>;
+ label = "pmm8654au_0_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@1 {
+ reg = <PM8775_ADC5_GEN3_VPH_PWR(0)>;
+ label = "pmm8654au_0_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
+ };
+
pmm8654au_0_temp_alarm: temp-alarm@a00 {
compatible = "qcom,spmi-temp-alarm";
reg = <0xa00>;
@@ -162,6 +187,29 @@ pmm8654au_1: pmic@2 {
#address-cells = <1>;
#size-cells = <0>;
+ pmm8654au_1_vadc: adc@...0 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x2 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "adc-sdam0";
+ #thermal-sensor-cells = <1>;
+ #io-channel-cells = <1>;
+
+ channel@0 {
+ reg = <PM8775_ADC5_GEN3_DIE_TEMP(2)>;
+ label = "pmm8654au_1_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@1 {
+ reg = <PM8775_ADC5_GEN3_VPH_PWR(2)>;
+ label = "pmm8654au_1_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
+ };
+
pmm8654au_1_temp_alarm: temp-alarm@a00 {
compatible = "qcom,spmi-temp-alarm";
reg = <0xa00>;
@@ -186,6 +234,29 @@ pmm8654au_2: pmic@4 {
#address-cells = <1>;
#size-cells = <0>;
+ pmm8654au_2_vadc: adc@...0 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x4 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "adc-sdam0";
+ #thermal-sensor-cells = <1>;
+ #io-channel-cells = <1>;
+
+ channel@0 {
+ reg = <PM8775_ADC5_GEN3_DIE_TEMP(4)>;
+ label = "pmm8654au_2_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@1 {
+ reg = <PM8775_ADC5_GEN3_VPH_PWR(4)>;
+ label = "pmm8654au_2_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
+ };
+
pmm8654au_2_temp_alarm: temp-alarm@a00 {
compatible = "qcom,spmi-temp-alarm";
reg = <0xa00>;
@@ -210,6 +281,29 @@ pmm8654au_3: pmic@6 {
#address-cells = <1>;
#size-cells = <0>;
+ pmm8654au_3_vadc: adc@...0 {
+ compatible = "qcom,spmi-adc5-gen3";
+ reg = <0x8000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <0x6 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "adc-sdam0";
+ #thermal-sensor-cells = <1>;
+ #io-channel-cells = <1>;
+
+ channel@0 {
+ reg = <PM8775_ADC5_GEN3_DIE_TEMP(6)>;
+ label = "pmm8654au_3_die_temp";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ channel@1 {
+ reg = <PM8775_ADC5_GEN3_VPH_PWR(6)>;
+ label = "pmm8654au_3_vph_pwr";
+ qcom,pre-scaling = <1 3>;
+ };
+ };
+
pmm8654au_3_temp_alarm: temp-alarm@a00 {
compatible = "qcom,spmi-temp-alarm";
reg = <0xa00>;
--
2.25.1
Powered by blists - more mailing lists