From 1ef73746960e6d77ca81b41b18e8cb8c162cbaab Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Tue, 9 Feb 2021 10:40:23 -0800 Subject: [PATCH 1/4] ARM: dts: msm: enable cpu voltage cooling device for waipio Enable CPU voltage cooling device for Waipio. This will enable mitigating the APC1 cluster. Change-Id: Iee269675551eec2068e1baa6c498cf45f5d9a9bf --- qcom/waipio-thermal.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qcom/waipio-thermal.dtsi b/qcom/waipio-thermal.dtsi index 1c634e69..11dad376 100644 --- a/qcom/waipio-thermal.dtsi +++ b/qcom/waipio-thermal.dtsi @@ -64,6 +64,14 @@ #cooling-cells = <2>; }; }; + + qcom,cpu-voltage-cdev { + compatible = "qcom,cc-cooling-devices"; + apc1_cluster: qcom,apc1-cluster { + qcom,cpus = <&CPU4 &CPU7>; + #cooling-cells = <2>; + }; + }; }; &thermal_zones { From f34e6fb4c7c18706ed273952becb1f59a83b947f Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Tue, 9 Feb 2021 13:38:55 -0800 Subject: [PATCH 2/4] ARM: dts: msm: Add LMH DCVS driver configuration for waipio Enable LMH DCVSh driver for waipio. The configuration will enable the driver to place a regulator vote for Qrefs regulators. Change-Id: Iaa3b1e40338da0c4d6003f1e2c39528889a30b95 --- qcom/waipio-regulators.dtsi | 38 +++++++++++++++++++++++++++++++++++++ qcom/waipio-thermal.dtsi | 8 ++++++++ 2 files changed, 46 insertions(+) diff --git a/qcom/waipio-regulators.dtsi b/qcom/waipio-regulators.dtsi index 6e12dab9..23930850 100644 --- a/qcom/waipio-regulators.dtsi +++ b/qcom/waipio-regulators.dtsi @@ -361,6 +361,25 @@ qcom,init-voltage = <880000>; qcom,init-mode = ; }; + + L5B_AO: pm8350_l5_ao: regulator-pm8350-l5-ao { + regulator-name = "pm8350_l5_ao"; + qcom,set = ; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + qcom,init-voltage = <880000>; + qcom,init-mode = ; + }; + + regulator-pm8350-l5-so { + regulator-name = "pm8350_l5_so"; + qcom,set = ; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + qcom,init-voltage = <880000>; + qcom,init-mode = ; + qcom,init-enable = <0>; + }; }; rpmh-regulator-ldob6 { @@ -379,6 +398,25 @@ qcom,init-voltage = <1200000>; qcom,init-mode = ; }; + + L6B_AO: pm8350_l6_ao: regulator-pm8350-l6-ao { + regulator-name = "pm8350_l6_ao"; + qcom,set = ; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + qcom,init-voltage = <1200000>; + qcom,init-mode = ; + }; + + regulator-pm8350-l6-so { + regulator-name = "pm8350_l6_so"; + qcom,set = ; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + qcom,init-voltage = <1200000>; + qcom,init-mode = ; + qcom,init-enable = <0>; + }; }; rpmh-regulator-ldob7 { diff --git a/qcom/waipio-thermal.dtsi b/qcom/waipio-thermal.dtsi index 11dad376..fda82a5d 100644 --- a/qcom/waipio-thermal.dtsi +++ b/qcom/waipio-thermal.dtsi @@ -72,6 +72,14 @@ #cooling-cells = <2>; }; }; + + qcom,limits-dcvs { + compatible = "qcom,msm-hw-limits"; + isens_vref_0p8-supply = <&pm8350_l5_ao>; + isens-vref-0p8-settings = <880000 880000 30000>; + isens_vref_1p8-supply = <&pm8350_l6_ao>; + isens-vref-1p8-settings = <1200000 1200000 8000>; + }; }; &thermal_zones { From 98b848af31938d764c769660d7c3ac03f140048d Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Tue, 9 Feb 2021 13:23:00 -0800 Subject: [PATCH 3/4] dt-bindings: Add a property to fetch DDR bandwidth table Add a new property qcom,freq-table to fetch the supported DDR bandwidth table. Change-Id: I7fad3dacc70dafa9ba8800bf638655f8583bd5f4 --- bindings/thermal/qti-ddr-cdev.txt | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/bindings/thermal/qti-ddr-cdev.txt b/bindings/thermal/qti-ddr-cdev.txt index c081531b..473526f8 100644 --- a/bindings/thermal/qti-ddr-cdev.txt +++ b/bindings/thermal/qti-ddr-cdev.txt @@ -12,10 +12,10 @@ Properties: Definition: should be "qcom,ddr-cooling-device" Cooling device node: -- qcom,ddr-freq: +- qcom,freq-table: Usage: required - Value type: - Definition: List of available DDR frequencies. + Value type: + Definition: phandle to the list of available DDR frequencies. -#cooling-cells: Usage: required @@ -24,19 +24,18 @@ Cooling device node: identifier. Please refer to for more details. + +- interconnects: + Usage: required + Definition: Pairs of phandles and interconnect provider specificers + to denote the edge source and destination ports of + the desired interconnect path. Please refer to + + for more details. Example: qcom,ddr-cdev { compatible = "qcom,ddr-cooling-device"; - qcom,ddr-freq = <200000>, - <451000>, - <547000>, - <681000>, - <768000>, - <1017000>, - <1555000>, - <1708000>, - <2092000>, - <2736000>, - <3196000>; + qcom,freq-table = <&ddr_freq_table>; #cooling-cells = <2>; + interconnects = <&mc_virt MASTER_LLCC &mc_virt SLAVE_EBI1>; }; From 7e96e3375670ae0f984b486aa503866b672ad1af Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Tue, 9 Feb 2021 13:24:21 -0800 Subject: [PATCH 4/4] ARM: dts: msm: Enable DDR cooling device for waipio Enable DDR cooling device for waipio. This cooling device can vote for DDR bandwidth under thermal conditions. Change-Id: I60d25ceedab3dcafe5f1346a4890c6f6448206ad --- qcom/waipio-thermal.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qcom/waipio-thermal.dtsi b/qcom/waipio-thermal.dtsi index fda82a5d..5bc3b37e 100644 --- a/qcom/waipio-thermal.dtsi +++ b/qcom/waipio-thermal.dtsi @@ -73,6 +73,13 @@ }; }; + ddr_cdev: qcom,ddr-cdev { + compatible = "qcom,ddr-cooling-device"; + #cooling-cells = <2>; + qcom,freq-table = <&ddr_freq_table>; + interconnects = <&mc_virt MASTER_LLCC &mc_virt SLAVE_EBI1>; + }; + qcom,limits-dcvs { compatible = "qcom,msm-hw-limits"; isens_vref_0p8-supply = <&pm8350_l5_ao>;