Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ properties:
and devices related to the ADSP.
unevaluatedProperties: false

cooling:
$ref: /schemas/thermal/qcom,qmi-cooling.yaml#
description:
Cooling subnode which represents the cooling devices exposed by the Modem.
unevaluatedProperties: false

required:
- clocks
- clock-names
Expand Down
99 changes: 99 additions & 0 deletions Documentation/devicetree/bindings/thermal/qcom,qmi-cooling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2023 (c), Linaro Limited

%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/qcom,qmi-cooling.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm QMI based thermal mitigation (TMD) cooling devices.

maintainers:
- Caleb Connolly <caleb.connolly@linaro.org>
- Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>

description:
Qualcomm QMI-based TMD cooling devices are used to mitigate thermal conditions
across multiple remote subsystems. These devices operate based on junction temperature
sensors (TSENS) associated with thermal zones for each subsystem.

Each subnode corresponds to a control interface for a single instance of the TMD
service running on a remote subsystem.

definitions:
tmd:
type: object
description: |
A single Thermal Mitigation Device exposed by a remote subsystem.
properties:
label:
maxItems: 1
"#cooling-cells":
$ref: /schemas/thermal/thermal-cooling-devices.yaml#/properties/#cooling-cells
phandle: true

required:
- label
- "#cooling-cells"

additionalProperties: false

properties:
compatible:
enum:
- qcom,qmi-cooling-modem
- qcom,qmi-cooling-cdsp

vdd:
$ref: "#/definitions/tmd"
description:
Modem processor temperature TMD
properties:
label:
const: modem

required:
- compatible

allOf:
- if:
properties:
compatible:
contains:
const: qcom,qmi-cooling-cdsp
then:
properties:
cdsp_sw:
$ref: "#/definitions/tmd"
description:
CDSP software TMD
properties:
label:
const: cdsp_sw

unevaluatedProperties: false

examples:
- |
remoteproc-cdsp {
cooling {
compatible = "qcom,qmi-cooling-cdsp";

cdsp_sw0: cdsp_sw {
label = "cdsp_sw";
#cooling-cells = <2>;
};
};
};

remoteproc-cdsp1 {
cooling {
compatible = "qcom,qmi-cooling-cdsp1";

cdsp_sw1: cdsp_sw {
label = "cdsp_sw";
#cooling-cells = <2>;
};
};
};
...
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -25924,6 +25924,14 @@ F: drivers/thermal/cpufreq_cooling.c
F: drivers/thermal/cpuidle_cooling.c
F: include/linux/cpu_cooling.h

THERMAL/REMOTEPROC_COOLING
M: Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>
L: linux-pm@vger.kernel.org
S: Supported
F: drivers/thermal/remoteproc_cooling.c
F: include/linux/remoteproc_cooling.h


THERMAL/POWER_ALLOCATOR
M: Lukasz Luba <lukasz.luba@arm.com>
L: linux-pm@vger.kernel.org
Expand Down
13 changes: 13 additions & 0 deletions drivers/soc/qcom/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ config QCOM_PMIC_GLINK
Say yes here to support USB-C and battery status on modern Qualcomm
platforms.

config QCOM_QMI_COOLING
tristate "Qualcomm QMI cooling drivers"
depends on QCOM_RPROC_COMMON
depends on ARCH_QCOM || COMPILE_TEST
select QCOM_QMI_HELPERS
help
This enables the remote subsystem cooling devices. These cooling
devices will be used by Qualcomm chipset to place various remote
subsystem mitigations like remote processor passive mitigation,
remote subsystem voltage restriction at low temperatures etc.
The QMI cooling device will interface with remote subsystem
using Qualcomm remoteproc interface.

config QCOM_QMI_HELPERS
tristate
depends on NET
Expand Down
1 change: 1 addition & 0 deletions drivers/soc/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ obj-$(CONFIG_QCOM_PMIC_GLINK) += pmic_glink.o
obj-$(CONFIG_QCOM_PMIC_GLINK) += pmic_glink_altmode.o
obj-$(CONFIG_QCOM_PMIC_PDCHARGER_ULOG) += pmic_pdcharger_ulog.o
CFLAGS_pmic_pdcharger_ulog.o := -I$(src)
obj-$(CONFIG_QCOM_QMI_COOLING) += qmi-cooling.o
obj-$(CONFIG_QCOM_QMI_HELPERS) += qmi_helpers.o
qmi_helpers-y += qmi_encdec.o qmi_interface.o
obj-$(CONFIG_QCOM_RAMP_CTRL) += ramp_controller.o
Expand Down
Loading