Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>
Cc: andersson@kernel.org, mathieu.poirier@linaro.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	rafael@kernel.org, daniel.lezcano@linaro.org,
	rui.zhang@intel.com, lukasz.luba@arm.com, konradybcio@kernel.org,
	amitk@kernel.org, mani@kernel.org, casey.connolly@linaro.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v1 4/8] thermal: qcom: add qmi-cooling driver
Date: Wed, 31 Dec 2025 08:33:03 +0200	[thread overview]
Message-ID: <68d70a3d-4443-4596-842a-e8a700b276eb@oss.qualcomm.com> (raw)
In-Reply-To: <f3013c96-673f-4a7c-8296-d4d7d0ec2a44@oss.qualcomm.com>

On 31/12/2025 08:28, Gaurav Kohli wrote:
> 
> On 12/24/2025 1:19 AM, Dmitry Baryshkov wrote:
>> On Tue, Dec 23, 2025 at 06:02:23PM +0530, Gaurav Kohli wrote:
>>> From: Casey Connolly <casey.connolly@linaro.org>
>>>
>>> The Thermal Mitigation Device (TMD) service exposes various platform
>>> specific thermal mitigations available on remote subsystems (ie the
>>> modem and cdsp). The service is exposed via the QMI messaging
>>> interface, usually over the QRTR transport.
>>>
>>> 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.
>>>
>>> Co-developed-by: Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>
>>> Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
>>> Signed-off-by: Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>
>>> ---
>>>   drivers/soc/qcom/Kconfig           |  13 +
>>>   drivers/soc/qcom/Makefile          |   1 +
>>>   drivers/soc/qcom/qmi-cooling.c     | 498 +++++++++++++++++++++++++++++
>>>   drivers/soc/qcom/qmi-cooling.h     | 428 +++++++++++++++++++++++++
>>>   drivers/thermal/qcom/qmi-cooling.h | 428 +++++++++++++++++++++++++
>>>   5 files changed, 1368 insertions(+)
>>>   create mode 100644 drivers/soc/qcom/qmi-cooling.c
>>>   create mode 100644 drivers/soc/qcom/qmi-cooling.h
>>>   create mode 100644 drivers/thermal/qcom/qmi-cooling.h
>>>
>>> diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
>>> index 2caadbbcf830..905a24b42fe6 100644
>>> --- a/drivers/soc/qcom/Kconfig
>>> +++ b/drivers/soc/qcom/Kconfig
>>> @@ -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
>>> diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile
>>> index b7f1d2a57367..b6728f54944b 100644
>>> --- a/drivers/soc/qcom/Makefile
>>> +++ b/drivers/soc/qcom/Makefile
>>> @@ -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
>>> diff --git a/drivers/soc/qcom/qmi-cooling.c b/drivers/soc/qcom/qmi- 
>>> cooling.c
>>> new file mode 100644
>>> index 000000000000..1a6afcb96bf6
>>> --- /dev/null
>>> +++ b/drivers/soc/qcom/qmi-cooling.c
>>> @@ -0,0 +1,498 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>> +/*
>>> + * Copyright (c) 2017, The Linux Foundation
>>> + * Copyright (c) 2025, Linaro Limited
>>> + *
>>> + * QMI Thermal Mitigation Device (TMD) client driver.
>>> + * This driver provides an in-kernel client to handle hot and cold 
>>> thermal
>>> + * mitigations for remote subsystems (modem and DSPs) running the 
>>> TMD service.
>>> + * It doesn't implement any handling of reports from remote subsystems.
>>> + */
>>> +
>>> +#include <linux/cleanup.h>
>>> +#include <linux/err.h>
>>> +#include <linux/module.h>
>>> +#include <linux/net.h>
>>> +#include <linux/of.h>
>>> +#include <linux/platform_device.h>
>>> +#include <linux/remoteproc/qcom_rproc.h>
>>> +#include <linux/remoteproc_cooling.h>
>>> +#include <linux/slab.h>
>>> +#include <linux/soc/qcom/qmi.h>
>>> +#include <linux/thermal.h>
>>> +
>>> +#include "qmi-cooling.h"
>>> +
>>> +#define MODEM0_INSTANCE_ID    0x0
>>> +#define ADSP_INSTANCE_ID    0x1
>>> +#define CDSP_INSTANCE_ID    0x43
>> Will CDSP1 also use instance ID? What are instance IDs for GPDSP?
> 
> 
> In Leman's there are two different cdsp subsytem, i will add new 
> instance id for that also.
> 
> What is GPdsp, you mean gpu ?
> 

No, I mean general purpose DSP aka GPDSP aka GDSP.

