From d4c24ae6dcb6476b6e0e32867eafcbbfebd38ab6 Mon Sep 17 00:00:00 2001 From: Minghao Zhang Date: Wed, 28 Dec 2022 17:11:36 +0800 Subject: [PATCH] ARM: dts: qcom: Remove thermal zones that use fan cooling device on anorak Remove thermal zones that use fan cooling device; add cpu0-0-0 zone to make fan run at level 50; add a property to get fan quantity. Change-Id: I21cb10bfdb22ca3ab4799ec78334add45ec46734 --- qcom/anorak-pmic-overlay.dtsi | 2 +- qcom/anorak-thermal-overlay.dtsi | 86 ++------------------------------ 2 files changed, 6 insertions(+), 82 deletions(-) diff --git a/qcom/anorak-pmic-overlay.dtsi b/qcom/anorak-pmic-overlay.dtsi index 01e9c71b..2f8aa255 100644 --- a/qcom/anorak-pmic-overlay.dtsi +++ b/qcom/anorak-pmic-overlay.dtsi @@ -584,10 +584,10 @@ compatible = "maxim,max31760"; #cooling-cells = <2>; reg = <0x50>; + maxim,fan-num = <2>; pinctrl-names = "default"; pinctrl-0 = <&pwr_en_gpio_default &driver_en_gpio_default>; - maxim,driver-en-gpio = <&pm8550ve_f_gpios 5 GPIO_ACTIVE_LOW>; maxim,pwr-en-gpio = <&pm8550ve_f_gpios 6 GPIO_ACTIVE_LOW>; status = "ok"; diff --git a/qcom/anorak-thermal-overlay.dtsi b/qcom/anorak-thermal-overlay.dtsi index 21fd265a..122667a4 100644 --- a/qcom/anorak-thermal-overlay.dtsi +++ b/qcom/anorak-thermal-overlay.dtsi @@ -151,81 +151,10 @@ }; }; - sys-therm-1 { - cooling-maps { - fan_cdev_0 { - trip = <&fan_config0>; - cooling-device = <&fancontroller 3 3>; - }; - }; - }; - - nspss-1 { + cpu-0-0-0 { trips { - fan_nspss1_config0: fan-nspss1-config0 { - temperature = <80000>; - hysteresis = <0>; - type = "passive"; - }; - - fan_nspss1_config1: fan-nspss1-config1 { - temperature = <90000>; - hysteresis = <0>; - type = "passive"; - }; - }; - - cooling-maps { - fan_cdev_0 { - trip = <&fan_nspss1_config0>; - cooling-device = <&fancontroller 3 3>; - }; - - fan_cdev_1 { - trip = <&fan_nspss1_config1>; - cooling-device = <&fancontroller 4 4>; - }; - }; - }; - - gpuss-2 { - trips { - fan_gpuss2_config0: fan-gpuss0-config0 { - temperature = <70000>; - hysteresis = <0>; - type = "passive"; - }; - - fan_gpuss2_config1: fan-gpuss0-config1 { - temperature = <90000>; - hysteresis = <0>; - type = "passive"; - }; - }; - - cooling-maps { - fan_cdev_0 { - trip = <&fan_gpuss2_config0>; - cooling-device = <&fancontroller 3 3>; - }; - - fan_cdev_1 { - trip = <&fan_gpuss2_config0>; - cooling-device = <&fancontroller 4 4>; - }; - }; - }; - - cpu-1-1-0 { - trips { - fan_cpu110_config0: fan-cpu110-config0 { - temperature = <70000>; - hysteresis = <1000>; - type = "passive"; - }; - - fan_cpu110_config1: fan-cpu110-config1 { - temperature = <90000>; + fan_cpu000_config0: fan-cpu000-config0 { + temperature = <20000>; hysteresis = <1000>; type = "passive"; }; @@ -233,13 +162,8 @@ cooling-maps { fan_cdev_0 { - trip = <&fan_cpu110_config0>; - cooling-device = <&fancontroller 3 3>; - }; - - fan_cdev_1 { - trip = <&fan_cpu110_config1>; - cooling-device = <&fancontroller 4 4>; + trip = <&fan_cpu000_config0>; + cooling-device = <&fancontroller 50 50>; }; }; };