[PATCH 7/7] arm64: dts: qcom: kaanapali: Add ADC support for Kaanapali boards
Jishnu Prakash <[email protected]> Fri, 31 Jul 2026 23:36:20 +0530
| Newsgroups | org.kernel.vger.linux-pm,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Add the ADC channels under the PMK8850 ADC node for the other PMICS on the board with ADC peripherals. This includes die temperature and VPH power channels per PMIC and channels for available system thermistors. Add thermal zones corresponding to the thermistor channels to enable temperature monitoring. Also add io-channels and io-channel-names properties to the temp_alarm nodes so that they can get temperature reading from the newly added ADC die_temp channels. Signed-off-by: Jishnu Prakash <[email protected]> --- arch/arm64/boot/dts/qcom/kaanapali-mtp.dts | 312 +++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/kaanapali-qrd.dts | 312 +++++++++++++++++++++++++++++ 2 files changed, 624 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts b/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts index f9b5b5718b90..41636641f1ce 100644 --- a/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts +++ b/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts @@ -8,8 +8,10 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/linux-event-codes.h> #include <dt-bindings/leds/common.h> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> #include "kaanapali.dtsi" +#include "qcom-adc5-gen4.h" #include "pm8010-kaanapali.dtsi" /* SPMI1: SID-12/13 */ #include "pmd8028-kaanapali.dtsi" /* SPMI1: SID-4 */ @@ -163,6 +165,152 @@ platform { }; }; + thermal-zones { + sys-0-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX1_THM_100K_PU(0, 0)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-1-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX1_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-2-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX2_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-3-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX3_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-4-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX4_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-5-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX6_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-6-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX4_THM_100K_PU(1, 7)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-7-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX4_GPIO_100K_PU(1, 7)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + }; + wcd939x: audio-codec { compatible = "qcom,wcd9395-codec", "qcom,wcd9390-codec"; @@ -981,6 +1129,14 @@ led-1 { }; }; +&pmh0101_gpios { + sys_therm_5_gpio3: sys-therm-5-gpio3-state { + pins = "gpio3"; + function = PMIC_GPIO_FUNC_NORMAL; + bias-high-impedance; + }; +}; + &pmh0101_pwm { status = "okay"; @@ -1008,6 +1164,11 @@ led@3 { }; }; +&pmh0101_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 1)>; + io-channel-names = "thermal"; +}; + &pmh0104_j_e1_gpios { bt_default: bt-default-state { pins = "gpio5"; @@ -1038,6 +1199,11 @@ sde_mdp_vsync_p_1p8_active: sde-mdp-vsync-p-1p8-active-state { }; }; +&pmh0110_d_e0_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 3)>; + io-channel-names = "thermal"; +}; + &pmh0110_f_e0_gpios { sde_disp0_rst_1p2_active: sde-disp0-rst-1p2-active-state { pins = "gpio9"; @@ -1056,6 +1222,152 @@ sde_disp0_rst_1p8_active: sde-disp0-rst-1p8-active-state { }; }; +&pmh0110_f_e0_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 5)>; + io-channel-names = "thermal"; +}; + +&pmh0110_g_e0_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 6)>; + io-channel-names = "thermal"; +}; + +&pmh0110_i_e0_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 8)>; + io-channel-names = "thermal"; +}; + +&pmih0108_e1_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(1, 7)>; + io-channel-names = "thermal"; +}; + +&pmk8850_vadc { + pinctrl-0 = <&sys_therm_5_gpio3>; + pinctrl-names = "default"; + + channel@103 { + reg = <ADC5_GEN4_DIE_TEMP(0, 1)>; + label = "pmh0101_die_temp"; + }; + + channel@18e { + reg = <ADC5_GEN4_VPH_PWR(0, 1)>; + label = "pmh0101_vph_pwr"; + }; + + channel@303 { + reg = <ADC5_GEN4_DIE_TEMP(0, 3)>; + label = "pmh0110_3_die_temp"; + }; + + channel@38e { + reg = <ADC5_GEN4_VPH_PWR(0, 3)>; + label = "pmh0110_3_vph_pwr"; + }; + + channel@503 { + reg = <ADC5_GEN4_DIE_TEMP(0, 5)>; + label = "pmh0110_5_die_temp"; + }; + + channel@58e { + reg = <ADC5_GEN4_VPH_PWR(0, 5)>; + label = "pmh0110_5_vph_pwr"; + }; + + channel@603 { + reg = <ADC5_GEN4_DIE_TEMP(0, 6)>; + label = "pmh0110_6_die_temp"; + }; + + channel@68e { + reg = <ADC5_GEN4_VPH_PWR(0, 6)>; + label = "pmh0110_6_vph_pwr"; + }; + + channel@803 { + reg = <ADC5_GEN4_DIE_TEMP(0, 8)>; + label = "pmh0110_8_die_temp"; + }; + + channel@88e { + reg = <ADC5_GEN4_VPH_PWR(0, 8)>; + label = "pmh0110_8_vph_pwr"; + }; + + channel@2703 { + reg = <ADC5_GEN4_DIE_TEMP(1, 7)>; + label = "pmih0108_e1_die_temp"; + }; + + channel@278e { + reg = <ADC5_GEN4_VPH_PWR(1, 7)>; + label = "pmih0108_e1_vph_pwr"; + }; + + channel@278f { + reg = <ADC5_GEN4_VBAT_SNS_QBG(1, 7)>; + label = "pmih0108_e1_vbat_sns_qbg"; + }; + + channel@144 { + reg = <ADC5_GEN4_AMUX1_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_1"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@145 { + reg = <ADC5_GEN4_AMUX2_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_2"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@146 { + reg = <ADC5_GEN4_AMUX3_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_3"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@147 { + reg = <ADC5_GEN4_AMUX4_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_4"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@149 { + reg = <ADC5_GEN4_AMUX6_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_5"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@2747 { + reg = <ADC5_GEN4_AMUX4_THM_100K_PU(1, 7)>; + label = "pmih0108_e1_therm_6"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@274d { + reg = <ADC5_GEN4_AMUX4_GPIO_100K_PU(1, 7)>; + label = "pmih0108_e1_therm_7"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; +}; + &pon_resin { linux,code = <KEY_VOLUMEDOWN>; diff --git a/arch/arm64/boot/dts/qcom/kaanapali-qrd.dts b/arch/arm64/boot/dts/qcom/kaanapali-qrd.dts index 55d02219ef4e..303e7b316901 100644 --- a/arch/arm64/boot/dts/qcom/kaanapali-qrd.dts +++ b/arch/arm64/boot/dts/qcom/kaanapali-qrd.dts @@ -8,8 +8,10 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/linux-event-codes.h> #include <dt-bindings/leds/common.h> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> #include "kaanapali.dtsi" +#include "qcom-adc5-gen4.h" #include "pm8010-kaanapali.dtsi" /* SPMI1: SID-12/13 */ #include "pmd8028-kaanapali.dtsi" /* SPMI1: SID-4 */ @@ -80,6 +82,152 @@ key-volume-up { wakeup-source; }; }; + + thermal-zones { + sys-0-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX1_THM_100K_PU(0, 0)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-1-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX1_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-2-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX2_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-3-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX3_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-4-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX4_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-5-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX6_THM_100K_PU(0, 1)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-6-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX4_THM_100K_PU(1, 7)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-7-thermal { + thermal-sensors = <&pmk8850_vadc ADC5_GEN4_AMUX4_GPIO_100K_PU(1, 7)>; + + trips { + trip0 { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + trip1 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + }; }; &apps_rsc { @@ -717,6 +865,14 @@ led-1 { }; }; +&pmh0101_gpios { + sys_therm_5_gpio3: sys-therm-5-gpio3-state { + pins = "gpio3"; + function = PMIC_GPIO_FUNC_NORMAL; + bias-high-impedance; + }; +}; + &pmh0101_pwm { status = "okay"; @@ -744,11 +900,167 @@ led@3 { }; }; +&pmh0101_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 1)>; + io-channel-names = "thermal"; +}; + +&pmh0110_d_e0_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 3)>; + io-channel-names = "thermal"; +}; + +&pmh0110_f_e0_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 5)>; + io-channel-names = "thermal"; +}; + +&pmh0110_g_e0_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 6)>; + io-channel-names = "thermal"; +}; + +&pmh0110_i_e0_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(0, 8)>; + io-channel-names = "thermal"; +}; + &pmih0108_e1_eusb2_repeater { vdd18-supply = <&vreg_l15b_1p8>; vdd3-supply = <&vreg_l5b_3p1>; }; +&pmih0108_e1_temp_alarm { + io-channels = <&pmk8850_vadc ADC5_GEN4_DIE_TEMP(1, 7)>; + io-channel-names = "thermal"; +}; + +&pmk8850_vadc { + pinctrl-0 = <&sys_therm_5_gpio3>; + pinctrl-names = "default"; + + channel@103 { + reg = <ADC5_GEN4_DIE_TEMP(0, 1)>; + label = "pmh0101_die_temp"; + }; + + channel@18e { + reg = <ADC5_GEN4_VPH_PWR(0, 1)>; + label = "pmh0101_vph_pwr"; + }; + + channel@303 { + reg = <ADC5_GEN4_DIE_TEMP(0, 3)>; + label = "pmh0110_3_die_temp"; + }; + + channel@38e { + reg = <ADC5_GEN4_VPH_PWR(0, 3)>; + label = "pmh0110_3_vph_pwr"; + }; + + channel@503 { + reg = <ADC5_GEN4_DIE_TEMP(0, 5)>; + label = "pmh0110_5_die_temp"; + }; + + channel@58e { + reg = <ADC5_GEN4_VPH_PWR(0, 5)>; + label = "pmh0110_5_vph_pwr"; + }; + + channel@603 { + reg = <ADC5_GEN4_DIE_TEMP(0, 6)>; + label = "pmh0110_6_die_temp"; + }; + + channel@68e { + reg = <ADC5_GEN4_VPH_PWR(0, 6)>; + label = "pmh0110_6_vph_pwr"; + }; + + channel@803 { + reg = <ADC5_GEN4_DIE_TEMP(0, 8)>; + label = "pmh0110_8_die_temp"; + }; + + channel@88e { + reg = <ADC5_GEN4_VPH_PWR(0, 8)>; + label = "pmh0110_8_vph_pwr"; + }; + + channel@2703 { + reg = <ADC5_GEN4_DIE_TEMP(1, 7)>; + label = "pmih0108_e1_die_temp"; + }; + + channel@278e { + reg = <ADC5_GEN4_VPH_PWR(1, 7)>; + label = "pmih0108_e1_vph_pwr"; + }; + + channel@278f { + reg = <ADC5_GEN4_VBAT_SNS_QBG(1, 7)>; + label = "pmih0108_e1_vbat_sns_qbg"; + }; + + channel@144 { + reg = <ADC5_GEN4_AMUX1_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_1"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@145 { + reg = <ADC5_GEN4_AMUX2_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_2"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@146 { + reg = <ADC5_GEN4_AMUX3_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_3"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@147 { + reg = <ADC5_GEN4_AMUX4_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_4"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@149 { + reg = <ADC5_GEN4_AMUX6_THM_100K_PU(0, 1)>; + label = "pmh0101_therm_5"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@2747 { + reg = <ADC5_GEN4_AMUX4_THM_100K_PU(1, 7)>; + label = "pmih0108_e1_therm_6"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; + + channel@274d { + reg = <ADC5_GEN4_AMUX4_GPIO_100K_PU(1, 7)>; + label = "pmih0108_e1_therm_7"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,adc-tm; + }; +}; + &pon_resin { linux,code = <KEY_VOLUMEDOWN>; -- 2.43.0