devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pankaj Patil <pankaj.patil@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Pankaj Patil <pankaj.patil@oss.qualcomm.com>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
Subject: [PATCH v2 13/24] arm64: dts: qcom: Update pmh0104 dtsi for Glymur CRD
Date: Thu, 25 Sep 2025 11:58:19 +0530	[thread overview]
Message-ID: <20250925-v3_glymur_introduction-v2-13-8e1533a58d2d@oss.qualcomm.com> (raw)
In-Reply-To: <20250925-v3_glymur_introduction-v2-0-8e1533a58d2d@oss.qualcomm.com>

From: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>

Update the pmh0104.dtsi to include multiple instances of PMH0104
DT nodes, one for each SID assigned to this PMIC on the spmi_bus0
and spmi_bus1 in Glymur CRD board.

Take care to avoid compilation issue with the existing nodes by
gaurding each PMH0104 nodes with `#ifdef` for its corresponding
SID macro. So that only the nodes which have the their SID macro
defined are the only ones picked for compilation.

Signed-off-by: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
Signed-off-by: Pankaj Patil <pankaj.patil@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/pmh0104.dtsi | 84 +++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmh0104.dtsi b/arch/arm64/boot/dts/qcom/pmh0104.dtsi
index f5393fdebe957ea0caf4bbc16117374b4759bda3..d3ea7486d842ec813a79268fc1466e1513426d78 100644
--- a/arch/arm64/boot/dts/qcom/pmh0104.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmh0104.dtsi
@@ -6,7 +6,63 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
+&spmi_bus0 {
+#ifdef PMH0104_I_E0_SID
+	pmh0104_i_e0: pmic@PMH0104_I_E0_SID {
+		compatible = "qcom,pmh0104", "qcom,spmi-pmic";
+		reg = <PMH0104_I_E0_SID SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+
+		pmh0104_i_e0_temp_alarm: temp-alarm@a00 {
+			compatible = "qcom,spmi-temp-alarm";
+			reg = <0xa00>;
+			interrupts = <PMH0104_I_E0_SID 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+			#thermal-sensor-cells = <0>;
+		};
+
+		pmh0104_i_e0_gpios: gpio@8800 {
+			compatible = "qcom,pmh0104-gpio", "qcom,spmi-gpio";
+			reg = <0x8800>;
+			gpio-controller;
+			gpio-ranges = <&pmh0104_i_e0_gpios 0 0 8>;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+#endif
+
+#ifdef PMH0104_J_E0_SID
+	pmh0104_j_e0: pmic@PMH0104_J_E0_SID {
+		compatible = "qcom,pmh0104", "qcom,spmi-pmic";
+		reg = <PMH0104_J_E0_SID SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pmh0104_j_e0_temp_alarm: temp-alarm@a00 {
+			compatible = "qcom,spmi-temp-alarm";
+			reg = <0xa00>;
+			interrupts = <PMH0104_J_E0_SID 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+			#thermal-sensor-cells = <0>;
+		};
+
+		pmh0104_j_e0_gpios: gpio@8800 {
+			compatible = "qcom,pmh0104-gpio", "qcom,spmi-gpio";
+			reg = <0x8800>;
+			gpio-controller;
+			gpio-ranges = <&pmh0104_j_e0_gpios 0 0 8>;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+#endif
+};
+
 &spmi_bus1 {
+#ifdef PMH0104_J_E1_SID
 	pmh0104_j_e1: pmic@PMH0104_J_E1_SID {
 		compatible = "qcom,pmh0104", "qcom,spmi-pmic";
 		reg = <PMH0104_J_E1_SID SPMI_USID>;
@@ -30,4 +86,32 @@ pmh0104_j_e1_gpios: gpio@8800 {
 			#interrupt-cells = <2>;
 		};
 	};
+#endif
+
+#ifdef PMH0104_L_E1_SID
+	pmh0104_l_e1: pmic@PMH0104_L_E1_SID {
+		compatible = "qcom,pmh0104", "qcom,spmi-pmic";
+		reg = <PMH0104_L_E1_SID SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+
+		pmh0104_l_e1_temp_alarm: temp-alarm@a00 {
+			compatible = "qcom,spmi-temp-alarm";
+			reg = <0xa00>;
+			interrupts = <PMH0104_L_E1_SID 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+			#thermal-sensor-cells = <0>;
+		};
+
+		pmh0104_l_e1_gpios: gpio@8800 {
+			compatible = "qcom,pmh0104-gpio", "qcom,spmi-gpio";
+			reg = <0x8800>;
+			gpio-controller;
+			gpio-ranges = <&pmh0104_l_e1_gpios 0 0 8>;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+#endif
 };

-- 
2.34.1


  parent reply	other threads:[~2025-09-25  6:29 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25  6:28 [PATCH v2 00/24] arm64: dts: qcom: Introduce Glymur SoC dtsi and Glymur CRD dts Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 01/24] dt-bindings: arm: qcom: Document Glymur SoC and board Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 02/24] arm64: defconfig: Enable Glymur configs for boot to shell Pankaj Patil
2025-09-25 21:09   ` Dmitry Baryshkov
2025-09-25  6:28 ` [PATCH v2 03/24] arm64: dts: qcom: Introduce Glymur base dtsi and CRD dts Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 04/24] arm64: dts: qcom: glymur: Add QUPv3 configuration for serial engines Pankaj Patil
2025-09-25 21:16   ` Dmitry Baryshkov
2025-10-15 10:47     ` Jyothi Kumar Seerapu
2025-09-25  6:28 ` [PATCH v2 05/24] arm64: dts: qcom: glymur: Add cpu idle states Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 06/24] arm64: dts: qcom: glymur: Enable pdp0 mailbox Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 07/24] arm64: dts: qcom: glymur: Enable cpu dvfs for CPU scaling Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 08/24] arm64: dts: qcom: glymur: Enable ipcc and aoss nodes Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 09/24] arm64: dts: qcom: glymur-crd: Add RPMH regulator rails Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 10/24] arm64: dts: qcom: glymur: Add SPMI PMIC arbiter device Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 11/24] arm64: dts: qcom: Add PMCX0102 pmic dtsi Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 12/24] arm64: dts: qcom: Add SMB2370 " Pankaj Patil
2025-09-25  6:28 ` Pankaj Patil [this message]
2025-09-25  7:55   ` [PATCH v2 13/24] arm64: dts: qcom: Update pmh0104 dtsi for Glymur CRD Krzysztof Kozlowski
2025-09-26  7:07     ` Pankaj Patil
2025-09-26  8:55       ` Konrad Dybcio
2025-09-25  6:28 ` [PATCH v2 14/24] arm64: dts: qcom: Update the pmh0110.dtsi for Glymur Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 15/24] arm64: dts: qcom: glymur: Add PMICs dtsi for CRD Pankaj Patil
2025-09-25  8:15   ` Abel Vesa
2025-09-30 14:22     ` Kamal Wadhwa
2025-09-25  6:28 ` [PATCH v2 16/24] arm64: boot: dts: glymur-crd: Add Volume down/up keys support Pankaj Patil
2025-09-25 13:45   ` Krzysztof Kozlowski
2025-09-25  6:28 ` [PATCH v2 17/24] arm64: dts: qcom: glymur-crd: Avoid RTC probe failure Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 18/24] arm64: dts: qcom: glymur: Add PMIC glink node Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 19/24] arm64: dts: qcom: glymur: Add support for PCIe5 Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 20/24] arm64: dts: qcom: glymur-crd: Add power supply and sideband signal for pcie5 Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 21/24] arm64: dts: qcom: glymur: Enable tsens and thermal zone nodes Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 22/24] arm64: dts: qcom: glymur: Add display clock controller device Pankaj Patil
2025-09-25  6:28 ` [PATCH v2 23/24] arm64: dts: qcom: glymur: Add USB support Pankaj Patil
2025-09-25  8:06   ` Abel Vesa
2025-09-25 10:54   ` Abel Vesa
2025-09-25 10:59     ` Konrad Dybcio
2025-09-25 11:29       ` Abel Vesa
2025-09-26  1:09       ` Wesley Cheng
2025-10-01  8:42         ` Konrad Dybcio
2025-09-25 20:42   ` Dmitry Baryshkov
2025-09-25  6:28 ` [PATCH v2 24/24] arm64: dts: qcom: glymur: Add remoteprocs Pankaj Patil
2025-09-25  6:35 ` [PATCH v2 00/24] arm64: dts: qcom: Introduce Glymur SoC dtsi and Glymur CRD dts Pankaj Patil
2025-09-25 21:06 ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250925-v3_glymur_introduction-v2-13-8e1533a58d2d@oss.qualcomm.com \
    --to=pankaj.patil@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).