diff options
author | Luca Weiss <luca.weiss@fairphone.com> | 2022-10-28 09:54:04 +0200 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2022-11-07 17:25:46 -0600 |
commit | 16c0c46f38183573de5361d278772cfed2090b1c (patch) | |
tree | 2f0b143481c96a48e0c87be9b8d00b83f2373644 /arch/arm64/boot/dts/qcom/pm6350.dtsi | |
parent | bcfefc98c5781ee97f1b7a8063870830d9e42b30 (diff) |
arm64: dts: qcom: pm6350: add temp sensor and thermal zone config
Add temp-alarm device tree node and a default configuration for the
corresponding thermal zone for this PMIC. Temperatures are based on
downstream values, except for trip2 where 125°C is used instead of 145°C
due to limitations without a configured ADC.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221028075405.124809-1-luca.weiss@fairphone.com
Diffstat (limited to 'arch/arm64/boot/dts/qcom/pm6350.dtsi')
-rw-r--r-- | arch/arm64/boot/dts/qcom/pm6350.dtsi | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/qcom/pm6350.dtsi b/arch/arm64/boot/dts/qcom/pm6350.dtsi index 18c14257e2c1..a58273664cef 100644 --- a/arch/arm64/boot/dts/qcom/pm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/pm6350.dtsi @@ -5,6 +5,37 @@ #include <dt-bindings/spmi/spmi.h> +/ { + thermal-zones { + pm6350-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + + thermal-sensors = <&pm6350_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "hot"; + }; + + trip2 { + temperature = <125000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pmic@0 { compatible = "qcom,pm6350", "qcom,spmi-pmic"; @@ -35,6 +66,13 @@ }; }; + pm6350_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pm6350_gpios: gpio@c000 { compatible = "qcom,pm6350-gpio", "qcom,spmi-gpio"; reg = <0xc000>; |