-- 
With best wishes
Dmitry

  reply	other threads:[~2025-12-31  6:33 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 12:32 [PATCH v1 0/8] Add RemoteProc cooling support Gaurav Kohli
2025-12-23 12:32 ` [PATCH v1 1/8] thermal: Add Remote Proc cooling driver Gaurav Kohli
2025-12-23 19:23   ` Dmitry Baryshkov
2025-12-24  8:20     ` Gaurav Kohli
2026-01-03 15:05   ` Bjorn Andersson
2026-01-05  5:18     ` Gaurav Kohli
2026-01-08 11:59   ` Zhongqiu Han
2026-01-29  5:40     ` Gaurav Kohli
2026-02-02 10:59   ` Lukasz Luba
2026-02-09  5:28     ` Gaurav Kohli
2026-02-09 10:21       ` Lukasz Luba
2025-12-23 12:32 ` [PATCH v1 2/8] remoteproc: qcom: probe all child devices Gaurav Kohli
2025-12-23 19:26   ` Dmitry Baryshkov
2026-01-03 14:56   ` Bjorn Andersson
2026-01-08  7:07     ` Gaurav Kohli
2026-01-23 13:53       ` Gaurav Kohli
2026-01-23 19:03         ` Dmitry Baryshkov
2026-01-27 16:12           ` Gaurav Kohli
2026-01-27 16:41             ` Dmitry Baryshkov
2026-01-28  9:39               ` Gaurav Kohli
2026-01-28  9:45                 ` Konrad Dybcio
2026-01-30  7:03                   ` Gaurav Kohli
2026-01-30  9:13                     ` Konrad Dybcio
2026-01-31  8:06                       ` Dmitry Baryshkov
2026-01-31 10:11                         ` Gaurav Kohli
2026-01-31 11:40                           ` Dmitry Baryshkov
2026-01-31 11:45                             ` Gaurav Kohli
2025-12-23 12:32 ` [PATCH v1 3/8] dt-bindings: thermal: Add qcom,qmi-cooling yaml bindings Gaurav Kohli
2025-12-23 13:59   ` Rob Herring (Arm)
2025-12-24  8:20     ` Gaurav Kohli
2025-12-23 19:30   ` Dmitry Baryshkov
2025-12-24  8:24     ` Gaurav Kohli
2025-12-24  9:31       ` Dmitry Baryshkov
2026-01-03 15:08       ` Bjorn Andersson
2025-12-23 19:52   ` Dmitry Baryshkov
2025-12-24  8:57   ` Krzysztof Kozlowski
2025-12-24 10:08     ` Gaurav Kohli
2025-12-24 10:24       ` Krzysztof Kozlowski
2025-12-31  6:42         ` Gaurav Kohli
2025-12-31  7:35           ` Krzysztof Kozlowski
2025-12-31  7:47           ` Dmitry Baryshkov
2025-12-31  7:52             ` Gaurav Kohli
2025-12-31  7:55               ` Dmitry Baryshkov
2025-12-24  9:02   ` Krzysztof Kozlowski
2025-12-31 11:59   ` Konrad Dybcio
2026-01-08  8:43     ` Gaurav Kohli
2025-12-23 12:32 ` [PATCH v1 4/8] thermal: qcom: add qmi-cooling driver Gaurav Kohli
2025-12-23 19:49   ` Dmitry Baryshkov
2025-12-31  6:28     ` Gaurav Kohli
2025-12-31  6:33       ` Dmitry Baryshkov [this message]
2025-12-24  9:01   ` Krzysztof Kozlowski
2025-12-31  6:32     ` Gaurav Kohli
2025-12-23 12:32 ` [PATCH v1 5/8] arm64: dts: qcom: Enable cdsp qmi tmd devices for lemans Gaurav Kohli
2025-12-23 19:32   ` Dmitry Baryshkov
2025-12-23 12:32 ` [PATCH v1 6/8] arm64: dts: qcom: Enable cdsp qmi tmd devices for talos Gaurav Kohli
2026-01-03 15:13   ` Bjorn Andersson
2025-12-23 12:32 ` [PATCH v1 7/8] arm64: dts: qcom: Enable cdsp qmi tmd devices for kodiak Gaurav Kohli
2026-01-03 15:14   ` Bjorn Andersson
2025-12-23 12:32 ` [PATCH v1 8/8] arm64: dts: qcom: Enable cdsp qmi tmd devices for monaco Gaurav Kohli
2025-12-24  8:58   ` Krzysztof Kozlowski
2025-12-24 10:11     ` Gaurav Kohli
2026-01-10 16:13 ` [PATCH v1 0/8] Add RemoteProc cooling support Casey Connolly
2026-01-13  9:33   ` Gaurav Kohli
2026-02-01 20:20     ` Trilok Soni
2026-02-02  9:53       ` Konrad Dybcio
2026-02-09 10:22         ` Gaurav Kohli
2026-02-09  5:33       ` Gaurav Kohli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68d70a3d-4443-4596-842a-e8a700b276eb@oss.qualcomm.com \
    --to=dmitry.baryshkov@oss.qualcomm.com \
    --cc=amitk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=casey.connolly@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gaurav.kohli@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=mani@kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox