From cff8f8f0ef227fd17dbb8768754df8151f13d3ba Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 21 Sep 2023 17:37:59 -0700 Subject: [PATCH] ARM: dts: qcom: add TEMP_ALARM devices for PMICs used on Sun boards Add qcom-spmi-temp-alarm devices for the TEMP_ALARM and TEMP_ALARM_LITE PMIC peripherals found in PMICs PM8550VE_D, PM8550VE_G, PM8550VS_F, PM8550VS_J, PMIH010X, and PMD802X which are used on Sun boards. Each TEMP_ALARM device can monitor the die temperature of a particular PMIC. Change-Id: I3e29ec91f50a5c27d4a8e581c9c17ad3ae09d187 Signed-off-by: David Collins --- qcom/pm8550ve.dtsi | 70 ++++++++++++++++++++++++++++++++++++++ qcom/pm8550vs.dtsi | 70 ++++++++++++++++++++++++++++++++++++++ qcom/pmd802x.dtsi | 36 ++++++++++++++++++++ qcom/pmih010x.dtsi | 70 ++++++++++++++++++++++++++++++++++++++ qcom/sun-pmic-overlay.dtsi | 16 +++++++++ 5 files changed, 262 insertions(+) diff --git a/qcom/pm8550ve.dtsi b/qcom/pm8550ve.dtsi index 0a330b76..7949a4d6 100644 --- a/qcom/pm8550ve.dtsi +++ b/qcom/pm8550ve.dtsi @@ -19,6 +19,13 @@ #size-cells = <0>; status = "disabled"; + pm8550ve_d_tz: pm8550ve-d-temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x3 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pm8550ve_d_gpios: pinctrl@8800 { compatible = "qcom,pm8550ve-gpio"; reg = <0x8800>; @@ -36,6 +43,13 @@ #size-cells = <0>; status = "disabled"; + pm8550ve_g_tz: pm8550ve-g-temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x6 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pm8550ve_g_gpios: pinctrl@8800 { compatible = "qcom,pm8550ve-gpio"; reg = <0x8800>; @@ -72,6 +86,62 @@ }; &thermal_zones { + pm8550ve_d_temp_alarm: pm8550ve_d_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8550ve_d_tz>; + status = "disabled"; + + trips { + pm8550ve_d_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8550ve_d_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8550ve_d_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + pm8550ve_g_temp_alarm: pm8550ve_g_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8550ve_g_tz>; + status = "disabled"; + + trips { + pm8550ve_g_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8550ve_g_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8550ve_g_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + pm8550ve_i_temp_alarm: pm8550ve_i_tz { polling-delay-passive = <100>; polling-delay = <0>; diff --git a/qcom/pm8550vs.dtsi b/qcom/pm8550vs.dtsi index caf385b8..b9ea3123 100644 --- a/qcom/pm8550vs.dtsi +++ b/qcom/pm8550vs.dtsi @@ -91,6 +91,13 @@ #size-cells = <0>; status = "disabled"; + pm8550vs_f_tz: pm8550vs-f-temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x5 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pm8550vs_f_gpios: pinctrl@8800 { compatible = "qcom,pm8550vs-gpio"; reg = <0x8800>; @@ -132,6 +139,13 @@ #size-cells = <0>; status = "disabled"; + pm8550vs_j_tz: pm8550vs-j-temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x9 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pm8550vs_j_gpios: pinctrl@8800 { compatible = "qcom,pm8550vs-gpio"; reg = <0x8800>; @@ -228,6 +242,34 @@ }; }; + pm8550vs_f_temp_alarm: pm8550vs_f_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8550vs_f_tz>; + status = "disabled"; + + trips { + pm8550vs_f_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8550vs_f_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8550vs_f_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + pm8550vs_g_temp_alarm: pm8550vs_g_tz { polling-delay-passive = <100>; polling-delay = <0>; @@ -255,4 +297,32 @@ }; }; }; + + pm8550vs_j_temp_alarm: pm8550vs_j_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8550vs_j_tz>; + status = "disabled"; + + trips { + pm8550vs_j_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8550vs_j_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8550vs_j_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; }; diff --git a/qcom/pmd802x.dtsi b/qcom/pmd802x.dtsi index 5344b921..713b5661 100644 --- a/qcom/pmd802x.dtsi +++ b/qcom/pmd802x.dtsi @@ -18,6 +18,13 @@ #address-cells = <1>; #size-cells = <0>; + pmd802x_tz: pmd802x-temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pmd802x_gpios: pinctrl@8800 { compatible = "qcom,pmd802x-gpio"; gpio-controller; @@ -27,3 +34,32 @@ }; }; }; + +&thermal_zones { + pmd802x_temp_alarm: pmd802x_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pmd802x_tz>; + + trips { + pmd802x_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pmd802x_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + + pmd802x_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; +}; diff --git a/qcom/pmih010x.dtsi b/qcom/pmih010x.dtsi index f6aa7860..3d5e7aae 100644 --- a/qcom/pmih010x.dtsi +++ b/qcom/pmih010x.dtsi @@ -18,6 +18,20 @@ #address-cells = <1>; #size-cells = <0>; + pmih010x_tz: pmih010x-temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x7 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + + pmih010x_lite_tz: pmih010x-temp-alarm-lite@c00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xc00>; + interrupts = <0x7 0xc 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pmih010x_gpios: pinctrl@8800 { compatible = "qcom,pmih010x-gpio"; gpio-controller; @@ -27,3 +41,59 @@ }; }; }; + +&thermal_zones { + pmih010x_temp_alarm: pmih010x_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pmih010x_tz>; + + trips { + pmih010x_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pmih010x_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + + pmih010x_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + pmih010x_lite_temp_alarm: pmih010x_lite_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pmih010x_lite_tz>; + + trips { + pmih010x_lite_trip0: trip0 { + temperature = <125000>; + hysteresis = <0>; + type = "passive"; + }; + + pmih010x_lite_trip1: trip1 { + temperature = <135000>; + hysteresis = <0>; + type = "passive"; + }; + + pmih010x_lite_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; +}; diff --git a/qcom/sun-pmic-overlay.dtsi b/qcom/sun-pmic-overlay.dtsi index b7042010..1a6b7973 100644 --- a/qcom/sun-pmic-overlay.dtsi +++ b/qcom/sun-pmic-overlay.dtsi @@ -34,6 +34,22 @@ status = "ok"; }; +&pm8550vs_f_temp_alarm { + status = "ok"; +}; + +&pm8550vs_j_temp_alarm { + status = "ok"; +}; + +&pm8550ve_d_temp_alarm { + status = "ok"; +}; + +&pm8550ve_g_temp_alarm { + status = "ok"; +}; + &pm8550ve_i_temp_alarm { status = "ok"; };