linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Luca Weiss <luca.weiss@fairphone.com>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Vinod Koul <vkoul@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Robert Marko <robimarko@gmail.com>,
	Das Srinagesh <quic_gurus@quicinc.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Amit Kucheria <amitk@kernel.org>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org,
	linux-mmc@vger.kernel.org
Subject: Re: [PATCH v2 14/15] arm64: dts: qcom: Add initial Milos dtsi
Date: Wed, 20 Aug 2025 14:52:43 +0300	[thread overview]
Message-ID: <2hv4yuc7rgtglihc2um2lr5ix4dfqxd4abb2bqb445zkhpjpsi@rozikfwrdtlk> (raw)
In-Reply-To: <DC74DPI8WS81.17VCYVY34C2F9@fairphone.com>

On Wed, Aug 20, 2025 at 10:42:09AM +0200, Luca Weiss wrote:
> Hi Konrad,
> 
> On Sat Aug 2, 2025 at 2:04 PM CEST, Konrad Dybcio wrote:
> > On 7/29/25 8:49 AM, Luca Weiss wrote:
> >> Hi Konrad,
> >> 
> >> On Thu Jul 17, 2025 at 11:46 AM CEST, Luca Weiss wrote:
> >>> Hi Konrad,
> >>>
> >>> On Thu Jul 17, 2025 at 10:29 AM CEST, Luca Weiss wrote:
> >>>> On Mon Jul 14, 2025 at 1:06 PM CEST, Konrad Dybcio wrote:
> >>>>> On 7/13/25 10:05 AM, Luca Weiss wrote:
> >>>>>> Add a devicetree description for the Milos SoC, which is for example
> >>>>>> Snapdragon 7s Gen 3 (SM7635).
> >>>>>>
> >>>>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> >>>>>> ---
> >>>>>
> >>>>> [...]
> >>>>>> +
> >>>>>> +		spmi_bus: spmi@c400000 {
> >>>>>> +			compatible = "qcom,spmi-pmic-arb";
> >>>>>
> >>>>> There's two bus instances on this platform, check out the x1e binding
> >>>>
> >>>> Will do
> >>>
> >>> One problem: If we make the labels spmi_bus0 and spmi_bus1 then we can't
> >>> reuse the existing PMIC dtsi files since they all reference &spmi_bus.
> >>>
> >>> On FP6 everything's connected to PMIC_SPMI0_*, and PMIC_SPMI1_* is not
> >>> connected to anything so just adding the label spmi_bus on spmi_bus0
> >>> would be fine.
> >>>
> >>> Can I add this to the device dts? Not going to be pretty though...
> >>>
> >>> diff --git a/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts b/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts
> >>> index d12eaa585b31..69605c9ed344 100644
> >>> --- a/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts
> >>> +++ b/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts
> >>> @@ -11,6 +11,9 @@
> >>>  #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> >>>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> >>>  #include "milos.dtsi"
> >>> +
> >>> +spmi_bus: &spmi_bus0 {};
> >>> +
> >>>  #include "pm7550.dtsi"
> >>>  #include "pm8550vs.dtsi"
> >>>  #include "pmiv0104.dtsi" /* PMIV0108 */
> >>>
> >>> Or I can add a second label for the spmi_bus0 as 'spmi_bus'. Not sure
> >>> other designs than SM7635 recommend using spmi_bus1 for some stuff.
> >>>
> >>> But I guess longer term we'd need to figure out a solution to this, how
> >>> to place a PMIC on a given SPMI bus, if reference designs start to
> >>> recommend putting different PMIC on the separate busses.
> >> 
> >> Any feedback on this regarding the spmi_bus label?
> >
> > I had an offline chat with Bjorn and we only came up with janky
> > solutions :)
> >
> > What you propose works well if the PMICs are all on bus0, which is
> > not the case for the newest platforms. If some instances are on bus0
> > and others are on bus1, things get ugly really quick and we're going
> > to drown in #ifdefs.
> >
> >
> > An alternative that I've seen downstream is to define PMIC nodes in
> > the root of a dtsi file (not in the root of DT, i.e. NOT under / { })
> > and do the following:
> >
> > &spmi_busN {
> > 	#include "pmABCDX.dtsi"
> > };
> >
> > Which is "okay", but has the visible downside of having to define the
> > temp alarm thermal zone in each board's DT separately (and doing
> > mid-file includes which is.. fine I guess, but also something we avoided
> > upstream for the longest time)
> >
> >
> > Both are less than ideal when it comes to altering the SID under
> > "interrupts", fixing that would help immensely. We were hoping to
> > leverage something like Johan's work on drivers/mfd/qcom-pm8008.c,
> > but that seems like a longer term project.
> >
> > Please voice your opinions
> 
> Since nobody else jumped in, how can we continue?
> 
> One janky solution in my mind is somewhat similar to the PMxxxx_SID
> defines, doing something like "#define PM7550_SPMI spmi_bus0" and then
> using "&PM7550_SPMI {}" in the dtsi. I didn't try it so not sure that
> actually works but something like this should I imagine.
> 
> But fortunately my Milos device doesn't have the problem that it
> actually uses both SPMI busses for different PMICs, so similar to other
> SoCs that already have two SPMI busses, I could somewhat ignore the
> problem and let someone else figure out how to actually place PMICs on
> spmi_bus0 and spmi_bus1 if they have such a hardware.

