From cebd8064b7a7fb22c62e664037031eeaa27d045d Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 9 Feb 2022 16:26:44 -0800 Subject: [PATCH] ARM: dts: qcom: add PM8550B TEMP_ALARM_LITE device for Kalama boards Add a qcom-spmi-temp-alarm device for the TEMP_ALARM_LITE peripheral found in the PM8550B PMIC. This secondary PMIC die temperature monitor is used to provide additional thermal protection to the chip. Change-Id: I6274ac557d07a93b802bcca5a305fdab7575f7fb --- qcom/kalama-pmic-overlay.dtsi | 5 +++++ qcom/pm8550b.dtsi | 34 ++++++++++++++++++++++++++++++++++ qcom/pmk8550.dtsi | 6 ++++++ 3 files changed, 45 insertions(+) diff --git a/qcom/kalama-pmic-overlay.dtsi b/qcom/kalama-pmic-overlay.dtsi index 37b7fb8b..d5adfa4e 100644 --- a/qcom/kalama-pmic-overlay.dtsi +++ b/qcom/kalama-pmic-overlay.dtsi @@ -95,6 +95,11 @@ io-channel-names = "thermal"; }; +&pm8550b_lite_tz { + io-channels = <&pmk8550_vadc PM8550B_ADC5_GEN3_TEMP_ALARM_LITE>; + io-channel-names = "thermal"; +}; + &pm8550vs_c_tz { io-channels = <&pmk8550_vadc PM8550VS_C_ADC5_GEN3_DIE_TEMP>; io-channel-names = "thermal"; diff --git a/qcom/pm8550b.dtsi b/qcom/pm8550b.dtsi index d994e80a..ac779325 100644 --- a/qcom/pm8550b.dtsi +++ b/qcom/pm8550b.dtsi @@ -21,6 +21,13 @@ #thermal-sensor-cells = <0>; }; + pm8550b_lite_tz: qcom,temp-alarm@c00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xc00>; + interrupts = <0x7 0xc 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pm8550b_gpios: pinctrl@8800 { compatible = "qcom,pm8550b-gpio"; reg = <0x8800>; @@ -204,6 +211,33 @@ }; }; + pm8550b_lite_temp_alarm: pm8550b_lite_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8550b_lite_tz>; + + trips { + trip0 { + temperature = <125000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <135000>; + hysteresis = <0>; + type = "critical"; + }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + pm8550b-ibat-lvl0 { polling-delay-passive = <0>; polling-delay = <0>; diff --git a/qcom/pmk8550.dtsi b/qcom/pmk8550.dtsi index 81d8b0de..ad6c16a9 100644 --- a/qcom/pmk8550.dtsi +++ b/qcom/pmk8550.dtsi @@ -163,6 +163,12 @@ qcom,pre-scaling = <1 1>; }; + pm8550b_lite_die_temp { + reg = ; + label = "pm8550b_lite_die_temp"; + qcom,pre-scaling = <1 1>; + }; + pm8550b_vph_pwr { reg = ; label = "pm8550b_vph_pwr";