arm64: dts: qcom: Add PMIC thermal support for Shikra platforms
v2 cover arm64: dts: qcom: Add PMIC thermal support for Shikra platforms
This series adds the following:
- VADC and temp-alarm devices for PM4125 and temp-alarm device for PM8005 which are used for thermal mitigation on Shikra CQ2390M SoM platform
- ADC thermistor channels and thermal configurations for same on Shikra CQ2390M SoM
- ADC thermistor channels and their thermal configurations on Shikra IQ2390S SoM
---
Changes in v2:
- Move thermal zones to their respective PMIC files (PM4125, PM8005) as suggested by Dmitry Baryshkov
- Rename generic-adc-thermal bridge nodes to therm-bridge suffix (msm-therm-bridge, pa-therm-bridge, quiet-therm-bridge) as suggested by Dmitry Baryshkov
- Update commit messages accordingly
- Link to v1: https://patch.msgid.link/[email protected]
To: Bjorn Andersson <[email protected]>
To: Konrad Dybcio <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Jishnu Prakash (4):
arm64: dts: qcom: pm4125: Add VADC and temp alarm nodes
arm64: dts: qcom: pm8005: Add temp alarm node
arm64: dts: qcom: Add PMIC thermal support for Shikra CQ2390M SoM platform
arm64: dts: qcom: Add PMIC thermal support for Shikra IQ2390S SoM platform
arch/arm64/boot/dts/qcom/pm4125.dtsi | 105 +++++++++++++++++++++++ arch/arm64/boot/dts/qcom/pm8005.dtsi | 37 ++++++++ arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi | 123 +++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi | 113 ++++++++++++++++++++++++ 4 files changed, 378 insertions(+)
---
base-commit: ec039126b7fac4e3af35ebccaa7c6f9b6875ba81
change-id: 20260613-shikra_adc_support-0079650eb76c
prerequisite-message-id: [email protected]
prerequisite-patch-id: 3a689e8dda5fd2755b689d94d095806b3f2e6eed
prerequisite-patch-id: ac83151a889855498d36288ddd36216d451340c8
prerequisite-patch-id: 2357cac636e019eaf14d6a493a1c72bca56fe405
prerequisite-patch-id: 2885f299e711582da312ca9d13983d296a3dd5dc
prerequisite-patch-id: 91af5f3c01e766a53ce8de69aa21847a2d6bbbf8
Best regards,
Signature · 1 line
Jishnu Prakash <[email protected]>
PATCH v2 1/4 arm64: dts: qcom: pm4125: Add VADC and temp alarm nodes
Add VADC node with some channels under it, for voltage and temperature readings. Add temperature alarm node, used for PMIC thermal mitigation.
--- arch/arm64/boot/dts/qcom/pm4125.dtsi | 105 +++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+)
arch/arm64/boot/dts/qcom/pm4125.dtsi +105 -0
@@ -8,6 +8,36 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/spmi/spmi.h> +/ { + thermal-zones { + pm4125-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pm4125_tz>; + + trips { + pm4125_trip0: trip0 { + temperature = <105000>; + hysteresis = <0>; + type = "passive"; + }; + + pm4125_trip1: trip1 { + temperature = <125000>; + hysteresis = <0>; + type = "hot"; + }; + + pm4125_trip2: trip2 { + temperature = <155000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pmic@0 { compatible = "qcom,pm2250", "qcom,spmi-pmic";
@@ -65,6 +95,81 @@ pm4125_typec: typec@1500 { status = "disabled"; }; + pm4125_tz: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&pm4125_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + + pm4125_adc: adc@3100 { + compatible = "qcom,spmi-adc5"; + reg = <0x3100>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + + /* Channel nodes */ + channel@0 { + reg = <ADC5_REF_GND>; + label = "ref_gnd"; + qcom,pre-scaling = <1 1>; + }; + + channel@1 { + reg = <ADC5_1P25VREF>; + label = "vref_1p25"; + qcom,pre-scaling = <1 1>; + }; + + channel@6 { + reg = <ADC5_DIE_TEMP>; + label = "die_temp"; + qcom,pre-scaling = <1 1>; + }; + + channel@7 { + reg = <ADC5_USB_IN_I>; + label = "usb_in_i_uv"; + qcom,pre-scaling = <1 1>; + }; + + channel@8 { + reg = <ADC5_USB_IN_V_16>; + label = "usb_in_v_div_16"; + qcom,pre-scaling = <1 16>; + }; + + channel@9 { + reg = <ADC5_CHG_TEMP>; + label = "chg_temp"; + qcom,pre-scaling = <1 1>; + }; + + channel@4b { + reg = <ADC5_BAT_ID_100K_PU>; + label = "bat_id"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + channel@83 { + reg = <ADC5_VPH_PWR>; + label = "vph_pwr"; + qcom,pre-scaling = <1 3>; + }; + + channel@84 { + reg = <ADC5_VBAT_SNS>; + label = "vbat_sns"; + qcom,pre-scaling = <1 3>; + }; + }; + rtc@6000 { compatible = "qcom,pm8941-rtc"; reg = <0x6000>, <0x6100>;
Signature · 1 line
2.43.0
Re: [PATCH v2 1/4] arm64: dts: qcom: pm4125: Add VADC and temp alarm nodes
Quoted 16 lines · Jishnu Prakash
Add VADC node with some channels under it, for voltage and temperature readings. Add temperature alarm node, used for PMIC thermal mitigation.
Co-developed-by Rakesh Kota <[email protected]>Signed-off-by Rakesh Kota <[email protected]>Signed-off-by Jishnu Prakash <[email protected]>--- arch/arm64/boot/dts/qcom/pm4125.dtsi | 105 +++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+)arch/arm64/boot/dts/qcom/pm4125.dtsi +0
-0
arch/arm64/boot/dts/qcom/pm4125.dtsi line 15
Quoted 8 lines
arch/arm64/boot/dts/qcom/pm4125.dtsi +5
-0@@ -8,6 +8,36 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/spmi/spmi.h> +/ { + thermal-zones { + pm4125-thermal { + polling-delay-passive = <100>; + polling-delay = <0>;
=0 is the default, you can drop it
Konrad
PATCH v2 2/4 arm64: dts: qcom: pm8005: Add temp alarm node
In reply to Jishnu PrakashAdd temperature alarm node along with thermal zone used for PMIC thermal mitigation.
--- arch/arm64/boot/dts/qcom/pm8005.dtsi | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
arch/arm64/boot/dts/qcom/pm8005.dtsi +37 -0
@@ -4,6 +4,36 @@ #include <dt-bindings/spmi/spmi.h> #include <dt-bindings/interrupt-controller/irq.h> +/ { + thermal-zones { + pm8005-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8005_tz>; + + trips { + pm8005_trip0: trip0 { + temperature = <105000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8005_trip1: trip1 { + temperature = <125000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8005_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "passive"; + }; + }; + }; + }; +}; + &spmi_bus { pm8005_lsid0: pmic@4 { compatible = "qcom,pm8005", "qcom,spmi-pmic";
@@ -11,6 +41,13 @@ pm8005_lsid0: pmic@4 { #address-cells = <1>; #size-cells = <0>; + pm8005_tz: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pm8005_gpios: gpio@c000 { compatible = "qcom,pm8005-gpio", "qcom,spmi-gpio"; reg = <0xc000>;
Signature · 1 line
2.43.0
Re: [PATCH v2 2/4] arm64: dts: qcom: pm8005: Add temp alarm node
Quoted 15 lines · Jishnu Prakash
Add temperature alarm node along with thermal zone used for PMIC thermal mitigation.
Co-developed-by Rakesh Kota <[email protected]>Signed-off-by Rakesh Kota <[email protected]>Signed-off-by Jishnu Prakash <[email protected]>--- arch/arm64/boot/dts/qcom/pm8005.dtsi | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)arch/arm64/boot/dts/qcom/pm8005.dtsi +0
-0
arch/arm64/boot/dts/qcom/pm8005.dtsi line 11
Quoted 8 lines
arch/arm64/boot/dts/qcom/pm8005.dtsi +5
-0@@ -4,6 +4,36 @@ #include <dt-bindings/spmi/spmi.h> #include <dt-bindings/interrupt-controller/irq.h> +/ { + thermal-zones { + pm8005-thermal { + polling-delay-passive = <0>; + polling-delay = <0>;
Also here
Konrad
PATCH v2 3/4 arm64: dts: qcom: Add PMIC thermal support for Shikra CQ2390M SoM platform
In reply to Jishnu PrakashAdd ADC channels for pa, quiet and msm thermistors along with their ADC thermal bridge nodes and thermal zones for PMIC thermal mitigation.
--- arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi | 123 +++++++++++++++++++++++++++ 1 file changed, 123 insertions(+)
arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi +123 -0
@@ -4,6 +4,7 @@ */ #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/iio/qcom,spmi-vadc.h> #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> #include "shikra.dtsi"
@@ -27,9 +28,131 @@ key-volume-up { linux,can-disable; }; }; + + msm_therm_bridge: msm-therm-bridge { + compatible = "generic-adc-thermal"; + io-channels = <&pm4125_adc ADC5_AMUX_THM3_100K_PU>; + io-channel-names = "sensor-channel"; + #thermal-sensor-cells = <0>; + }; + + pa_therm_bridge: pa-therm-bridge { + compatible = "generic-adc-thermal"; + io-channels = <&pm4125_adc ADC5_AMUX_THM1_100K_PU>; + io-channel-names = "sensor-channel"; + #thermal-sensor-cells = <0>; + }; + + quiet_therm_bridge: quiet-therm-bridge { + compatible = "generic-adc-thermal"; + io-channels = <&pm4125_adc ADC5_AMUX_THM2_100K_PU>; + io-channel-names = "sensor-channel"; + #thermal-sensor-cells = <0>; + }; + + thermal-zones { + sys-1-thermal { + polling-delay-passive = <2000>; + polling-delay = <0>; + thermal-sensors = <&pa_therm_bridge>; + + trips { + active-config0 { + temperature = <80000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-2-thermal { + polling-delay-passive = <2000>; + polling-delay = <0>; + thermal-sensors = <&quiet_therm_bridge>; + + trips { + active-config0 { + temperature = <80000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + sys-3-thermal { + polling-delay-passive = <2000>; + polling-delay = <0>; + thermal-sensors = <&msm_therm_bridge>; + + trips { + active-config0 { + temperature = <80000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + }; +}; + +&pm4125_adc { + pinctrl-0 = <&pm4125_adc_gpio5_default>, <&pm4125_adc_gpio6_default>; + pinctrl-names = "default"; + + channel@4d { + reg = <ADC5_AMUX_THM1_100K_PU>; + label = "pa_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + channel@4e { + reg = <ADC5_AMUX_THM2_100K_PU>; + label = "quiet_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + channel@4f { + reg = <ADC5_AMUX_THM3_100K_PU>; + label = "msm_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + channel@54 { + reg = <ADC5_GPIO3_100K_PU>; + label = "chgr_skin"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + channel@55 { + reg = <ADC5_GPIO4_100K_PU>; + label = "gnss_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; }; &pm4125_gpios { + pm4125_adc_gpio5_default: pm4125-adc-gpio5-state { + pins = "gpio5"; + function = PMIC_GPIO_FUNC_NORMAL; + bias-high-impedance; + }; + + pm4125_adc_gpio6_default: pm4125-adc-gpio6-state { + pins = "gpio6"; + function = PMIC_GPIO_FUNC_NORMAL; + bias-high-impedance; + }; + vol_up_n: vol-up-n-state { pins = "gpio9"; function = PMIC_GPIO_FUNC_NORMAL;
Signature · 1 line
2.43.0
PATCH v2 4/4 arm64: dts: qcom: Add PMIC thermal support for Shikra IQ2390S SoM platform
In reply to Jishnu PrakashAdd ADC channels for system thermistors, used for thermal mitigation. Add ADC_TM nodes for pa/quiet/msm thermistors and also thermal zones for them.
--- arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi | 113 +++++++++++++++++++++++++++ 1 file changed, 113 insertions(+)
arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi +113 -0
@@ -4,6 +4,7 @@ */ #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/iio/qcom,spmi-vadc.h> #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> #include "shikra.dtsi"
@@ -26,9 +27,121 @@ key-volume-up { linux,can-disable; }; }; + + thermal-zones { + sys-1-thermal { + thermal-sensors = <&pm8150_adc_tm 0>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-2-thermal { + thermal-sensors = <&pm8150_adc_tm 1>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-3-thermal { + thermal-sensors = <&pm8150_adc_tm 2>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + }; +}; + +&pm8150_adc { + pinctrl-0 = <&pm8150_adc_gpio2_default>, <&pm8150_adc_gpio3_default>; + pinctrl-names = "default"; + + channel@4d { + reg = <ADC5_AMUX_THM1_100K_PU>; + label = "msm_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + channel@4e { + reg = <ADC5_AMUX_THM2_100K_PU>; + label = "quiet_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + channel@52 { + reg = <ADC5_GPIO1_100K_PU>; + label = "gnss_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + channel@55 { + reg = <ADC5_GPIO4_100K_PU>; + label = "pa_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; +}; + +&pm8150_adc_tm { + status = "okay"; + + pa-therm@0 { + reg = <0>; + io-channels = <&pm8150_adc ADC5_GPIO4_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; + + quiet-therm@1 { + reg = <1>; + io-channels = <&pm8150_adc ADC5_AMUX_THM2_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; + + msm-therm@2 { + reg = <2>; + io-channels = <&pm8150_adc ADC5_AMUX_THM1_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; }; &pm8150_gpios { + pm8150_adc_gpio2_default: pm8150-adc-gpio2-state { + pins = "gpio2"; + function = PMIC_GPIO_FUNC_NORMAL; + bias-high-impedance; + }; + + pm8150_adc_gpio3_default: pm8150-adc-gpio3-state { + pins = "gpio3"; + function = PMIC_GPIO_FUNC_NORMAL; + bias-high-impedance; + }; + vol_up_n: vol-up-n-state { pins = "gpio6"; function = PMIC_GPIO_FUNC_NORMAL;
Signature · 1 line
2.43.0