I'd say, ignore it for now.

> 
> Regards
> Luca
> 
> >
> > Konrad
> 

-- 
With best wishes
Dmitry

  reply	other threads:[~2025-08-20 11:52 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-13  8:05 [PATCH v2 00/15] Various dt-bindings for Milos and The Fairphone (Gen. 6) addition Luca Weiss
2025-07-13  8:05 ` [PATCH v2 01/15] dt-bindings: arm-smmu: document the support on Milos Luca Weiss
2025-07-15  3:25   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 02/15] dt-bindings: cpufreq: qcom-hw: document Milos CPUFREQ Hardware Luca Weiss
2025-07-15  3:27   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 03/15] dt-bindings: crypto: qcom,prng: document Milos Luca Weiss
2025-07-15  3:27   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 04/15] dt-bindings: firmware: qcom,scm: document Milos SCM Firmware Interface Luca Weiss
2025-07-15  3:27   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 05/15] dt-bindings: qcom,pdc: document the Milos Power Domain Controller Luca Weiss
2025-07-15  3:28   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 06/15] dt-bindings: mailbox: qcom-ipcc: document the Milos Inter-Processor Communication Controller Luca Weiss
2025-07-15  3:28   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 07/15] dt-bindings: soc: qcom,aoss-qmp: document the Milos Always-On Subsystem side channel Luca Weiss
2025-07-15  3:28   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 08/15] dt-bindings: thermal: qcom-tsens: document the Milos Temperature Sensor Luca Weiss
2025-07-15  3:28   ` Rob Herring (Arm)
2025-07-17  8:45   ` Daniel Lezcano
2025-07-13  8:05 ` [PATCH v2 09/15] dt-bindings: dma: qcom,gpi: document the Milos GPI DMA Engine Luca Weiss
2025-07-15  3:29   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 10/15] dt-bindings: mmc: sdhci-msm: document the Milos SDHCI Controller Luca Weiss
2025-07-15  3:29   ` Rob Herring (Arm)
2025-07-15 14:29   ` Ulf Hansson
2025-07-13  8:05 ` [PATCH v2 11/15] dt-bindings: soc: qcom: qcom,pmic-glink: document Milos compatible Luca Weiss
2025-07-15  3:29   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 12/15] dt-bindings: arm: qcom: Add Milos and The Fairphone (Gen. 6) Luca Weiss
2025-07-15  3:29   ` Rob Herring (Arm)
2025-07-13  8:05 ` [PATCH v2 13/15] arm64: dts: qcom: pm8550vs: Disable different PMIC SIDs by default Luca Weiss
2025-07-14 10:45   ` Konrad Dybcio
2025-07-13  8:05 ` [PATCH v2 14/15] arm64: dts: qcom: Add initial Milos dtsi Luca Weiss
2025-07-14 11:06   ` Konrad Dybcio
2025-07-17  8:29     ` Luca Weiss
2025-07-17  9:46       ` Luca Weiss
2025-07-29  6:49         ` Luca Weiss
2025-08-02 12:04           ` Konrad Dybcio
2025-08-20  8:42             ` Luca Weiss
2025-08-20 11:52               ` Dmitry Baryshkov [this message]
2025-08-25 15:53                 ` Luca Weiss
2025-08-25 16:36                   ` Dmitry Baryshkov
2025-08-25 16:40                     ` Luca Weiss
2025-07-17 12:26       ` Konrad Dybcio
2025-07-23 15:36     ` neil.armstrong
2025-07-13  8:05 ` [PATCH v2 15/15] arm64: dts: qcom: Add The Fairphone (Gen. 6) Luca Weiss
2025-07-14 12:19   ` Konrad Dybcio
2025-07-14 12:32     ` Luca Weiss
2025-07-15 11:57 ` [PATCH v2 00/15] Various dt-bindings for Milos and The Fairphone (Gen. 6) addition Will Deacon
2025-07-17  4:31 ` (subset) " Bjorn Andersson
2025-07-23 12:29 ` Vinod Koul

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=2hv4yuc7rgtglihc2um2lr5ix4dfqxd4abb2bqb445zkhpjpsi@rozikfwrdtlk \
    --to=dmitry.baryshkov@oss.qualcomm.com \
    --cc=amitk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=iommu@lists.linux.dev \
    --cc=jassisinghbrar@gmail.com \
    --cc=joro@8bytes.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=luca.weiss@fairphone.com \
    --cc=lukasz.luba@arm.com \
    --cc=mani@kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=quic_gurus@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=robimarko@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    --cc=thara.gopinath@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=will@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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).