linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: AngeloGioacchino Del Regno  <angelogioacchino.delregno@somainline.org>
Cc: Thara Gopinath <thara.gopinath@linaro.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	~postmarketos/upstreaming@lists.sr.ht,
	martin.botka@somainline.org, marijn.suijten@somainline.org,
	jamipkettunen@somainline.org, Andy Gross <agross@kernel.org>,
	Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 14/39] arm64: dts: qcom: sdm630: Add TSENS node
Date: Tue, 24 Aug 2021 08:16:26 -0700	[thread overview]
Message-ID: <YSUNSmgeGgc+x5xA@ripper> (raw)
In-Reply-To: <2ffc4e54-a501-bd2d-3f29-a6df34023445@somainline.org>

On Thu 29 Jul 06:48 PDT 2021, AngeloGioacchino Del Regno wrote:

> Il 29/07/21 13:14, Thara Gopinath ha scritto:
> > 
> > 
> > On 7/29/21 6:55 AM, Konrad Dybcio wrote:
> > > 
> > > On 29.07.2021 12:54, Thara Gopinath wrote:
> > > > 
> > > > 
> > > > On 7/29/21 6:52 AM, Konrad Dybcio wrote:
> > > > > 
> > > > > On 29.07.2021 12:50, Thara Gopinath wrote:
> > > > > > Hi Konrad,
> > > > > > 
> > > > > > On 7/28/21 6:25 PM, Konrad Dybcio wrote:
> > > > > > > This will enable temperature reporting for various SoC
> > > > > > > components.
> > > > > > > 
> > > > > > > Signed-off-by: AngeloGioacchino Del Regno
> > > > > > > <angelogioacchino.delregno@somainline.org>
> > > > > > > Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> > > > > > > ---
> > > > > > >     .../devicetree/bindings/thermal/qcom-tsens.yaml       |  1 +
> > > > > > >     arch/arm64/boot/dts/qcom/sdm630.dtsi                  | 11 +++++++++++
> > > > > > >     2 files changed, 12 insertions(+)
> > > > > > > 
> > > > > > > diff --git
> > > > > > > a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> > > > > > > b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> > > > > > > index 4a2eaf28e3fd..d3b9e9b600a2 100644
> > > > > > > --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> > > > > > > +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> > > > > > > @@ -48,6 +48,7 @@ properties:
> > > > > > >                   - qcom,sc7180-tsens
> > > > > > >                   - qcom,sc7280-tsens
> > > > > > >                   - qcom,sc8180x-tsens
> > > > > > > +              - qcom,sdm630-tsens
> > > > > > >                   - qcom,sdm845-tsens
> > > > > > >                   - qcom,sm8150-tsens
> > > > > > >                   - qcom,sm8250-tsens
> > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi
> > > > > > > b/arch/arm64/boot/dts/qcom/sdm630.dtsi
> > > > > > > index 1e54828817d5..7e9c80e35fba 100644
> > > > > > > --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
> > > > > > > +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
> > > > > > > @@ -627,6 +627,17 @@ mnoc: interconnect@1745000 {
> > > > > > >                      <&mmcc AHB_CLK_SRC>;
> > > > > > >             };
> > > > > > >     +        tsens: thermal-sensor@10ae000 {
> > > > > > > +            compatible = "qcom,sdm630-tsens", "qcom,tsens-v2";
> > > > > > > +            reg = <0x010ae000 0x1000>, /* TM */
> > > > > > > +                  <0x010ad000 0x1000>; /* SROT */
> > > > > > > +            #qcom,sensors = <12>;
> > > > > > 
> > > > > > Are all 12 sensors used ? I see that in a later patch
> > > > > > "arm64: dts: qcom: sdm630: Add thermal-zones
> > > > > > configuration" only 9 are used.
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > if I recall correctly, they all give output but not all of
> > > > > the mappings were documented in the downstream sources and
> > > > > we have no documentation whatsoever :(
> > > > 
> > > > Right. In that case, why not change #qcom,sensors to 9 and add
> > > > rest of the sensors if and when needed ?
> > > > 
> > > I don't think it makes sense to describe the hardware incorrectly,
> > > even if some of it is unused.
> > 
> > My thinking was more along the lines of don't expose unused h/w bits.
> > 
> 
> You're right about not exposing unused HW bits, but even PC x86 motherboards
> (I mean the smbus/i2c drivers for the big holy management/sensors chips) do
> have such a "base" configuration, where some lines are read as 0 because they
> are effectively not connected by hardware.
> 
> In order to avoid confusion to other developers, in my personal opinion, it would
> be good go for the current value of 12 (which isn't incorrect, as that's what the
> SoC supports)... I don't think that anyone would be confused by seeing zero
> readings on some sensors (if their device don't support such sensor), as I think
> that everyone is used to that anyway, even if that's in other circumstances...
> 
> In any case, luckily that's also safe, because there's no firmware that restricts
> the readings to a subset of sensors in this domain (nobody is going to get a
> hypervisor fault for that).
> 
> I would also, in case, propose to see how things go: I would expect other
> developers to push device trees for many SDM630/636/660 devices, including but
> not limited to smartphones and SBCs.. so perhaps if we find out that really
> nobody uses the 12 sensors, or if the very vast majority uses a different amount,
> perhaps we may just transfer the value to device-specific configurations in one
> go, as to avoid unnecessary noise... I think :)))
> 

