From: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Pankaj Patil <pankaj.patil@oss.qualcomm.com>,
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>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Abel Vesa <abel.vesa@linaro.org>
Subject: Re: [PATCH 14/24] arm64: dts: qcom: Update the pmh0110.dtsi for Glymur
Date: Fri, 10 Oct 2025 16:56:02 +0530 [thread overview]
Message-ID: <20251010112602.GA1372587@hu-kamalw-hyd.qualcomm.com> (raw)
In-Reply-To: <b784387b-5744-422e-92f5-3d575a24d01c@kernel.org>
Hi Krzysztof,
On Wed, Oct 08, 2025 at 08:25:51PM +0900, Krzysztof Kozlowski wrote:
> On 08/10/2025 17:02, Krzysztof Kozlowski wrote:
> > On 08/10/2025 16:31, Kamal Wadhwa wrote:
> >> Hi Krzysztof, Dmitry, Konrad,
> >>
> >> On Thu, Sep 25, 2025 at 09:57:02PM +0300, Dmitry Baryshkov wrote:
> >>> On Thu, Sep 25, 2025 at 10:34:52PM +0900, Krzysztof Kozlowski wrote:
> >>>> On Thu, 25 Sept 2025 at 22:14, Dmitry Baryshkov
> >>>> <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >>>>>
> >>>>> On Thu, Sep 25, 2025 at 05:08:54PM +0900, Krzysztof Kozlowski wrote:
> >>>>>> On Thu, 25 Sept 2025 at 15:34, Pankaj Patil
> >>>>>> <pankaj.patil@oss.qualcomm.com> wrote:
> >>>>>>>
> >>>>>>> From: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
> >>>>>>>
> >>>>>>> Add multiple instance of PMH0110 DT node, one for each assigned
> >>>>>>> SID for this PMIC on the spmi_bus0 and spmi_bus1 on the Glymur
> >>>>>>> CRD.
> >>>>>>>
> >>>>>>> Take care to avoid compilation issue with the existing nodes by
> >>>>>>> gaurding each PMH0110 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/pmh0110.dtsi | 66 ++++++++++++++++++++++++++++++++++-
> >>>>>>> 1 file changed, 65 insertions(+), 1 deletion(-)
> >>>>>>>
> >>>>>>> diff --git a/arch/arm64/boot/dts/qcom/pmh0110.dtsi b/arch/arm64/boot/dts/qcom/pmh0110.dtsi
> >>>>>>> index b99c33cba8860f1852231db33a127646c08c1e23..4a5c66e5c9fbc35cedb67601f4568844dc41fbea 100644
> >>>>>>> --- a/arch/arm64/boot/dts/qcom/pmh0110.dtsi
> >>>>>>> +++ b/arch/arm64/boot/dts/qcom/pmh0110.dtsi
> >>>>>>> @@ -7,6 +7,8 @@
> >>>>>>> #include <dt-bindings/spmi/spmi.h>
> >>>>>>>
> >>>>>>> &spmi_bus0 {
> >>>>>>> +
> >>>>>>> +#ifdef PMH0110_D_E0_SID
> >>>>>>
> >>>>>> NAK
> >>>>>>
> >>>>>> I already explained on IRC in great details why.
> >>>>>
> >>>>> A short summary or a link to a channel / date would be nice in order to
> >>>>> include other people into the discussion.
> >>>>>
> >>>>
> >>>> Of course but:
> >>>> 1. You were there so maybe you remember the arguments, and:
> >>>> 2. I'm offline, using phone, not having laptop, replying during my
> >>>> personal time off just before merge window so any emergency time
> >>>> should be spent on important matters instead these two huge patch
> >>>> bombs adding such usage I already said: NO, don't do this.
> >>>
> >>>
> >>> Well, If I'm asking, it means I don't rememebr the discussion. And I
> >>> defeinitely didn't know that you are spending your personal vacation
> >>> time in ML. And if the discussion was with some other people, then
> >>> somebody else can drop the response to the question.
> >>
> >> Just wanted to give some background on this patch.
> >> Even though PMH0104 and PMH0110 are common (b/w Kaanapali and Glymur),
> >> they don't share the SIDs. So we tried to use status="disabled" to handle
> >> this but we observed that because of the node name being common in the
> >> two included files, it ends up overwriting the previous node with the
> >> same name.
> >>
> >> eg-
> >> #include "pmh0104.dtsi" // assume contains pmic@4 { ...};
> >> #include "pmh0110.dtsi" // assume contains pmic@4 { status=disabled;};
> >>
> >> Here intention was to use the pmh0104 on sid-4, but it gets overwritten
> >> with the pmh0110 on sid-4 ( with status disabled). This is why we ended
> >> up using the `#ifdef`, ensuring that we can control the exact pmic that
> >> gets picked by using the PMXXX_SID macro.
> >>
> >> side note, i did `grep` in the `/arch/arm64/boot/dts/` and i see a lot
> >> of instances of `#if...` present in that. Assuming the concern here is
> >> about the use of `#ifdef`.
> >
> >
> > #if are not desired in C code, so why would they be acceptable in DTS?
> > It is not making the code easier to read at all.
> >
> > On IRC in these older discussions I was very strongly against any DTSI
> > which depends on some sort of outside values, except basic usage of
> > defines. Original pmh0110.dtsi from kaanapali is fine:
> > pmh0110_d_e0: pmic@PMH0110_D_E0_SID {
> >
> > but doing ifdefs here that this define depends on something else makes
> > code ungreppable (lookup unit address from sysfs and then git grep
> > pmic@4) and difficult to follow.
> >
> > My recommendation is either duplicate code or change DTSI files to not
> > contain entire node, but its contents. At least these are
> > recommendations I remember now.
> >
> One more recommendation:
> Different DTSI files per SoC, so pmh0110-kaanapali.dtsi and
> pmh0110-glymur.dtsi.
Thanks for this suggestion.
- So for the common pmics between the Kaanapali and Glymur, we are going to
postfix the soc name.
- Files pmk8550.dtsi, pmh0101.dtsi which are exactly same between kaanapali
and glymur we will continue to use the same name.
This is how the #includes will look (after dropping #ifdefs)
+#include "pmk8850.dtsi" /* SPMI0: SID-0 */
+#include "pmh0101.dtsi" /* SPMI0: SID-1 */
+#include "pmcx0102.dtsi" /* SPMI0: SID-2/3/4/6 SPMI1: SID-2/3/4 */
+#include "pmh0110-glymur.dtsi" /* SPMI0: SID-5/7 SPMI1: SID-5 */
+#include "pmh0104-glymur.dtsi" /* SPMI0: SID-8/9 SPMI1: SID-11 */
+#include "smb2370.dtsi" /* SPMI2: SID-9/10/11 */
(hope this is alright now?)
Regards,
Kamal
next prev parent reply other threads:[~2025-10-10 11:26 UTC|newest]
Thread overview: 131+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 6:32 [PATCH 00/24] arm64: dts: qcom: Introduce Glymur SoC dtsi and Glymur CRD dts Pankaj Patil
2025-09-25 6:32 ` [PATCH 01/24] dt-bindings: arm: qcom: Document Glymur SoC and board Pankaj Patil
2025-09-25 6:32 ` [PATCH 02/24] arm64: defconfig: Enable Glymur configs for boot to shell Pankaj Patil
2025-09-25 17:31 ` Dmitry Baryshkov
2025-10-08 11:26 ` Pankaj Patil
2025-10-08 12:56 ` Dmitry Baryshkov
2025-09-25 6:32 ` [PATCH 03/24] arm64: dts: qcom: Introduce Glymur base dtsi and CRD dts Pankaj Patil
2025-09-25 10:16 ` Konrad Dybcio
2025-10-29 10:00 ` Taniya Das
2025-10-29 10:36 ` Dmitry Baryshkov
2025-10-30 10:44 ` Taniya Das
2025-10-30 11:09 ` Dmitry Baryshkov
2025-10-30 17:10 ` Taniya Das
2025-09-25 13:02 ` Marc Zyngier
2025-10-08 11:30 ` Pankaj Patil
2025-09-25 17:44 ` Dmitry Baryshkov
2025-10-08 11:36 ` Pankaj Patil
2025-10-08 15:55 ` Dmitry Baryshkov
2025-10-10 7:50 ` Abel Vesa
2025-09-25 6:32 ` [PATCH 04/24] arm64: dts: qcom: glymur: Add QUPv3 configuration for serial engines Pankaj Patil
2025-09-25 10:18 ` Konrad Dybcio
2025-09-25 17:46 ` Dmitry Baryshkov
2025-10-15 10:28 ` Jyothi Kumar Seerapu
2025-10-15 13:33 ` Dmitry Baryshkov
2025-10-15 14:12 ` Jyothi Kumar Seerapu
2025-10-15 19:53 ` Dmitry Baryshkov
2025-10-20 11:54 ` Konrad Dybcio
[not found] ` <5931e2eb-5f2d-49bb-8b9c-b49f77d7fcbf@oss.qualcomm.com>
2025-10-30 10:56 ` Konrad Dybcio
2025-10-11 11:06 ` Abel Vesa
2025-10-11 11:11 ` Abel Vesa
2025-10-12 2:46 ` Krzysztof Kozlowski
2025-10-15 10:33 ` Jyothi Kumar Seerapu
2025-10-11 11:16 ` Abel Vesa
2025-10-15 10:53 ` Jyothi Kumar Seerapu
2025-09-25 6:32 ` [PATCH 05/24] arm64: dts: qcom: glymur: Add cpu idle states Pankaj Patil
2025-09-25 10:25 ` Konrad Dybcio
2025-10-13 9:29 ` Maulik Shah (mkshah)
2025-10-06 14:26 ` Krzysztof Kozlowski
2025-10-08 11:37 ` Pankaj Patil
2025-09-25 6:32 ` [PATCH 06/24] arm64: dts: qcom: glymur: Enable pdp0 mailbox Pankaj Patil
2025-09-25 8:23 ` Krzysztof Kozlowski
2025-09-25 17:06 ` Bjorn Andersson
2025-09-25 18:49 ` Dmitry Baryshkov
2025-09-25 10:29 ` Konrad Dybcio
2025-10-09 10:43 ` Sibi Sankar
2025-10-20 11:51 ` Konrad Dybcio
2025-09-25 6:32 ` [PATCH 07/24] arm64: dts: qcom: glymur: Enable cpu dvfs for CPU scaling Pankaj Patil
2025-09-25 8:06 ` Krzysztof Kozlowski
2025-09-25 17:26 ` Bjorn Andersson
2025-09-25 6:32 ` [PATCH 08/24] arm64: dts: qcom: glymur: Enable ipcc and aoss nodes Pankaj Patil
2025-09-25 11:00 ` Konrad Dybcio
2025-09-25 6:32 ` [PATCH 09/24] arm64: dts: qcom: glymur-crd: Add RPMH regulator rails Pankaj Patil
2025-09-25 11:01 ` Konrad Dybcio
2025-10-15 15:40 ` Kamal Wadhwa
2025-10-20 11:53 ` Konrad Dybcio
2025-09-25 17:09 ` Bjorn Andersson
2025-10-08 11:42 ` Pankaj Patil
2025-10-11 11:31 ` Abel Vesa
2025-10-11 15:56 ` Dmitry Baryshkov
2025-09-25 6:32 ` [PATCH 10/24] arm64: dts: qcom: glymur: Add SPMI PMIC arbiter device Pankaj Patil
2025-09-25 10:31 ` Konrad Dybcio
2025-10-06 14:27 ` Krzysztof Kozlowski
2025-09-25 6:32 ` [PATCH 11/24] arm64: dts: qcom: Add PMCX0102 pmic dtsi Pankaj Patil
2025-09-25 6:32 ` [PATCH 12/24] arm64: dts: qcom: Add SMB2370 " Pankaj Patil
2025-09-25 6:32 ` [PATCH 13/24] arm64: dts: qcom: Update pmh0104 dtsi for Glymur CRD Pankaj Patil
2025-09-25 6:32 ` [PATCH 14/24] arm64: dts: qcom: Update the pmh0110.dtsi for Glymur Pankaj Patil
2025-09-25 8:08 ` Krzysztof Kozlowski
2025-09-25 13:14 ` Dmitry Baryshkov
2025-09-25 13:34 ` Krzysztof Kozlowski
2025-09-25 14:00 ` Konrad Dybcio
2025-09-25 18:57 ` Dmitry Baryshkov
2025-10-08 7:31 ` Kamal Wadhwa
2025-10-08 8:02 ` Krzysztof Kozlowski
2025-10-08 11:25 ` Krzysztof Kozlowski
2025-10-10 11:26 ` Kamal Wadhwa [this message]
2025-10-08 9:15 ` Konrad Dybcio
2025-10-10 12:08 ` Aiqun(Maria) Yu
2025-09-25 6:32 ` [PATCH 15/24] arm64: dts: qcom: glymur: Add PMICs dtsi for CRD Pankaj Patil
2025-09-25 6:32 ` [PATCH 16/24] arm64: boot: dts: glymur-crd: Add Volume down/up keys support Pankaj Patil
2025-09-25 11:16 ` Konrad Dybcio
2025-10-01 13:48 ` Kamal Wadhwa
2025-10-06 8:56 ` Konrad Dybcio
2025-10-06 14:28 ` Krzysztof Kozlowski
2025-09-25 6:32 ` [PATCH 17/24] arm64: dts: qcom: glymur-crd: Avoid RTC probe failure Pankaj Patil
2025-09-25 8:11 ` Krzysztof Kozlowski
2025-10-01 12:23 ` Kamal Wadhwa
2025-10-06 14:28 ` Konrad Dybcio
2025-10-13 11:04 ` Kamal Wadhwa
2025-10-14 10:23 ` Konrad Dybcio
2025-10-14 12:36 ` Kamal Wadhwa
2025-10-14 19:52 ` Dmitry Baryshkov
2025-10-20 11:54 ` Konrad Dybcio
2025-10-06 14:32 ` Krzysztof Kozlowski
2025-09-25 6:32 ` [PATCH 18/24] arm64: dts: qcom: glymur: Add PMIC glink node Pankaj Patil
2025-09-25 8:13 ` Krzysztof Kozlowski
2025-09-25 10:32 ` Konrad Dybcio
2025-10-08 11:55 ` Pankaj Patil
2025-11-03 10:26 ` Kamal Wadhwa
2025-11-10 14:06 ` Kamal Wadhwa
2025-11-12 14:13 ` Konrad Dybcio
2025-09-25 6:32 ` [PATCH 19/24] arm64: dts: qcom: glymur: Add support for PCIe5 Pankaj Patil
2025-09-25 8:15 ` Krzysztof Kozlowski
2025-09-25 11:32 ` Konrad Dybcio
2025-10-10 7:02 ` Qiang Yu
2025-10-08 13:36 ` Abel Vesa
2025-10-10 7:08 ` Qiang Yu
2025-10-11 11:43 ` Abel Vesa
2025-10-11 15:57 ` Dmitry Baryshkov
2025-10-11 18:12 ` Abel Vesa
2025-09-25 6:32 ` [PATCH 20/24] arm64: dts: qcom: glymur-crd: Add power supply and sideband signal for pcie5 Pankaj Patil
2025-09-25 11:09 ` Konrad Dybcio
2025-10-09 9:53 ` Abel Vesa
2025-10-10 7:13 ` Qiang Yu
2025-09-25 6:32 ` [PATCH 21/24] arm64: dts: qcom: glymur: Enable tsens and thermal zone nodes Pankaj Patil
2025-09-25 11:15 ` Konrad Dybcio
2025-11-19 13:10 ` Manaf Meethalavalappu Pallikunhi
2025-09-25 6:32 ` [PATCH 22/24] arm64: dts: qcom: glymur: Add display clock controller device Pankaj Patil
2025-09-25 8:18 ` Krzysztof Kozlowski
2025-09-29 3:57 ` Taniya Das
2025-09-25 10:33 ` Konrad Dybcio
2025-09-29 3:54 ` Taniya Das
2025-10-09 5:12 ` Taniya Das
2025-10-09 8:30 ` Konrad Dybcio
2025-09-25 6:32 ` [PATCH 23/24] arm64: dts: qcom: glymur: Add USB support Pankaj Patil
2025-09-25 11:06 ` Konrad Dybcio
2025-09-25 13:19 ` Abel Vesa
2025-11-03 15:26 ` Abel Vesa
2025-11-03 17:00 ` Abel Vesa
2025-09-25 6:32 ` [PATCH 24/24] arm64: dts: qcom: glymur: Add remoteprocs Pankaj Patil
2025-09-25 17:30 ` [PATCH 00/24] arm64: dts: qcom: Introduce Glymur SoC dtsi and Glymur CRD dts Dmitry Baryshkov
2025-10-08 12:18 ` Pankaj Patil
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=20251010112602.GA1372587@hu-kamalw-hyd.qualcomm.com \
--to=kamal.wadhwa@oss.qualcomm.com \
--cc=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.patil@oss.qualcomm.com \
--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
all inboxes | Powered by JetHome®