aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhupesh Sharma <bhupesh.sharma@linaro.org>2022-08-05 03:35:52 +0530
committerBhupesh Sharma <bhupesh.sharma@linaro.org>2022-09-13 12:01:29 +0530
commit00cc5bc9349245b2e716e912a695aeb4a6f80eee (patch)
treedca6d0e67b9e61d86a5cc31368e854b3dcdd0700
parent9b62b2706ae4e115ea6062cdacc46fe332d6609c (diff)
FROMLIST: dt-bindings: thermal: Add qcom,qmi-tmd-device and qcom,tmd-device yaml bindings
Add qcom,qmi-tmd-device and qcom,tmd-device yaml bindings. Qualcomm QMI based TMD cooling device(s) are used for various mitigations for remote subsystem(s) including remote processor mitigation, rail voltage restriction etc. Each child node represents one remote subsystem and each child of this subsystem in-turn represents separate TMD cooling device. Cc: daniel.lezcano@linaro.org Cc: rafael@kernel.org Cc: andersson@kernel.org Cc: robh@kernel.org Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> (am from https://lore.kernel.org/linux-arm-msm/20220912085049.3517140-4-bhupesh.sharma@linaro.org/) Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
-rw-r--r--Documentation/devicetree/bindings/thermal/qcom,qmi-tmd-device.yaml78
-rw-r--r--Documentation/devicetree/bindings/thermal/qcom,tmd-device.yaml122
-rw-r--r--include/dt-bindings/thermal/qcom,tmd.h14
3 files changed, 214 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/thermal/qcom,qmi-tmd-device.yaml b/Documentation/devicetree/bindings/thermal/qcom,qmi-tmd-device.yaml
new file mode 100644
index 000000000000..dfda5b611a93
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/qcom,qmi-tmd-device.yaml
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/thermal/qcom,qmi-tmd-device.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm QMI based thermal mitigation (TMD) cooling devices.
+
+maintainers:
+ - Bhupesh Sharma <bhupesh.sharma@linaro.org>
+
+description:
+ Qualcomm QMI based TMD cooling device(s) are used for various
+ mitigations for remote subsystem(s) including remote processor
+ mitigation, rail voltage restriction etc.
+
+properties:
+ $nodename:
+ const: qmi-tmd-devices
+
+ compatible:
+ items:
+ - const: qcom,qmi-tmd-devices
+
+ modem0:
+ $ref: /schemas/thermal/qcom,tmd-device.yaml#
+
+ adsp:
+ $ref: /schemas/thermal/qcom,tmd-device.yaml#
+
+ cdsp:
+ $ref: /schemas/thermal/qcom,tmd-device.yaml#
+
+ slpi:
+ $ref: /schemas/thermal/qcom,tmd-device.yaml#
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/thermal/qcom,tmd.h>
+ qmi-tmd-devices {
+ compatible = "qcom,qmi-tmd-devices";
+
+ modem0 {
+ qcom,instance-id = <MODEM0_INSTANCE_ID>;
+
+ modem0_pa: tmd-device0 {
+ label = "pa";
+ #cooling-cells = <2>;
+ };
+
+ modem0_proc: tmd-device1 {
+ label = "modem";
+ #cooling-cells = <2>;
+ };
+
+ modem0_current: tmd-device2 {
+ label = "modem_current";
+ #cooling-cells = <2>;
+ };
+
+ modem0_skin: tmd-device3 {
+ label = "modem_skin";
+ #cooling-cells = <2>;
+ };
+
+ modem0_vdd: tmd-device4 {
+ label = "cpuv_restriction_cold";
+ #cooling-cells = <2>;
+ };
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/thermal/qcom,tmd-device.yaml b/Documentation/devicetree/bindings/thermal/qcom,tmd-device.yaml
new file mode 100644
index 000000000000..38ac62f03376
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/qcom,tmd-device.yaml
@@ -0,0 +1,122 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/thermal/qcom,tmd-device.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm thermal mitigation (TMD) cooling devices
+
+maintainers:
+ - Bhupesh Sharma <bhupesh.sharma@linaro.org>
+
+description:
+ Qualcomm thermal mitigation (TMD) cooling devices. Each child node
+ represents one remote subsystem and each child of this subsystem in-turn
+ represents separate cooling devices.
+
+properties:
+ $nodename:
+ pattern: "^(modem|adsp|cdsp|slpi[0-9])?$"
+
+ qcom,instance-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Remote subsystem QMI server instance id to be used for communicating with QMI.
+
+patternProperties:
+ "^tmd-device[0-9]?$":
+ type: object
+ description:
+ Subnodes indicating tmd cooling device of a specific category.
+ properties:
+ label:
+ maxItems: 1
+ description: |
+ Remote subsystem device identifier. Acceptable device names -
+ "pa" -> for pa cooling device,
+ "cpuv_restriction_cold" -> for vdd restriction,
+ "cx_vdd_limit" -> for vdd limit,
+ "modem" -> for processor passive cooling device,
+ "modem_current" -> for current limiting device,
+ "modem_bw" -> for bus bandwidth limiting device,
+ "cpr_cold" -> for cpr restriction.
+
+ "#cooling-cells":
+ const: 2
+
+ required:
+ - label
+ - "#cooling-cells"
+
+ additionalProperties: false
+
+required:
+ - qcom,instance-id
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/thermal/qcom,tmd.h>
+ modem0 {
+ qcom,instance-id = <MODEM0_INSTANCE_ID>;
+
+ modem0_pa: tmd-device0 {
+ label = "pa";
+ #cooling-cells = <2>;
+ };
+
+ modem0_proc: tmd-device1 {
+ label = "modem";
+ #cooling-cells = <2>;
+ };
+
+ modem0_current: tmd-device2 {
+ label = "modem_current";
+ #cooling-cells = <2>;
+ };
+
+ modem0_skin: tmd-device3 {
+ label = "modem_skin";
+ #cooling-cells = <2>;
+ };
+
+ modem0_vdd: tmd-device4 {
+ label = "cpuv_restriction_cold";
+ #cooling-cells = <2>;
+ };
+ };
+
+ - |
+ #include <dt-bindings/thermal/qcom,tmd.h>
+ adsp {
+ qcom,instance-id = <ADSP_INSTANCE_ID>;
+
+ adsp_vdd: tmd-device1 {
+ label = "cpuv_restriction_cold";
+ #cooling-cells = <2>;
+ };
+ };
+
+ - |
+ #include <dt-bindings/thermal/qcom,tmd.h>
+ cdsp {
+ qcom,instance-id = <CDSP_INSTANCE_ID>;
+
+ cdsp_vdd: tmd-device1 {
+ label = "cpuv_restriction_cold";
+ #cooling-cells = <2>;
+ };
+ };
+
+ - |
+ #include <dt-bindings/thermal/qcom,tmd.h>
+ slpi {
+ qcom,instance-id = <SLPI_INSTANCE_ID>;
+
+ slpi_vdd: tmd-device1 {
+ label = "cpuv_restriction_cold";
+ #cooling-cells = <2>;
+ };
+ };
diff --git a/include/dt-bindings/thermal/qcom,tmd.h b/include/dt-bindings/thermal/qcom,tmd.h
new file mode 100644
index 000000000000..5ede4422e04e
--- /dev/null
+++ b/include/dt-bindings/thermal/qcom,tmd.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * This header provides constants for the Qualcomm TMD instances.
+ */
+
+#ifndef _DT_BINDINGS_THERMAL_QCOM_TMD_H_
+#define _DT_BINDINGS_THERMAL_QCOM_TMD_H_
+
+#define MODEM0_INSTANCE_ID 0x0
+#define ADSP_INSTANCE_ID 0x1
+#define CDSP_INSTANCE_ID 0x43
+#define SLPI_INSTANCE_ID 0x53
+
+#endif