From 703a58ef87b412ddd481b28ac9017b0d7caa6f73 Mon Sep 17 00:00:00 2001 From: Manaf Meethalavalappu Pallikunhi Date: Mon, 24 May 2021 23:48:52 +0530 Subject: [PATCH 1/2] dt-bindings: Add snapshot of CX Ipeak cooling device devicetree binding Add snapshot of CX Ipeak devicetree binding to the devicetree project. This snapshot is taken as of 'commit <829fee7bd3d86> ("driver: thermal: Update CX Ipeak driver to support CX Ipeak v1.1 hardware")' of the msm-4.14 kernel project. Change-Id: Ib661ebdfe21207f8e119819a870cbb0f459e290c --- bindings/thermal/qcom,cx-ipeak-cdev.txt | 53 +++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 bindings/thermal/qcom,cx-ipeak-cdev.txt diff --git a/bindings/thermal/qcom,cx-ipeak-cdev.txt b/bindings/thermal/qcom,cx-ipeak-cdev.txt new file mode 100644 index 000000000000..562cc6e5f5d3 --- /dev/null +++ b/bindings/thermal/qcom,cx-ipeak-cdev.txt @@ -0,0 +1,53 @@ +Qualcomm Technologies, Inc. CX Peak current cooling device + +The CX IPEAK cooling device, will be used to set thermal client vote to +CX IPEAK LM hardware. When all pre-defined clients on CX rail including +thermal client set their vote, CXIP LM hardware throttles pre-defined +client on the same rail. + +Required Parameters: +- compatible: + Usage: required + Value type: + Definition: should be "qcom,cxip-lm-cooling-device" + +- reg: + Usage: required + Value type: + Definition: Must contain 2 variables where 'a' is the starting + register address of the CX IPEAK LM hardware and 'b' is the + size of the peripheral address space. + +- qcom,thermal-client-offset: + Usage: Optional + Value type: + Definition: This property is required for CX IP LM v1.1 and above + hardware. Must contain offset from CX IPEAK LM reg + base for thermal client voting. If this property is not defined, + then CX IPEAK cooling device will use legacy CXIP LM hardware + offset registers. + +- qcom,bypass-client-list: + Usage: Optional + Value type: + Definition: This property is required for CX IP LM v1.1 and above + hardware. Must contain array of offsets from CX IPEAK LM reg + base for clients those are not participating voting to CXIP LM + hardware. This property makes sense only when thermal-client + is defined. + +- #cooling-cells: + Usage: required + Value type: + Definition: Must be 2. This is required by of-thermal and refer the doc + for more details. + +Example: + + cxip_cdev: cxip-cdev@1fed000 { + compatible = "qcom,cxip-lm-cooling-device"; + reg = <0x1fed000 0x24>; + qcom,thermal-client-offset = <0x8000>; + qcom,bypass-client-list = <0x2004 0x3004>; + #cooling-cells = <2>; + }; From 73fd2518f15cd3239e4b50a43656019111552acf Mon Sep 17 00:00:00 2001 From: Manaf Meethalavalappu Pallikunhi Date: Tue, 25 May 2021 21:52:18 +0530 Subject: [PATCH 2/2] ARM: dts: qcom: Enable cx ipeak cooling device configuration for holi Enable cx ipeak cooling device configuration for holi target and disable device status by default. Change-Id: I2eaa347b06c40c974e24f1fc083f62d5b6324340 --- qcom/holi-thermal.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/qcom/holi-thermal.dtsi b/qcom/holi-thermal.dtsi index 3055d38c3777..958f6b7d74b7 100644 --- a/qcom/holi-thermal.dtsi +++ b/qcom/holi-thermal.dtsi @@ -62,6 +62,16 @@ }; }; }; + + cxip_cdev: cxip-cdev@3ed000 { + compatible = "qcom,cxip-lm-cooling-device"; + reg = <0x3ed000 0xe008>; + qcom,thermal-client-offset = <0x8000>; + /* 4th and 5th offsets to bypass VICTIM1 */ + qcom,bypass-client-list = <0x2004 0x4004 0x6004 0xc004 0xc008 0xe004>; + #cooling-cells = <2>; + status = "disabled"; + }; }; &rpm_bus { @@ -1083,6 +1093,12 @@ type = "passive"; }; + q6_hvx_cxip: q6-hvx-cxip-trip { + temperature = <95000>; + hysteresis = <20000>; + type = "passive"; + }; + q6_hvx_cx_mon: q6-hvx-cx-mon { temperature = <100000>; hysteresis = <5000>; @@ -1097,6 +1113,11 @@ THERMAL_NO_LIMIT>; }; + q6-hvx-cxip-cdev { + trip = <&q6_hvx_cxip>; + cooling-device = <&cxip_cdev 1 1>; + }; + q6-hvx-cx-cdev0 { trip = <&q6_hvx_cx_mon>; /* throttle to 565000000Hz */