From 4926cbe57b1a5a3545f5a71053de266e729a4c83 Mon Sep 17 00:00:00 2001 From: Priyansh Jain Date: Tue, 22 Feb 2022 11:51:27 +0530 Subject: [PATCH 1/2] dt-bindings: thermal: Add snapshot of limits stats driver Add dt-bindings for limits stats driver which is used to collect stats. Change-Id: I8c03269fb4fb03e921725610c0623b854ba772f7 --- bindings/thermal/qcom-limits-stat.txt | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 bindings/thermal/qcom-limits-stat.txt diff --git a/bindings/thermal/qcom-limits-stat.txt b/bindings/thermal/qcom-limits-stat.txt new file mode 100644 index 00000000..99199667 --- /dev/null +++ b/bindings/thermal/qcom-limits-stat.txt @@ -0,0 +1,55 @@ +Limits stats Driver + +Limits stats driver is used to collect stats. It collects CPU average and peak +current, CPUs online mask, CPUs Load percentage, CPU temperature, BCL levels, +PE current, PE thresholds etc.. + + +Properties: + +- compatible: + Usage: required + Value type: + Definition: shall be "qcom,limits-stat" + +- reg: + Usage: optional + Value type: + Definition: where 'a' is the starting register address of the RDPM PE + HW block and 'b' is the size of RDPM PE address space. + +- reg-names: + Usage: optional + Value type: + Definition: user defined names for the register set. These + register names will be used by the drivers to identify the + RDPM PE HW block. + "rdpm_pe_mx", + "rdpm_pe_cx", + +-qcom,limits-stat-sensor-names + Usage: required + Value type: + Definition: This contains list of sensors which needs to be + monitored as part of limits stat collection. + +Example: + + limits_stat: limits-stat { + compatible = "qcom,limits-stat"; + reg = <0x637000 0x1000>; + reg-names = "rdpm_pe_mx"; + qcom,limits-stat-sensor-names = "cpu-0-0", + "cpu-0-1", + "cpu-0-2", + "cpu-0-3", + "cpu-1-0", + "cpu-1-1", + "cpu-1-2", + "cpu-1-3", + "gpuss-0", + "gpuss-1", + "nspss-0"; + "nspss-1"; + "nspss-2"; + }; From 60d8d35ba108a731f965b297daaab46307b16bcc Mon Sep 17 00:00:00 2001 From: Priyansh Jain Date: Mon, 21 Feb 2022 08:09:45 +0530 Subject: [PATCH 2/2] ARM: dts: qcom: Add devicetree node for limits_stat driver in kalama Add devicetree node for limits_stat driver. Add tsens list for stats collection. Change-Id: Ifd40aee88eb81f1c8b23bd5dffe30f0499282197 --- qcom/kalama-thermal.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/qcom/kalama-thermal.dtsi b/qcom/kalama-thermal.dtsi index 035d392f..92d776f6 100644 --- a/qcom/kalama-thermal.dtsi +++ b/qcom/kalama-thermal.dtsi @@ -235,6 +235,23 @@ compatible = "qcom,cpufreq-cdev"; qcom,cpus = <&CPU0 &CPU3 &CPU7>; }; + + limits_stat: limits-stat { + compatible = "qcom,limits-stat"; + qcom,limits-stat-sensor-names = "cpu-0-0", + "cpu-0-1", + "cpu-0-2", + "cpu-1-0", + "cpu-1-1", + "cpu-1-2", + "cpu-1-3", + "cpu-1-4", + "gpuss-0", + "gpuss-1", + "nspss-0", + "nspss-1", + "nspss-2"; + }; }; #include "kalama-thermal-modem.dtsi"