If the SoC has 12 sensors I think it makes sense to define that, similar
to how a SoC might have 200 GPIOs, even though only a handful is
actually used.

Regards,
Bjorn

  reply	other threads:[~2021-08-24 15:15 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210728222542.54269-1-konrad.dybcio@somainline.org>
2021-07-28 22:25 ` [PATCH 01/39] arm64: dts: qcom: sdm630: Rewrite memory map Konrad Dybcio
2021-07-28 22:25 ` [PATCH 02/39] arm64: dts: qcom: sdm630: Add RPMPD nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 03/39] arm64: dts: qcom: sdm630: Add MMCC node Konrad Dybcio
2021-07-28 22:25 ` [PATCH 04/39] arm64: dts: qcom: sdm630: Add interconnect provider nodes Konrad Dybcio
2021-08-10  1:02   ` Dmitry Baryshkov
2021-07-28 22:25 ` [PATCH 05/39] arm64: dts: qcom: sdm630: Add MDSS nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 06/39] arm64: dts: qcom: sdm630: Add qfprom subnodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 07/39] arm64: dts: qcom: sdm630: Add USB configuration Konrad Dybcio
2021-07-28 22:25 ` [PATCH 08/39] arm64: dts: qcom: sdm630: Fix TLMM node and pinctrl configuration Konrad Dybcio
2021-07-28 22:25 ` [PATCH 09/39] arm64: dts: qcom: sdm630: Add SDHCI2 node Konrad Dybcio
2021-07-28 22:25 ` [PATCH 10/39] arm64: dts: qcom: sdm630: Add interconnect and opp table to sdhc_1 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 11/39] arm64: dts: qcom: sdm630: Add GPU Clock Controller node Konrad Dybcio
2021-07-28 22:25 ` [PATCH 12/39] arm64: dts: qcom: sdm630: Add clocks and power domains to SMMU nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 13/39] arm64: dts: qcom: sdm630: Add qcom,adreno-smmu compatible Konrad Dybcio
2021-07-28 22:25 ` [PATCH 14/39] arm64: dts: qcom: sdm630: Add TSENS node Konrad Dybcio
2021-07-29 10:50   ` Thara Gopinath
2021-07-29 10:52     ` Konrad Dybcio
2021-07-29 10:54       ` Thara Gopinath
2021-07-29 10:55         ` Konrad Dybcio
2021-07-29 11:14           ` Thara Gopinath
2021-07-29 13:48             ` AngeloGioacchino Del Regno
2021-08-24 15:16               ` Bjorn Andersson [this message]
2021-08-02 22:39   ` Rob Herring
2021-07-28 22:25 ` [PATCH 15/39] arm64: dts: qcom: sdm630: Add modem/ADSP SMP2P nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 16/39] arm64: dts: qcom: sdm630: Add thermal-zones configuration Konrad Dybcio
2021-07-28 22:25 ` [PATCH 17/39] arm64: dts: qcom: sdm630: Add ADSP remoteproc configuration Konrad Dybcio
2021-07-28 22:25 ` [PATCH 18/39] arm64: dts: qcom: sdm630: Raise tcsr_mutex_regs size Konrad Dybcio
2021-07-28 22:25 ` [PATCH 19/39] arm64: dts: qcom: sdm630: Add Adreno 508 GPU configuration Konrad Dybcio
2021-07-28 22:25 ` [PATCH 20/39] arm64: dts: qcom: pm660: Support SPMI regulators on PMIC sid 1 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 21/39] arm64: dts: qcom: pm660l: Add WLED support Konrad Dybcio
2021-07-28 22:25 ` [PATCH 22/39] arm64: dts: qcom: pm660l: Support SPMI regulators on PMIC sid 3 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 23/39] arm64: dts: qcom: pm660(l): Add VADC and temp alarm nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 24/39] arm64: dts: qcom: sdm660: Make the DTS an overlay on top of 630 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 25/39] arm64: dts: qcom: Add device tree for SDM636 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 26/39] arm64: dts: qcom: sdm630: Add IMEM node Konrad Dybcio
2021-07-28 22:25 ` [PATCH 27/39] arm64: dts: qcom: sdm630: Configure the camera subsystem Konrad Dybcio
2021-07-28 22:25 ` [PATCH 28/39] arm64: dts: qcom: sdm660: Add required nodes for DSI1 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 29/39] arm64: dts: qcom: sdm630-xperia-nile: Add all RPM and fixed regulators Konrad Dybcio
2021-07-28 22:25 ` [PATCH 30/39] arm64: dts: qcom: sdm630-nile: Use &labels Konrad Dybcio
2021-07-28 22:25 ` [PATCH 31/39] arm64: dts: qcom: sdm630-nile: Add USB Konrad Dybcio
2021-07-28 22:25 ` [PATCH 32/39] arm64: dts: qcom: sdm630-nile: Add Volume up key Konrad Dybcio
2021-07-28 22:25 ` [PATCH 33/39] arm64: dts: qcom: sdm630-xperia: Retire sdm630-sony-xperia-ganges.dtsi Konrad Dybcio
2021-07-28 22:25 ` [PATCH 34/39] arm64: dts: qcom: sdm630-nile: Add Synaptics touchscreen Konrad Dybcio
2021-07-28 22:25 ` [PATCH 35/39] arm64: dts: qcom: sdm630-nile: Specify ADSP firmware name Konrad Dybcio
2021-07-28 22:25 ` [PATCH 36/39] arm64: dts: qcom: sdm630-nile: Enable uSD card slot Konrad Dybcio
2021-07-28 22:25 ` [PATCH 37/39] arm64: dts: qcom: sdm630-nile: Remove gpio-keys autorepeat Konrad Dybcio
2021-07-28 22:25 ` [PATCH 38/39] arm64: dts: qcom: sdm630: Add I2C functions to I2C pins Konrad Dybcio
2021-07-28 22:25 ` [PATCH 39/39] arm64: dts: qcom: sdm630: Add DMA to I2C hosts Konrad Dybcio

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=YSUNSmgeGgc+x5xA@ripper \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=amitk@kernel.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jamipkettunen@somainline.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.botka@somainline.org \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=thara.gopinath@linaro.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).