Re: [PATCH v2 4/4] arm64: dts: qcom: hamoa-pmics: Add ADC support
From: Bjorn Andersson
Date: Sat Jul 11 2026 - 15:42:14 EST
On Sun, Jun 14, 2026 at 01:35:11PM +0530, Jishnu Prakash wrote:
> From: Ayyagari Ushasreevalli <aushasre@xxxxxxxxxxxxxxxx>
>
> 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.
>
> 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@xxxxxxxxxxxxxxxx>
> Signed-off-by: Jishnu Prakash <jishnu.prakash@xxxxxxxxxxxxxxxx>
> ---
> 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.
Regards,
Bjorn