From 8f7fac657d039348735aead54c20aae75cb71aad Mon Sep 17 00:00:00 2001 From: Minghao Zhang Date: Wed, 21 Sep 2022 16:25:15 +0800 Subject: [PATCH 1/2] ARM: dts: qcom: enable fan controller for Kalama HHG Enable Fan Controller driver for Kalama HHG. Change-Id: Ic1bee1cb0a638c8707c982d8c818b853a43e1908 --- qcom/kalama-sg-hhg.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/qcom/kalama-sg-hhg.dtsi b/qcom/kalama-sg-hhg.dtsi index e5788eed..68227c70 100644 --- a/qcom/kalama-sg-hhg.dtsi +++ b/qcom/kalama-sg-hhg.dtsi @@ -89,6 +89,40 @@ status = "disabled"; }; +&pm8550_gpios { + pwr_en_gpio { + pwr_en_gpio_default: pwr_en_gpio_default { + pins = "gpio9"; + function = "normal"; + power-source = <0>; + output-low; + input-disable; + }; + }; + +}; + +&DBO3 { + /delete-property/ gpio; +}; + +&qupv3_hub_i2c2 { + status = "ok"; + + fancontroller: max31760@50 { + compatible = "maxim,max31760"; + reg = <0x50>; + #cooling-cells = <2>; + maxim,vdd-supply = <&L4N>; + maxim,vcca-supply = <&L15B>; + regulator-name = "maxim,vdd", "maxim,vcca"; + pinctrl-names = "default"; + pinctrl-0 = <&pwr_en_gpio_default>; + maxim,pwr-en-gpio = <&pm8550_gpios 9 GPIO_ACTIVE_LOW>; + status = "ok"; + }; +}; + &thermal_zones { cam-flash-therm { status = "disabled"; From 11f891b710f788c41e20aed0bf4d9096d59390c6 Mon Sep 17 00:00:00 2001 From: Minghao Zhang Date: Wed, 21 Sep 2022 16:29:02 +0800 Subject: [PATCH 2/2] ARM: dts: qcom: Add fan thermal mitigation rules on Kalama HHG Add thermal mitigation rules that are bound with fan as cooling device. Change-Id: I48d73ed961611f6ea4713695ab852039b2964d4d --- qcom/kalama-sg-hhg.dtsi | 116 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/qcom/kalama-sg-hhg.dtsi b/qcom/kalama-sg-hhg.dtsi index 68227c70..33857ccf 100644 --- a/qcom/kalama-sg-hhg.dtsi +++ b/qcom/kalama-sg-hhg.dtsi @@ -146,4 +146,120 @@ }; }; }; + + cpu-1-6 { + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + fan_cpu16_config0: fan-cpu16-config0 { + temperature = <95000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + fan_cdev_0 { + trip = <&fan_cpu16_config0>; + cooling-device = <&fancontroller 1 1>; + }; + }; + }; + + cpu-1-7 { + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + fan_cpu17_config0: fan-cpu17-config0 { + temperature = <95000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + fan_cdev_0 { + trip = <&fan_cpu17_config0>; + cooling-device = <&fancontroller 1 1>; + }; + }; + }; + + gpuss-0 { + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + fan_gpuss0_config0: fan-gpuss0-config0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + }; + + cooling-maps { + fan_cdev_0 { + trip = <&fan_gpuss0_config0>; + cooling-device = <&fancontroller 1 1>; + }; + }; + }; + + gpuss-1 { + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + fan_gpuss1_config0: fan-gpuss1-config0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + }; + + cooling-maps { + fan_cdev_0 { + trip = <&fan_gpuss1_config0>; + cooling-device = <&fancontroller 1 1>; + }; + }; + }; };