From: Bjorn Andersson <andersson@kernel.org>
To: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Cc: 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,
Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com>,
Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
Sachin Gupta <sachin.gupta@oss.qualcomm.com>
Subject: Re: [PATCH v2 4/4] arm64: dts: qcom: hamoa-pmics: Add ADC support
Date: Wed, 15 Jul 2026 15:08:58 -0500 [thread overview]
Message-ID: <alfn2U2IR2BLCwGh@baldur> (raw)
In-Reply-To: <27141365-9fbb-4377-9db4-dae281741d0e@oss.qualcomm.com>
On Tue, Jul 14, 2026 at 05:34:31PM +0530, Jishnu Prakash wrote:
> Hi Bjorn,
>
> On 7/12/2026 1:11 AM, Bjorn Andersson wrote:
> > On Sun, Jun 14, 2026 at 01:35:11PM +0530, Jishnu Prakash wrote:
> >> From: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com>
> >>
> >> Add ADC node and define channels for:
> >> - Die temperature for PMK8550, PM8550VE* and PMC8380* PMICs.
> >> - PM8550: Die temperature, VPH power, and system thermistors.
> >>
> >> Define thermal zones 'sys-0-thermal' through 'sys-6-thermal' which
> >> correspond to the off-PMIC system thermistors connected via
> >> PM8550 AMUX/GPIO lines.
> >
> > These are connected to thermistors on the PCB, which would make them
> > board-specific. In fact, you specify all 7 thermal-zones, but at least 2
> > of those are not connected on my board according to the schematics.
> >
> > So, I think the thermal-zones definitions should be deferred to
> > board-specific dts.
>
> Yes, I see your point, since thermistors can vary between boards,
> it may be better to keep thermal-zones definitions in board-specific
> dts files.
>
> >
> >>
> >> Also,add io-channels and io-channel-names properties to the
> >> temp_alarm nodes so that they can get temperature reading
> >> from the ADC die_temp channels.
> >>
> >> Signed-off-by: Ayyagari Ushasreevalli <aushasre@qti.qualcomm.com>
> >> Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
> >> ---
> >> arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi | 250 ++++++++++++++++++++++++++++++
> >> 1 file changed, 250 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi b/arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi
> >> index 6a31a0adf8be..2e746ede850f 100644
> >> --- a/arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi
> >> +++ b/arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi
> >> @@ -6,7 +6,9 @@
> >> #include <dt-bindings/input/input.h>
> >> #include <dt-bindings/input/linux-event-codes.h>
> >> #include <dt-bindings/interrupt-controller/irq.h>
> >> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> >> #include <dt-bindings/spmi/spmi.h>
> >> +#include "qcom-adc5-gen3.h"
> >>
> >> / {
> >> thermal-zones {
> >> @@ -189,6 +191,90 @@ trip1 {
> >> };
> >> };
> >> };
> >> +
> >> + sys-0-thermal {
> >> + polling-delay-passive = <0>;
> >> + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
> >
> > As I said above, this doesn't match my board.
> >
> >> + trips {
> >> + active-config0 {
> >> + temperature = <125000>;
> >> + hysteresis = <1000>;
> >> + type = "passive";
> >> + };
> >> + };
> >> + };
> >> +
> >> + sys-1-thermal {
> >> + polling-delay-passive = <0>;
> >> + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;
> >> + trips {
> >> + active-config0 {
> >> + temperature = <125000>;
> >> + hysteresis = <1000>;
> >> + type = "passive";
> >> + };
> >> + };
> >> + };
> >> +
> >> + sys-2-thermal {
> >
> > This provides the temperature of my keyboard, so I'd certainly want to
> > override the properties within - and perhaps use this for throttling
> > things.
> >
> >> + polling-delay-passive = <0>;
> >> + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;
> >> + trips {
> >> + active-config0 {
> >> + temperature = <125000>;
> >> + hysteresis = <1000>;
> >> + type = "passive";
> >> + };
> >> + };
> >> + };
> >> +
> > [..]
> >> @@ -277,6 +363,142 @@ pmk8550_pwm: pwm {
> >>
> >> status = "disabled";
> >> };
> >> +
> >> + pmk8550_vadc: adc@9000 {
> > [..]
> >> + channel@14a {
> >> + reg = <ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
> >
> > I guess per my own argument, you don't know that this channel has a 100K
> > resistor...
> >
> > But that said, people have waited forever for this to be ready to allow
> > thermal throttling of overheating laptops. So please just drop the
> > thermal-zones, address Konrad's other comment and resubmit this.
> >
>
> OK, please let me know in case you see any issues with the following
> changes:
>
> I'll drop the thermal-zones nodes for now. To avoid any error messages,
> like from attempts at thermal device registration, I'll drop the "qcom,adc-tm"
> property from channels having it and also the "#thermal-sensor-cells"
> property from the main ADC node.
>
> I'll keep the ADC channel nodes under the main ADC node in place and
> delete the ones absent on Purwa boards in Purwa board files, to address
> Konrad's comment.
>
> Later, I can push a separate patch to add proper thermal configurations
> for thermistors per board, and only for the boards we use internally.
>
That sounds like a good plan. That will allow us to move ahead and add
the board-specific thermal zones and cooling maps.
Regards,
Bjorn
> Thanks,
> Jishnu
>
> > Regards,
> > Bjorn
>
prev parent reply other threads:[~2026-07-15 20:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-14 8:05 [PATCH v2 0/4] Add ADC support for lemans, monaco and hamoa Jishnu Prakash
2026-06-14 8:05 ` [PATCH v2 1/4] arm64: dts: qcom: Add header file for ADC5 Gen3 channel macros Jishnu Prakash
2026-06-14 8:12 ` sashiko-bot
2026-07-07 13:30 ` Jishnu Prakash
2026-06-14 8:05 ` [PATCH v2 2/4] arm64: dts: qcom: lemans-pmics: Add ADC support for PMM8654au Jishnu Prakash
2026-06-30 12:04 ` Konrad Dybcio
2026-07-07 13:31 ` Jishnu Prakash
2026-06-14 8:05 ` [PATCH v2 3/4] arm64: dts: qcom: monaco-pmics: Add ADC support for PMM8620AU Jishnu Prakash
2026-06-14 8:15 ` sashiko-bot
2026-07-07 13:30 ` Jishnu Prakash
2026-06-30 12:02 ` Konrad Dybcio
2026-06-14 8:05 ` [PATCH v2 4/4] arm64: dts: qcom: hamoa-pmics: Add ADC support Jishnu Prakash
2026-06-14 8:17 ` sashiko-bot
2026-07-07 13:31 ` Jishnu Prakash
2026-06-30 12:01 ` Konrad Dybcio
2026-07-07 13:31 ` Jishnu Prakash
2026-07-11 19:41 ` Bjorn Andersson
2026-07-14 12:04 ` Jishnu Prakash
2026-07-15 20:08 ` Bjorn Andersson [this message]
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=alfn2U2IR2BLCwGh@baldur \
--to=andersson@kernel.org \
--cc=aushasre@qti.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jishnu.prakash@oss.qualcomm.com \
--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 \
--cc=sachin.gupta@oss.qualcomm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.