Document the optional #cooling-cells property for Qualcomm PAS remoteproc nodes so they can be used as thermal cooling devices via the QMI Thermal Mitigation Device (TMD) interface.
Qualcomm remote processors expose TMD endpoints that support thermal throttling through firmware. The cooling-device specifier uses 3 cells: <&phandle device_id min_state max_state> where device_index selects the TMD endpoint (for example PA, modem, or CDSP software mitigation), with constants defined in: - dt-bindings/firmware/qcom,qmi-tmd.h Signed-off-by: Gaurav Kohli <[email protected]> --- .../bindings/remoteproc/qcom,pas-common.yaml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml index 4607b459131b..ef11371058c4 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml @@ -79,6 +79,14 @@ properties: channels and devices related to the ADSP. unevaluatedProperties: false + '#cooling-cells': + description: | + Cooling device with three cells: + Cell 0: Cooling device id + Cell 1: Minimum cooling state + Cell 2: Maximum cooling state + const: 3 + glink-edge: $ref: /schemas/remoteproc/qcom,glink-edge.yaml# description: @@ -95,3 +103,34 @@ required: - qcom,smem-state-names additionalProperties: true + +examples: + - | + #include <dt-bindings/thermal/thermal.h> + #include <dt-bindings/firmware/qcom,qmi-tmd.h> + + remoteproc: remoteproc { + #cooling-cells = <3>; + }; + + thermal-zones { + subsystem-thermal { + thermal-sensors = <&tsens 0>; + + trips { + alert: alert { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + }; + + cooling-maps { + map0 { + trip = <&alert>; + cooling-device = <&remoteproc QCOM_CDSP_TMD_CDSP_SW + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; -- 2.34.1

