From nobody Mon Feb 9 04:45:40 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A58CC35DD05 for ; Tue, 27 Jan 2026 15:57:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529469; cv=none; b=Y3n4CQ1YkANo/qH5vn2WF976IxJAOHKS/mVbagvqr3wVLI+1DqZcQGtDnHCrwi6THIbo6rr5pNAeyyRefPSTXfcZeWol+MtGUbTQtNart5abU5wo89YwH29FYHyb4RHT+2xr2KzYUK4QiOVRZdKXucdSQl5xxLZ7GKbhpYiFcjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529469; c=relaxed/simple; bh=YyaNXeWaLIKpWzCU/L/ILFdXN/+iun4frf5IkoJMhJ4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NdN5UST9P5ob5zef8P/2ND5QibLHu2Eo6hYsRT2V0blJSw6a2nuOnjse9EJzePLCWDphe1nGNE1xVtUI+kB/LbkE3PCQNAytkbXA1NJ2H3gMYLaQ9zAmRErovdH3Re1D5v0IeaPoi4PaYwQglYvjdNj+9wet+hQ6m/URUcY4QA4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=e2MEiGrY; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=NGt0XGFm; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="e2MEiGrY"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="NGt0XGFm" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RDlFeF658425 for ; Tue, 27 Jan 2026 15:57:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=5nar1uSCNy/ fyhypcdwInxOup3xqwfDAP5lnvImXQmk=; b=e2MEiGrYMzVHg7YLNP3oMczkud3 GomERdLlTL9e/zdasrlSxwni6xGMxXr0jaWX8wFaDuy677NeREJCVz3xiNv+Rfab MXB6Uh/FRD2G4V55i1DBkRx4kNG23GIw+Qsbb4WpO2uNNNXbrPGagZHjPfemBX0K l3v4bdceC8owTYTA3+tshUUORYcDgmhpes8+xtF4NbfeRWHq+juVBBYjC/nammJ7 ffgAiSFk29FEh/wXM91uTDAYgQLVzTQn8+NOJuuCOeVXPBUjIbWj0Tkr97zf5t4C fPr2P/9dc1UAASMKTasobnwyfsvATn7PLOjfxwO3gyKLEg2rKfpj6Cmq5Tg== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bxryn9ptm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 15:57:46 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-29f1f69eec6so55312935ad.1 for ; Tue, 27 Jan 2026 07:57:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769529466; x=1770134266; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5nar1uSCNy/fyhypcdwInxOup3xqwfDAP5lnvImXQmk=; b=NGt0XGFmucQoYulaecA6hWVSISy44oSTR30LqbQAdoFeMCOnr5JMfzbFuxNjTuW1f+ IhMJrAFmZSCffvkz9KEehKdKitoqMNbAbqT2SVM+r2RssBVzTNe3BHbQtBdEAN+3qEBt Wgc5UqHJfGIkQdzVyIT1jfYUYhxw3Pm7852PPWssOWw/TehYrqhfzLcpFeOm/217WlsM NM78hW6Rw3cYioL0uNXASgK+R8pkcIsZ2X+/hwZnsd9CWt27bwBj+GbpKSbIbwsgMHHN qJlGQjkFBad97UAvzZHTNsTedNBTRT4ibgoFcj/CYjSQA4dugMqus5gpKne77/f/gP1L uOKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769529466; x=1770134266; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5nar1uSCNy/fyhypcdwInxOup3xqwfDAP5lnvImXQmk=; b=sODkD8k9sdBBGhfMLIz8gdWsHzCokkVg5HpVes4ItgaKKlaOaz7kQATOVNUZgZKcc9 PLmDJRzLGRn0XwbdIPpmfnmwtVn0jceg9GuWZTdOnB3EKDcK6GtXO4cilyso+lQPCUmt 6IQnQngaHLnY0b8nLq3Lt+kTSgi5p9TF60zkS1YGstNUqwxu3DukMSG9eDSEj6VrLegL +nLz5tnctHeJMqx/NRoNnSRJaRu28WFbWtMkB9+FX+AitchG/EdxVwJ6/VAyn3YEeY+f If1S0GdV1B4epo7oy3jZp86NLyQhCiTTKrLK8Ra3F7Yr/fYdv7LqNZ7Qcq99UIc1eZgo 8eSQ== X-Forwarded-Encrypted: i=1; AJvYcCWQKMYEY78lVJnvqxOTiB3iqIo2VjlLhYXssCphcuqzkdQzlmso8RoH6VPAoQ3VQhk+AzSvJA4p+qX98aM=@vger.kernel.org X-Gm-Message-State: AOJu0Yz7OO6iAXMbdBTW3wgphqWJCRiVdih452/CE9G4KH1eXuDEc5sC UBUPxllTjvnKyrnWdSTULm5OZhv14oWdlkzvR0K08bhXaSXfVl3GJpa7+Xfgcn1a1voI1/T2I9v vP47zEc9K5AST3NyaI0j7pwc4BLFpez3y18IjMHq7o9iY/ahJj0cUDGb67kB7EVTaUuU= X-Gm-Gg: AZuq6aL6TpqPfQ7lqzlYAopSZ8YwvD8K0sMTiWeqMLN5Pmn/ykho3jrmfOal0bc4hHv 8Hq6tzfH0Njg9yyA14oNN3Frl3Zxr82JMjIwzxs64irSSOiRt05Yw1IaWa2NmvVVMwAuCsBxBed XzSrWX1CZBeGHWq5BUXGxCV2o4IIAUVdIsA3nGG+pi31Foj/M89rGX2nHCcSkrpShl5gxQriWId 9iqJdwr9xd2RY0yGrD1z6/pr5c8BfxrNzhi95mx2cTccZMNRYsspA/IWVdOj7zcFcDd5XOasYVK 46X7D52zK6tKU7RZOLijdwGMIcrQO/tMJwsxqvWPWsc+n2wI9Wh7+sTgmzRG+kp4YtgaoD68udD HFN4rFkw+rwPgOFwDcS0xdHtyBbc3+TUOWWWEsgE= X-Received: by 2002:a17:902:f68b:b0:2a1:243:94a8 with SMTP id d9443c01a7336-2a870ddd7b6mr26852485ad.49.1769529465600; Tue, 27 Jan 2026 07:57:45 -0800 (PST) X-Received: by 2002:a17:902:f68b:b0:2a1:243:94a8 with SMTP id d9443c01a7336-2a870ddd7b6mr26852185ad.49.1769529465015; Tue, 27 Jan 2026 07:57:45 -0800 (PST) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802ede745sm120577465ad.44.2026.01.27.07.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 07:57:44 -0800 (PST) From: Gaurav Kohli To: andersson@kernel.org, mathieu.poirier@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, konradybcio@kernel.org, mani@kernel.org, casey.connolly@linaro.org, amit.kucheria@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gaurav.kohli@oss.qualcomm.com, manaf.pallikunhi@oss.qualcomm.com Subject: [PATCH v2 1/8] thermal: Add Remote Proc cooling driver Date: Tue, 27 Jan 2026 21:27:15 +0530 Message-Id: <20260127155722.2797783-2-gaurav.kohli@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> References: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: XojSHQWxTVgQs8JLABkVuRaiM0BM8zu1 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMCBTYWx0ZWRfX0tqqftOQexjT 7RwCX95OOIhX3THP/pQju7SQSoC420ESX5p30PQwm6KNGzF0eGL+pxrot/Wg4yJ38vd4hlZfxn3 nJoIH4efocbH6mwTXLDfvmuMxBz7bNMugddNfibEaoBWEVWkIEFoN9IdyAusTu5xKEVJ5eS0hxj h15ejFHfDi5BA0FYrNetdt7sW8McCJhGucSVkBShEKfOFbGa1Ts9WWT+EsDXV4WW48Cg9GkyRG0 zHlmJbJr1dHbpZQWeA2KeYxZaN9+BwCyTi/yH0MOTjLbBxoy/NOVSaQw+F7YoHjAThz4Hn9MNX2 e8+SamC1a0D/HviQtecbVCsgn56Cx9Zs0r5fMPS6Qj9NZp9Lis/tEe65936OI0l4xeolII8isAS ybpYKv1L/EBhNjPoBfo5s/BnnRglbGn9MgRfBZdm1hAm4X7NnWgWwTczzFLiRHoHydo3Nde3MPU bmy6OZAAu6x76OuOswg== X-Proofpoint-GUID: XojSHQWxTVgQs8JLABkVuRaiM0BM8zu1 X-Authority-Analysis: v=2.4 cv=FsEIPmrq c=1 sm=1 tr=0 ts=6978e07a cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=7CQSdrXTAAAA:8 a=2qJnY-jACA4cO-adHyEA:9 a=uG9DUKGECoFWVXl0Dc02:22 a=a-qgeE7W1pNrGK8U0ZQC:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 suspectscore=0 impostorscore=0 bulkscore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270130 Content-Type: text/plain; charset="utf-8" Add a new generic driver for thermal cooling devices that control remote processors (modem, DSP, etc.) through various communication channels. This driver provides an abstraction layer between the thermal subsystem and vendor-specific remote processor communication mechanisms. Advantage of this to avoid duplicating vendor-specific logic in the thermal subsystem and make it easier for different vendors to plug in their own cooling mechanisms via callbacks. Suggested-by: Amit Kucheria Signed-off-by: Gaurav Kohli --- MAINTAINERS | 7 ++ drivers/thermal/Kconfig | 10 ++ drivers/thermal/Makefile | 2 + drivers/thermal/remoteproc_cooling.c | 143 +++++++++++++++++++++++++++ include/linux/remoteproc_cooling.h | 52 ++++++++++ 5 files changed, 214 insertions(+) create mode 100644 drivers/thermal/remoteproc_cooling.c create mode 100644 include/linux/remoteproc_cooling.h diff --git a/MAINTAINERS b/MAINTAINERS index 414f44093269..5ebc7819d2cf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -26169,6 +26169,13 @@ F: drivers/thermal/cpufreq_cooling.c F: drivers/thermal/cpuidle_cooling.c F: include/linux/cpu_cooling.h =20 +THERMAL/REMOTEPROC_COOLING +M: Gaurav Kohli +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 L: linux-pm@vger.kernel.org diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index b10080d61860..dfc52eed64de 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -229,6 +229,16 @@ config PCIE_THERMAL =20 If you want this support, you should say Y here. =20 +config REMOTEPROC_THERMAL + tristate "Remote processor cooling support" + help + This implements a generic cooling mechanism for remote processors + (modem, DSP, etc.) that allows vendor-specific implementations to + register thermal cooling devices and provide callbacks for thermal + mitigation. + + If you want this support, you should say Y here. + config THERMAL_EMULATION bool "Thermal emulation mode support" help diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index bb21e7ea7fc6..ae747dde54fe 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -34,6 +34,8 @@ thermal_sys-$(CONFIG_DEVFREQ_THERMAL) +=3D devfreq_coolin= g.o =20 thermal_sys-$(CONFIG_PCIE_THERMAL) +=3D pcie_cooling.o =20 +thermal_sys-$(CONFIG_REMOTEPROC_THERMAL) +=3D remoteproc_cooling.o + obj-$(CONFIG_K3_THERMAL) +=3D k3_bandgap.o k3_j72xx_bandgap.o # platform thermal drivers obj-y +=3D broadcom/ diff --git a/drivers/thermal/remoteproc_cooling.c b/drivers/thermal/remotep= roc_cooling.c new file mode 100644 index 000000000000..f958efa691b3 --- /dev/null +++ b/drivers/thermal/remoteproc_cooling.c @@ -0,0 +1,143 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Remote Processor Cooling Device + * + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define REMOTEPROC_PREFIX "rproc_" + +struct remoteproc_cooling_ops { + int (*get_max_level)(void *devdata, unsigned long *level); + int (*get_cur_level)(void *devdata, unsigned long *level); + int (*set_cur_level)(void *devdata, unsigned long level); +}; + +/** + * struct remoteproc_cdev - Remote processor cooling device + * @cdev: Thermal cooling device handle + * @ops: Vendor-specific operation callbacks + * @devdata: Private data for vendor implementation + * @np: Device tree node associated with this cooling device + * @lock: Mutex to protect cooling device operations + */ +struct remoteproc_cdev { + struct thermal_cooling_device *cdev; + const struct remoteproc_cooling_ops *ops; + void *devdata; + struct mutex lock; +}; + +/* Thermal cooling device callbacks */ + +static int remoteproc_get_max_state(struct thermal_cooling_device *cdev, + unsigned long *state) +{ + struct remoteproc_cdev *rproc_cdev =3D cdev->devdata; + int ret; + + mutex_lock(&rproc_cdev->lock); + ret =3D rproc_cdev->ops->get_max_level(rproc_cdev->devdata, state); + mutex_unlock(&rproc_cdev->lock); + + return ret; +} + +static int remoteproc_get_cur_state(struct thermal_cooling_device *cdev, + unsigned long *state) +{ + struct remoteproc_cdev *rproc_cdev =3D cdev->devdata; + int ret; + + mutex_lock(&rproc_cdev->lock); + ret =3D rproc_cdev->ops->get_cur_level(rproc_cdev->devdata, state); + mutex_unlock(&rproc_cdev->lock); + + return ret; +} + +static int remoteproc_set_cur_state(struct thermal_cooling_device *cdev, + unsigned long state) +{ + struct remoteproc_cdev *rproc_cdev =3D cdev->devdata; + int ret; + + mutex_lock(&rproc_cdev->lock); + ret =3D rproc_cdev->ops->set_cur_level(rproc_cdev->devdata, state); + mutex_unlock(&rproc_cdev->lock); + + return ret; +} + +static const struct thermal_cooling_device_ops remoteproc_cooling_ops =3D { + .get_max_state =3D remoteproc_get_max_state, + .get_cur_state =3D remoteproc_get_cur_state, + .set_cur_state =3D remoteproc_set_cur_state, +}; + +struct remoteproc_cdev * +remoteproc_cooling_register(struct device_node *np, + const char *name, const struct remoteproc_cooling_ops *ops, + void *devdata) +{ + struct remoteproc_cdev *rproc_cdev; + struct thermal_cooling_device *cdev; + int ret; + + if (!name || !ops) + return ERR_PTR(-EINVAL); + + rproc_cdev =3D kzalloc(sizeof(*rproc_cdev), GFP_KERNEL); + if (!rproc_cdev) + return ERR_PTR(-ENOMEM); + + rproc_cdev->ops =3D ops; + rproc_cdev->devdata =3D devdata; + mutex_init(&rproc_cdev->lock); + + char *rproc_name __free(kfree) =3D + kasprintf(GFP_KERNEL, REMOTEPROC_PREFIX "%s", name); + /* Register with thermal framework */ + if (np) + cdev =3D thermal_of_cooling_device_register(np, rproc_name, rproc_cdev, + &remoteproc_cooling_ops); + else + cdev =3D thermal_cooling_device_register(rproc_name, rproc_cdev, + &remoteproc_cooling_ops); + + if (IS_ERR(cdev)) { + ret =3D PTR_ERR(cdev); + goto free_rproc_cdev; + } + + rproc_cdev->cdev =3D cdev; + + return rproc_cdev; + +free_rproc_cdev: + kfree(rproc_cdev); + return ERR_PTR(ret); +} +EXPORT_SYMBOL_GPL(remoteproc_cooling_register); + +void remoteproc_cooling_unregister(struct remoteproc_cdev *rproc_cdev) +{ + if (!rproc_cdev) + return; + + thermal_cooling_device_unregister(rproc_cdev->cdev); + mutex_destroy(&rproc_cdev->lock); + kfree(rproc_cdev); +} +EXPORT_SYMBOL_GPL(remoteproc_cooling_unregister); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Remote Processor Cooling Device"); diff --git a/include/linux/remoteproc_cooling.h b/include/linux/remoteproc_= cooling.h new file mode 100644 index 000000000000..721912d1a5ec --- /dev/null +++ b/include/linux/remoteproc_cooling.h @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Remote Processor Cooling Device + * + * Copyright (c) 2025, Qualcomm Innovation Center + */ + +#ifndef __REMOTEPROC_COOLING_H__ +#define __REMOTEPROC_COOLING_H__ + +#include + +struct device; +struct device_node; + +struct remoteproc_cooling_ops { + int (*get_max_level)(void *devdata, unsigned long *level); + int (*get_cur_level)(void *devdata, unsigned long *level); + int (*set_cur_level)(void *devdata, unsigned long level); +}; + +struct remoteproc_cdev; + +#ifdef CONFIG_REMOTEPROC_THERMAL + +struct remoteproc_cdev * +remoteproc_cooling_register(struct device_node *np, + const char *name, + const struct remoteproc_cooling_ops *ops, + void *devdata); + +void remoteproc_cooling_unregister(struct remoteproc_cdev *rproc_cdev); + +#else /* !CONFIG_REMOTEPROC_THERMAL */ + +static inline struct remoteproc_cdev * +remoteproc_cooling_register(struct device_node *np, + const char *name, + const struct remoteproc_cooling_ops *ops, + void *devdata) +{ + return ERR_PTR(-EINVAL); +} + +static inline void +remoteproc_cooling_unregister(struct remoteproc_cdev *rproc_cdev) +{ +} + +#endif /* CONFIG_REMOTEPROC_THERMAL */ + +#endif /* __REMOTEPROC_COOLING_H__ */ --=20 2.34.1 From nobody Mon Feb 9 04:45:40 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E7E6307AE3 for ; Tue, 27 Jan 2026 15:57:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529474; cv=none; b=sqDcrugxAYj214teMmtXQRqtnerguegbIHN2d3vrUPgrkpYOOZfz+fVUR6T+K+R3NcsK6fRynYBxMxTwcjv2IxUh7y/pXNDU4YMeRM4M+leT3/GpPWOcThCuYVJ6mj/XfeOaUz6oNKs7NgQoZ2bQkCzwJuV2oAbjSq8krBImdf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529474; c=relaxed/simple; bh=rBN9H4kI0rq1cyFsHjZZ/dN5fz5IcTQM2qjaff5Xugc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Y0DOsOUmPNBkuDGZaxaiBAp8OuYllFFE1n/L8D87jQcGbP73HSjzvgUwoPcGJ47mT8B5sEUfQvm+QgBj2yEFuCPcQEvXCpnnVgLHCL9cYu7IR163M8fLahkV6M6Q+Y0+QTtFzOFaF/pl4jlH3ZWLJcf5Pswdw5JjZZgNaPrRt18= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=fL9k6hEY; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jrWPTAeh; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="fL9k6hEY"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jrWPTAeh" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RAMt2o184760 for ; Tue, 27 Jan 2026 15:57:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=bDw6El/I8Qn /jmYF9BqPfB+N3QPvQqvwh4YJYPYnhVY=; b=fL9k6hEYKTFawRZHDjOqgkg2osb 01SZT+oRp0kwCiznuEtDE9dFFWfbr9e2wt17XPhJaxvkY29ZBDJxqdqam8MI2zD+ 0RbbAD4YOoVZY40X0iJkfu1EHuPwK05bbz+DChU/9MNv09KJGCg+nnuL6KX0vnis iOxxgpbldoGvhbZOuEz+gga2xMv2382wYRulPBs8ur9Mb1xXdsKQcFAlQO47oiYa qkI6LqVcBqtbcrQkp5pXB60xbRwPCI9NzyIL+ttxsggjFkJJhFGzELtQgYum7WSp EaetbOCMvihl+1XRfsA4KrCoP22YPHjBAnn8yegQ41nRNJT/ln+j3Uak9rA== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bxdv9kpc0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 15:57:51 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2a78c094ad6so59520095ad.1 for ; Tue, 27 Jan 2026 07:57:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769529470; x=1770134270; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bDw6El/I8Qn/jmYF9BqPfB+N3QPvQqvwh4YJYPYnhVY=; b=jrWPTAehauc4YN9wLtO1PZu1du4HNRPH7pbU2cX78EdJePTyKGBtvTAwg+jjfj4Ysk AoCwL+xfrbMbgbWJ86+2c63sIhdPg8TzUcDYfxsQx5JTBnntsRZkVnykm+Ds7WycuUFd XSNhvGaNot2WIQMahkEHUtt3tcCpansTJcec26kN+rGzFO6ndnBzkTlRN19c/DQIaz6D IIjeTGJ523vElSgnV+FRgM/MStBLM0KTHbmuhm2Bk6zA9jWvILpCU5ouz34JzHOiNl7D NKfp2x470MGv8Si+G9mkb3Con6Qmseyjn6FBFaGan0mxdaLCaEqMrSKWD0wE0WxekJRh A5XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769529470; x=1770134270; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bDw6El/I8Qn/jmYF9BqPfB+N3QPvQqvwh4YJYPYnhVY=; b=vP1u07SlkS89qKngbJXyyfiNw9aj85yAoyrhF5e3heLHlj+209t8SFL/rPEMut925X tioqLTyINWNjFy2aQZHLm+OqyNicFQ3vd5WmdJENZ/3wFh08uHNhf2NIxFnIqhd/aYaD SFNNmwC8Ql2mQ3E045ATaiTz3C87zKODCww76utxrBHj2MeVJmfCqMbVCi72PUHqUCo/ I6UD8d1XJo2phn0togJz+dP4Bj+x2Q08e95Bt6fJFqlgD/Y5/Zi8niLLY8aLuS93tKYb OhLR5xvkSbo0JOID2DRWRJnRvR5j4oX0UIq8V4+DncqLt721MUqNzQIglafHdz8HOciM On8Q== X-Forwarded-Encrypted: i=1; AJvYcCVW2haainwws/qSo3bZ4cFAZ1IjLRRFMmR+KxT/tucImOuUmec8iSAVyKu7x72yyKured1H3LlRUr+t7xI=@vger.kernel.org X-Gm-Message-State: AOJu0YyXMbNC1GiLRJO7WRVphm5/iip/SK5mN6Z6Vp+PPX5ht2OHD6u5 F59EaGwCcKXftWJZ8ootYa6Pvhoyu49PqRZl+yn/HvZvN+1PVqADBidpvmSzydKsNLlUla/PxAU bJo0AG8lmfCNZIwPBvwLCo4nmWD7AQxWOSdhSA6iOyv2v9OZQx6sBjYSXXpAbKgMClGE= X-Gm-Gg: AZuq6aImGVQDiaXIHU8XOozc5+rGIJ8ddFgup9wn7jx/qTs9+fd7EjSjzbzcckRi5+d xZAtSGH365kteh/gr64rOvrNDdk93XRnmYg99uDh5TZvtP0HNv00BO5j6L6wZDwVSISs0IZztXb 3/DJpvm73H339tz5u44ZkeOLDrgzmC7HfYA0XUiEN6Sd6RB7IXOHhQfZvxjgLUTujrAqV6jqYPi DegLtEtCLoZMKzv285hEjrpIGM04l0AE9jyyUGPUtifw1fNE2w+hmVMIH1JP4FA3wl3ukr9iCUp SmQ9eobOpA4vPQ0ViKI3KGMAFD/KW+BXsJWlODg/hKtl9QkPWyTTS856q10gTSAwaj/Ff6p8yAP ypgCexPmHr+ouW61EVlARRm9sDrqyy946/WyV0Js= X-Received: by 2002:a17:903:3583:b0:29f:cb81:8bd1 with SMTP id d9443c01a7336-2a870e0ad2emr22212445ad.55.1769529470343; Tue, 27 Jan 2026 07:57:50 -0800 (PST) X-Received: by 2002:a17:903:3583:b0:29f:cb81:8bd1 with SMTP id d9443c01a7336-2a870e0ad2emr22212325ad.55.1769529469807; Tue, 27 Jan 2026 07:57:49 -0800 (PST) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802ede745sm120577465ad.44.2026.01.27.07.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 07:57:49 -0800 (PST) From: Gaurav Kohli To: andersson@kernel.org, mathieu.poirier@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, konradybcio@kernel.org, mani@kernel.org, casey.connolly@linaro.org, amit.kucheria@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gaurav.kohli@oss.qualcomm.com, manaf.pallikunhi@oss.qualcomm.com Subject: [PATCH v2 2/8] dt-bindings: thermal: Add qcom,qmi-cooling yaml bindings Date: Tue, 27 Jan 2026 21:27:16 +0530 Message-Id: <20260127155722.2797783-3-gaurav.kohli@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> References: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=OYOVzxTY c=1 sm=1 tr=0 ts=6978e07f cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=sYNnw0LgJqtDHXS-OV0A:9 a=324X-CrmTo6CU4MGRt3R:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-GUID: EniA77AiMqgmftMJnBUB9SnVnl32yF7j X-Proofpoint-ORIG-GUID: EniA77AiMqgmftMJnBUB9SnVnl32yF7j X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMCBTYWx0ZWRfX4yVmSyyT8R0+ D+rNjKN/Grn//JqZg9FVr8fAvFy3ICttn6qoyM0zdTO6asS+953y9u6BUJG5Uso3580gUIYaSXR vhMLOvIwjdulCCj8SJ3F4qlRXXp6IJLKi/IVzKV2j87poH5gHVqBucfv7Z5T8OTGZdPz9sCuNg5 Uy2bZr+RVohT5Oe2mSn3HoIap7pHR22CMgOV+CyFBYGE2Nd3ZrsIECHsEhKEmEgalHxlv7ZEUgy 3WaS8xftzVSntTFM/VEQrGXEmu867F9NexS5jWJ0YDMulxyvFaELICn3G3ij+ORXJZhFyghHjZW y5kGSg2GQPOjNevWuL+qENWmuPYoJ9FQHUUORq8nJec4rD6lx2YNKm28Y6syy1ChrpAWgHMDRM5 ruiHzQj5fMKDD9WYZfc2m3/xxdsz0SRHL7Hf914PZ1WBoaBoa76EecaAPt3xpmCtXhCjI7DoDRp 0J28ky4vK1uizVV85Zw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 adultscore=0 spamscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270130 Content-Type: text/plain; charset="utf-8" The cooling subnode of a remoteproc represents a client of the Thermal Mitigation Device QMI service running on it. Each subnode of the cooling node represents a single control exposed by the service. Signed-off-by: Gaurav Kohli --- .../bindings/remoteproc/qcom,pas-common.yaml | 6 ++ .../bindings/thermal/qcom,qmi-cooling.yaml | 72 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/qcom,qmi-cool= ing.yaml diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.y= aml b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml index 68c17bf18987..6a736161d5ae 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml @@ -80,6 +80,12 @@ properties: and devices related to the ADSP. unevaluatedProperties: false =20 + 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 diff --git a/Documentation/devicetree/bindings/thermal/qcom,qmi-cooling.yam= l b/Documentation/devicetree/bindings/thermal/qcom,qmi-cooling.yaml new file mode 100644 index 000000000000..0dd3bd84c176 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/qcom,qmi-cooling.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%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: + - Gaurav Kohli + +description: + Qualcomm QMI-based TMD cooling devices are used to mitigate thermal cond= itions + across multiple remote subsystems. These devices operate based on juncti= on + temperature sensors (TSENS) associated with thermal zones for each subsy= stem. + +properties: + compatible: + enum: + - qcom,qmi-cooling-cdsp + - qcom,qmi-cooling-cdsp1 + +patternProperties: + "cdsp-tmd[0-9]*$": + type: object + + description: + Each subnode which represents qmi communication to CDSP. + + properties: + label: + maxItems: 1 + + "#cooling-cells": + $ref: /schemas/thermal/thermal-cooling-devices.yaml#/properties/#c= ooling-cells + + required: + - label + - "#cooling-cells" + + additionalProperties: false + +required: + - compatible + +additionalProperties: false + +examples: + - | + remoteproc-cdsp { + cooling { + compatible =3D "qcom,qmi-cooling-cdsp"; + + cdsp_tmd0: cdsp-tmd0 { + label =3D "cdsp_sw"; + #cooling-cells =3D <2>; + }; + }; + }; + + - | + remoteproc-cdsp1 { + cooling { + compatible =3D "qcom,qmi-cooling-cdsp1"; + + cdsp_tmd1: cdsp-tmd1 { + label =3D "cdsp_sw"; + #cooling-cells =3D <2>; + }; + }; + }; --=20 2.34.1 From nobody Mon Feb 9 04:45:40 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EAEF35E53E for ; Tue, 27 Jan 2026 15:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529482; cv=none; b=AmsdvWz+0T7hS9LzP2sA45I795Oag/m4/kW0vjTNnQCoU2Pd8cLVScTUJB9aAb63UnORJNYsu3GvEPiiVjMnvYDZ/kWn9XNnwDPQD/R4rG5K4dnRFw2+FOw796ISuFsWwoU1uPVDb10tVQ4aF4Kl/7RHzk6FVtWpZyIKlVsWowY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529482; c=relaxed/simple; bh=x/M55gi6Qb9WqILWE7GBmprHl3OPtbhtG5WQWHrVqk8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=g4j3Y12h3BXuMuVK4fMREuRHTEVsghTEFV+3suxvf2CWdr/HeEjbAaFtoBBq6PYwetYt3lS96ph9g7OCZpPFoOWh2GhcLrAX++eP/O76SEDTj+Whi9mY5PtYdKsOO8h/QCE4q6LKpo2/rw/wJoY2VbtH9Jf4juq7OySEqXLGEDY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=a4yoYuqE; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=aSgy06/t; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="a4yoYuqE"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="aSgy06/t" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RF7ibm2379343 for ; Tue, 27 Jan 2026 15:57:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=kXcTyy9q1Y6 KHhlX1eAZU2D74U7jaLF8GAA6nS+na/o=; b=a4yoYuqEBTEb7Vb+0sQgXqWOcQA Vc/jSWy5k5fAGXyu+lkcezSTOxVV/xYqylTnAjZXcYuDECTgtB8oLTchzBL0hL7v yKe/0KRezobir6hqvZ58GFNikp6RcKxIvur+r+j7KWHgKh2s4ul3Lczb7TjWOox6 8Do8/13v1kuV0VbKdvUUnHBjTB/BM8544+IpFezqfjW53dEuTZAO+UyWUrIDKMan KEqxUdFlrxy0ur5yx3khne2+xytgR7/8D5IVCDtv/QNP0nPHmu4sb/xRbtZJU3/9 RKFfh2T2xZP5dLqPSPXfjRkWJR4Xck3EgaQtKViL+OqCzHjJKUvyjE1oacA== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bxsjr9hc3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 15:57:56 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2a78c094ad6so59520385ad.1 for ; Tue, 27 Jan 2026 07:57:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769529476; x=1770134276; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kXcTyy9q1Y6KHhlX1eAZU2D74U7jaLF8GAA6nS+na/o=; b=aSgy06/tf+k6ODxhrOnynalOVt1PgCf/TiOwXJU9EwHBzm/7T6ZtsniCo40hXR3eFw jgEQVub27phASdz9iF8hMjF3PtCh68YbaF86RqHUQofktAuvUIcbn9C9kWqvClvPMbJm CoEZ/SOpn8myS89LePDFKSqRfMILA5SyCFgGbwvPstUAb+2+DR2gQgZKgQ3T0KOlUF5B qOGbbkqkIoxZ3Salj+IQp54BrevJIouEN4MvY8BNf0c0QeB98YxXV5koZimlA96DkUAj tZmXtnQtXxX6N4OK99Chape1Dordm7TY9zvq20hWkHpjSQFXJh9p9OByG3pCPvhQngxU oHFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769529476; x=1770134276; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kXcTyy9q1Y6KHhlX1eAZU2D74U7jaLF8GAA6nS+na/o=; b=qpjbL0INOss324EcxsI0KsUbNfJysgjp5RddTs1bqY1ah2u0zsKZiy7pHaKteNzrcL Rvzb6/tkRQzGl5/a+EZ+Mpspts4/bpAo8Cp5KhNvhSyjY8ADLqZw7PV2IHSQ2fzKeLTV TSjmv4bsPWS/1LsNqaVUBKxcWk3bZMr1dqQ+k2xNBdQfWEdAXg9myYJ3KhKPYERzDPzR O9lpvoQ5QHFlxbB6V2RzTjSYB5kGV9XlTYSyuGENpvLP6N5z6wMZs5vEum2Q8xDyCRsr 0BLiKJo0Vhd0f96OEB5y9dpfMJOmTQn9z8FNWfuiLbmB8cDl4A1bKXWRw6FvPOvW1dXr jyIQ== X-Forwarded-Encrypted: i=1; AJvYcCU9SQr1C6RXh5y2im4SQLcoNAObcBT1YpWHLlOdHM0d7h0kOW/dh4GD8pQh8ZY+CSXY8e9scgjqmt0AgHA=@vger.kernel.org X-Gm-Message-State: AOJu0YxMjxa4EbA3Krfw/quKeAFvw5Z9An1kz2KZ/n7gM29ebvhY9MZS mpC34tbvtzIqw3cw9K5rV1xHAixYlYT2QVcErpTcrEr77USnG77sPMaG3Sjf7s5eg5M/Q6c9HyP p18iVewuJyw0LngEQk1jHBvRXB5DYDgu3YcEo5po5NWGn8AUuQ2nwS+THdPRN4Jj2IsU= X-Gm-Gg: AZuq6aLzKe6rdpIjIZawDbPGcC79y2DCPGDQQ+48L5z+Eg8Uh614l4eU79MwaZl0ySs jnSImH9XcbNmViKY7xVlQWLDA/C6++K9qGn/CwPZxjugV48myq9eibbSb71gVnrf5t8t2U7QGwF So3ycEmy4px0pujvzfZ1I7QV9Evyb4D6TjVAWH6W37vUccKpMhtG2el9D1xjDT2gEFNTMkDoFiq xAWEjpBCkUG8cn4Zcawl9ryml1AUhTDF09hfDAdNiJIhEiJd18QNzyZxodHocLaDqw0eU7YEVJz c1fYpqdxfI+GN8s5F7HaV2BTQf7y6RyYph2nZuwMI4Rraa9OsYeVkyNVA3Mf3TxiRVzrKTInM2L 5TKtCwhyHmK2lBMtso5eb7ofU4CYO+mwnT4f1MD4= X-Received: by 2002:a17:902:ea08:b0:29e:9387:f2b9 with SMTP id d9443c01a7336-2a870d6f1d1mr21909285ad.24.1769529475456; Tue, 27 Jan 2026 07:57:55 -0800 (PST) X-Received: by 2002:a17:902:ea08:b0:29e:9387:f2b9 with SMTP id d9443c01a7336-2a870d6f1d1mr21909005ad.24.1769529474746; Tue, 27 Jan 2026 07:57:54 -0800 (PST) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802ede745sm120577465ad.44.2026.01.27.07.57.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 07:57:54 -0800 (PST) From: Gaurav Kohli To: andersson@kernel.org, mathieu.poirier@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, konradybcio@kernel.org, mani@kernel.org, casey.connolly@linaro.org, amit.kucheria@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gaurav.kohli@oss.qualcomm.com, manaf.pallikunhi@oss.qualcomm.com Subject: [PATCH v2 3/8] remoteproc: qcom: probe all child devices Date: Tue, 27 Jan 2026 21:27:17 +0530 Message-Id: <20260127155722.2797783-4-gaurav.kohli@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> References: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 6gDUJoEGLz8d40pQggqwvNDejNDW8ia5 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMCBTYWx0ZWRfX/mHbvtLc5alM FHuvbNHN1jc5ALaoSCYEA6wBb7QuGFfOTK8x2MpprmUVrXEPohigCPCd/H2VFT8nSSHvay8F5mk IDDys+rewk1aKDnIbVVjGlwGIl7S0Y3ABv+Xp0NrVp/EKIc6DwsLwj37z7d9/VIN77lfv2QLnWp dnxWz6Fw96hHS0QavQgzKk+49wc2TVghRH8E/v0zZm5O2dF+EOiyrm5FFM2wqTKWy5McKo3AhIq yCdYswpU/s+pjWL6UpqU9EVhwWYmtwu9gZ9ixd3PO/PCJheFix1QJu0U8ot4FCbt5ic7NrY3Md7 lK5TF3XdeIaPcIq34FigRNZBzMv6q9lgMX5oHXVmhhgRtX5IqE4ygpcIZnuQOB8cGZg8mXmM2W/ vU/zML61H+BzJHckuaTUHQjLYnSPF9StUErs5+v8KkWD1aPREOMqf7tA9uav/QN17g15/N8PZwT QmeW7c4aA/zvgmzlFIA== X-Authority-Analysis: v=2.4 cv=b+i/I9Gx c=1 sm=1 tr=0 ts=6978e084 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=85acS0iEUgW5otQd-vMA:9 a=1OuFwYUASf3TG4hYMiVC:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: 6gDUJoEGLz8d40pQggqwvNDejNDW8ia5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270130 Content-Type: text/plain; charset="utf-8" From: Casey Connolly Currently, only qcom,bam-dmux nodes are supported as remoteproc children with of_platform_populate(). This limits the other child nodes to probe separately. Generalise the qcom,bam-dmux child node support by probing all remoteproc children with of_platform_populate(). This enables support for devices that represent themselves as subnodes of the remoteproc, such as QMI clients. Signed-off-by: Casey Connolly Signed-off-by: Gaurav Kohli --- drivers/remoteproc/qcom_q6v5.c | 4 ++++ drivers/remoteproc/qcom_q6v5_mss.c | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c index 58d5b85e58cd..a02839c7ed8c 100644 --- a/drivers/remoteproc/qcom_q6v5.c +++ b/drivers/remoteproc/qcom_q6v5.c @@ -6,6 +6,7 @@ * Copyright (C) 2014 Sony Mobile Communications AB * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. */ +#include #include #include #include @@ -351,6 +352,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platf= orm_device *pdev, return dev_err_probe(&pdev->dev, PTR_ERR(q6v5->path), "failed to acquire interconnect path\n"); =20 + of_platform_populate(q6v5->dev->of_node, NULL, NULL, q6v5->dev); + return 0; } EXPORT_SYMBOL_GPL(qcom_q6v5_init); @@ -361,6 +364,7 @@ EXPORT_SYMBOL_GPL(qcom_q6v5_init); */ void qcom_q6v5_deinit(struct qcom_q6v5 *q6v5) { + of_platform_depopulate(q6v5->dev); qmp_put(q6v5->qmp); } EXPORT_SYMBOL_GPL(qcom_q6v5_deinit); diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q= 6v5_mss.c index 91940977ca89..d40565c1cc62 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -238,7 +238,6 @@ struct q6v5 { struct qcom_rproc_pdm pdm_subdev; struct qcom_rproc_ssr ssr_subdev; struct qcom_sysmon *sysmon; - struct platform_device *bam_dmux; bool need_mem_protection; bool has_alt_reset; bool has_mba_logs; @@ -2029,7 +2028,6 @@ static int q6v5_alloc_memory_region(struct q6v5 *qpro= c) static int q6v5_probe(struct platform_device *pdev) { const struct rproc_hexagon_res *desc; - struct device_node *node; struct q6v5 *qproc; struct rproc *rproc; const char *mba_image; @@ -2163,10 +2161,6 @@ static int q6v5_probe(struct platform_device *pdev) if (ret) goto remove_sysmon_subdev; =20 - node =3D of_get_compatible_child(pdev->dev.of_node, "qcom,bam-dmux"); - qproc->bam_dmux =3D of_platform_device_create(node, NULL, &pdev->dev); - of_node_put(node); - return 0; =20 remove_sysmon_subdev: @@ -2186,8 +2180,6 @@ static void q6v5_remove(struct platform_device *pdev) struct q6v5 *qproc =3D platform_get_drvdata(pdev); struct rproc *rproc =3D qproc->rproc; =20 - if (qproc->bam_dmux) - of_platform_device_destroy(&qproc->bam_dmux->dev, NULL); rproc_del(rproc); =20 qcom_q6v5_deinit(&qproc->q6v5); --=20 2.34.1 From nobody Mon Feb 9 04:45:40 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 889F935EDD9 for ; Tue, 27 Jan 2026 15:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529488; cv=none; b=lg0L+c8ELNbt60hav4AuQObkM6k0+P70Wc5lOu6RfXCvb7R/DrJyQTmiqc6002UzZcjc4WxwuMIcfoGLcUy7w9qCYaZFfAelnfejJEDp2n8O89Jb1rx2t0MHx++21XmWFy5fIs6RNB3mu8t7W6uzuhdprjxLwEEEs6Eo7IB8sks= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529488; c=relaxed/simple; bh=HHs9FTVI7Nj8ZDvpTRx0OvstijxDo+NbuuWGZA69t/M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FcHHggBDfWYnYv2G6juMVYpQgTHe5g9vb2ntDbeyY4ELV0azf5FxuTDG8y76Zys8UZcDN5cYQU7kidE5g84QvLIrHhGzVKPXUDiScSkAwpNfg3x2j5FOJUFwkYYh1+mUTig27FDustvAJTwsmAIAnF8rzEKUKXSeZuZp7EUpivc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=QFAJqH7/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=e706v39Y; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="QFAJqH7/"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="e706v39Y" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBwaLb1135805 for ; Tue, 27 Jan 2026 15:58:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=B23FfM5GUY2 jHvz5DLPReb6YkkF7Z4HLNMVOsTIDESE=; b=QFAJqH7/FBEajt+KUdK7VWM3Pvl DcxhQpdB3gFrREvDmJG+yYsJbgoloofwJNDdsi9cNdWpJzba35a2kMxSUzPpDxp4 6pSANHdZpaHAqe0xpFGbxr+SanolT97TZfj+99AbMNmsll/hhBaYVx+xO9en5p92 BhG/LTy3FswU9xd5u3Ieivol2vUkJJ3U+KjVdUS9En2sQN2Yh1lDLAzwULj65FFf KN9i9u8ekX+Oq4VM6EzAAi1Mvm7kCW3fv50B8ksQP9e5qoKQIwOtJhL9AZjwxFWK NjLfCCWoW6r6u/eagzABn5knWLrrhG5xQQjWgnVMYwNhvCc7P5gQOfeaX2g== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bxsjehg0v-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 15:58:02 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-352e195f662so5101566a91.2 for ; Tue, 27 Jan 2026 07:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769529481; x=1770134281; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=B23FfM5GUY2jHvz5DLPReb6YkkF7Z4HLNMVOsTIDESE=; b=e706v39Y4KKdt4UeSKyCb2aqWkIgC9ZmjwV/05wU2S19r3YerBrH8ATwIe4LGkntD1 JC/2S8SQYRu5W9JbPXuhY+ykjhAmUhDt56jULddrGe1nY82dMFVUviHdCy28kKQvgxXi 43npYIlZg4LXIsZQH7a40XREnGpV4pQ2g3cdlPZK55IjhohxQ21k6mykoo8IB4s+Mn9g 3y7CNx4meU0igw/lwU6ZU9Nst7GrkyxDjniQ50VQ6w8ruAcb/+6Du3oyO51c/sJiaSZv tXJMgTYIPdHh5DWwhCdQbUF16iD46Qs/u2bSNTRgFJ84qsCvsas0988CuDOKw5PqNa/n z1nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769529481; x=1770134281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=B23FfM5GUY2jHvz5DLPReb6YkkF7Z4HLNMVOsTIDESE=; b=BBLCWvLq6OeAEtAI0aLlZvZSyMzybOQjj//nP9pSmodEZbfVRg3pnupPjY0cKvmHGD tEfFcKkBLM7V7O55obo3h6jyIEg68DJg6vRXiNAorIz7njKa5eI+1xFswqiP/mPdIqkw qnWUlKUuEiVrP/8OG2UKleAkxlvOvZHAj/XF7l4cji8TC5Q6ePUHkOLxG3jjIywr8aps NwHS9z+nMOwUvLTX0VMRbabhdefQCemH3rwmf408Vye27ym8cZti++dAzYhaUIsLkkuo tbTIoRxdqpPW5QOyKy0rbfcS01/y0fpyZtxiVWtREuljoVYYLw9AVbpfTUxY/2/1Qc8q h+0Q== X-Forwarded-Encrypted: i=1; AJvYcCVsuJhlLYgGgRWgDJEG1+OurkO3WnsLpgXXAsCadopsKl5vvhLezjJVuhol6+r7PvOfqkFY+gmWniubgjk=@vger.kernel.org X-Gm-Message-State: AOJu0YwhhnIar4mJJfjrNi6Kjq/YjybVO942gP8JWzyXp76eRGdrqcgQ GF7E9qMObc0zafqda41rqkgpXS3YV+zIpfTPSm3H+AwjhQHxn26uzxHZz+Dxdjr48tWX1vBGt37 CB3bg4Fgm6ljrPKeTgeq2T9xqF6J/4o16MtGTxlh9IkuW2pjkmpQgs9dSVFWrv9Hign8= X-Gm-Gg: AZuq6aJo0OIJTzcajsLW8O04uNMPIMJTSOUTcxKVd/PKAmj4Uqj2IOCcGxRHKyTMqAq l4+A9J2bD3YRi8dmYkVOCSQXUTq3xPbjXV5VjhmveQHc+FiUyvCw/237tcbRd7nLtjRWaDbP3UB Lg6AqIvUAUXpkpUOTfl8nSL+u0/QhQ71orSZg+9jJ6oy5tID5j53VHHQdxcU7vxRXvqrXKpnobe 513kzmbdlMe4/uC3t5oiTl2hVF6gBJWsz4ywjuGlrnMIhWo6rN3/ikj6KFMguxjtlgYklP7lBxb dyF7PWKb/AKGOqIwCskilaKlO7D84Ey9rRh9QCLpA6ywG+IfwaTUNLeEPKZtMLjBJY/IJwA0x4A jnadw5CfSkMXCSZ+G2CokCX1CtvqXWX5IIERTSMI= X-Received: by 2002:a17:902:c947:b0:2a5:8e98:1b44 with SMTP id d9443c01a7336-2a870dc88a3mr26031065ad.31.1769529480716; Tue, 27 Jan 2026 07:58:00 -0800 (PST) X-Received: by 2002:a17:902:c947:b0:2a5:8e98:1b44 with SMTP id d9443c01a7336-2a870dc88a3mr26030585ad.31.1769529479966; Tue, 27 Jan 2026 07:57:59 -0800 (PST) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802ede745sm120577465ad.44.2026.01.27.07.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 07:57:59 -0800 (PST) From: Gaurav Kohli To: andersson@kernel.org, mathieu.poirier@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, konradybcio@kernel.org, mani@kernel.org, casey.connolly@linaro.org, amit.kucheria@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gaurav.kohli@oss.qualcomm.com, manaf.pallikunhi@oss.qualcomm.com Subject: [PATCH v2 4/8] thermal: qcom: add qmi-cooling driver Date: Tue, 27 Jan 2026 21:27:18 +0530 Message-Id: <20260127155722.2797783-5-gaurav.kohli@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> References: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMCBTYWx0ZWRfXz/l0SwCOAU+c 94AyKcVYhmvfIH1IeZ4s7Pniw5vN2gupPtgXyfClBeVuZF6ppqzsTlCvlWMXqdI2s5jzwLPs4hC yVlO6FtRWlwUFiUawW2m9wcW4lI+jxolp8+ww4LrWDot5OF46jKFqT6Y7tmvimiw3ZDEHHVtBSp lctPUoWp4JUGhdpqLNAV1x4tEYm+C9oTnkwgB3QGsT+EA5CYB6ETvOHIO6eV6l6TNAQkLB/+6+6 5Zls5eHhOPNxYIxuyy5bn3ExXECM1ICCsgiSrd+P62YAsuY7OAJVQu9Kce7OJ7Jy6M8ygS9ry2V 7sPqbO5g4Q9Tdo++y7BdJzDQHLZ0PRFEcm0y1U5V3j9C6unJFUFDi6X2eSUif0xVmNpRrNRFQgy /Xo0mLr9LKzKYeRTp+beMagcpl6gtKK50zgd24bIST1u9SxIV3y1i+Vohp14NW5x0IuKekcdeAp SGlG7pEcVhJpIbtKQPw== X-Authority-Analysis: v=2.4 cv=Qelrf8bv c=1 sm=1 tr=0 ts=6978e08a cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=Srlm_vp38258hb0PjxkA:9 a=mQ_c8vxmzFEMiUWkPHU9:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: wmI7VVW-l4hk6ZdnqpA8nI4ry9e-WZds X-Proofpoint-GUID: wmI7VVW-l4hk6ZdnqpA8nI4ry9e-WZds X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 adultscore=0 phishscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270130 Content-Type: text/plain; charset="utf-8" From: Casey Connolly 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 Signed-off-by: Gaurav Kohli Signed-off-by: Casey Connolly --- drivers/soc/qcom/Kconfig | 13 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/qmi-cooling.c | 510 +++++++++++++++++++++++++++++++++ drivers/soc/qcom/qmi-cooling.h | 429 +++++++++++++++++++++++++++ 4 files changed, 953 insertions(+) create mode 100644 drivers/soc/qcom/qmi-cooling.c create mode 100644 drivers/soc/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. =20 +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) +=3D pmic_glink.o obj-$(CONFIG_QCOM_PMIC_GLINK) +=3D pmic_glink_altmode.o obj-$(CONFIG_QCOM_PMIC_PDCHARGER_ULOG) +=3D pmic_pdcharger_ulog.o CFLAGS_pmic_pdcharger_ulog.o :=3D -I$(src) +obj-$(CONFIG_QCOM_QMI_COOLING) +=3D qmi-cooling.o obj-$(CONFIG_QCOM_QMI_HELPERS) +=3D qmi_helpers.o qmi_helpers-y +=3D qmi_encdec.o qmi_interface.o obj-$(CONFIG_QCOM_RAMP_CTRL) +=3D 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..463baa47c8b6 --- /dev/null +++ b/drivers/soc/qcom/qmi-cooling.c @@ -0,0 +1,510 @@ +// 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 serv= ice. + * It doesn't implement any handling of reports from remote subsystems. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qmi-cooling.h" + +#define CDSP_INSTANCE_ID 0x43 +#define CDSP1_INSTANCE_ID 0x44 + +#define QMI_TMD_RESP_TIMEOUT msecs_to_jiffies(100) + +/** + * struct qmi_tmd_client - TMD client state + * @dev: Device associated with this client + * @name: Friendly name for the remote TMD service + * @handle: QMI connection handle + * @mutex: Lock to synchronise QMI communication + * @id: The QMI TMD service instance ID + * @cdev_list: The list of cooling devices (controls) enabled for this ins= tance + * @svc_arrive_work: Work item for initialising the client when the TMD se= rvice + * starts. + * @connection_active: Whether or not we're connected to the QMI TMD servi= ce + */ +struct qmi_tmd_client { + struct device *dev; + const char *name; + struct qmi_handle handle; + struct mutex mutex; + u32 id; + struct list_head cdev_list; + struct work_struct svc_arrive_work; + bool connection_active; +}; + +/** + * struct qmi_tmd - A TMD cooling device + * @np: OF node associated with this control + * @type: The control type (exposed via sysfs) + * @qmi_name: The common name of this control shared by the remote subsyst= em + * @rproc_cdev: Remote processor cooling device handle + * @cur_state: The current cooling/warming/mitigation state + * @max_state: The maximum state + * @client: The TMD client instance this control is associated with + */ +struct qmi_tmd { + struct device_node *np; + const char *type; + char qmi_name[QMI_TMD_MITIGATION_DEV_ID_LENGTH_MAX_V01 + 1]; + struct list_head node; + struct remoteproc_cdev *rproc_cdev; + unsigned int cur_state; + unsigned int max_state; + struct qmi_tmd_client *client; +}; + +/** + * struct qmi_instance_id - QMI instance match data + * @id: The QMI instance ID + * @name: Friendly name for this instance + */ +struct qmi_instance_data { + u32 id; + const char *name; +}; + +/* Notify the remote subsystem of the requested cooling state */ +static int qmi_tmd_send_state_request(struct qmi_tmd *tmd) +{ + struct tmd_set_mitigation_level_resp_msg_v01 tmd_resp =3D { 0 }; + struct tmd_set_mitigation_level_req_msg_v01 req =3D { 0 }; + struct qmi_tmd_client *client; + struct qmi_txn txn; + int ret =3D 0; + + client =3D tmd->client; + + guard(mutex)(&client->mutex); + + /* + * This function is called by qmi_set_cur_state() which does not know if + * the QMI service is actually online. If it isn't then we noop here. + * The state is cached in tmd->cur_state and will be broadcast via + * qmi_tmd_init_control() when the service comes up. + */ + if (!client->connection_active) + return 0; + + strscpy(req.mitigation_dev_id.mitigation_dev_id, tmd->qmi_name, + QMI_TMD_MITIGATION_DEV_ID_LENGTH_MAX_V01 + 1); + req.mitigation_level =3D tmd->cur_state; + + ret =3D qmi_txn_init(&client->handle, &txn, + tmd_set_mitigation_level_resp_msg_v01_ei, &tmd_resp); + if (ret < 0) { + dev_err(client->dev, "qmi set state %d txn init failed for %s ret %d\n", + tmd->cur_state, tmd->type, ret); + return ret; + } + + ret =3D qmi_send_request(&client->handle, NULL, &txn, + QMI_TMD_SET_MITIGATION_LEVEL_REQ_V01, + TMD_SET_MITIGATION_LEVEL_REQ_MSG_V01_MAX_MSG_LEN, + tmd_set_mitigation_level_req_msg_v01_ei, &req); + if (ret < 0) { + dev_err(client->dev, "qmi set state %d txn send failed for %s ret %d\n", + tmd->cur_state, tmd->type, ret); + qmi_txn_cancel(&txn); + return ret; + } + + ret =3D qmi_txn_wait(&txn, QMI_TMD_RESP_TIMEOUT); + if (ret < 0) { + dev_err(client->dev, "qmi set state %d txn wait failed for %s ret %d\n", + tmd->cur_state, tmd->type, ret); + return ret; + } + + if (tmd_resp.resp.result !=3D QMI_RESULT_SUCCESS_V01) { + ret =3D -tmd_resp.resp.result; + dev_err(client->dev, "qmi set state %d NOT success for %s ret %d\n", + tmd->cur_state, tmd->type, ret); + return ret; + } + + dev_dbg(client->dev, "Requested state %d/%d for %s\n", tmd->cur_state, + tmd->max_state, tmd->type); + + return 0; +} + +static int qmi_get_max_level(void *devdata, unsigned long *level) +{ + struct qmi_tmd *tmd =3D devdata; + + if (!tmd) + return -EINVAL; + + *level =3D tmd->max_state; + + return 0; +} + +static int qmi_get_cur_level(void *devdata, unsigned long *level) +{ + struct qmi_tmd *tmd =3D devdata; + + if (!tmd) + return -EINVAL; + + *level =3D tmd->cur_state; + + return 0; +} + +static int qmi_set_cur_level(void *devdata, unsigned long level) +{ + struct qmi_tmd *tmd =3D devdata; + + if (!tmd) + return -EINVAL; + + if (level > tmd->max_state) + return -EINVAL; + + if (tmd->cur_state =3D=3D level) + return 0; + + tmd->cur_state =3D level; + + return qmi_tmd_send_state_request(tmd); +} + +static const struct remoteproc_cooling_ops qmi_rproc_ops =3D { + .get_max_level =3D qmi_get_max_level, + .get_cur_level =3D qmi_get_cur_level, + .set_cur_level =3D qmi_set_cur_level, +}; + +static int qmi_register_cooling_device(struct qmi_tmd *tmd) +{ + struct remoteproc_cdev *rproc_cdev; + + rproc_cdev =3D remoteproc_cooling_register(tmd->np, + tmd->type, + &qmi_rproc_ops, + tmd); + + if (IS_ERR(rproc_cdev)) + return dev_err_probe(tmd->client->dev, PTR_ERR(rproc_cdev), + "Failed to register cooling device %s\n", + tmd->qmi_name); + + tmd->rproc_cdev =3D rproc_cdev; + return 0; +} + +/* + * Init a single TMD control by registering a cooling device for it, or + * synchronising state with the remote subsystem if recovering from a serv= ice + * restart. This is called when the TMD service starts up. + */ +static int qmi_tmd_init_control(struct qmi_tmd_client *client, const char = *label, + u8 max_state) +{ + struct qmi_tmd *tmd =3D NULL; + + list_for_each_entry(tmd, &client->cdev_list, node) + if (!strncasecmp(tmd->qmi_name, label, + QMI_TMD_MITIGATION_DEV_ID_LENGTH_MAX_V01 + 1)) + goto found; + + dev_dbg(client->dev, + "TMD '%s' available in firmware but not specified in DT\n", + label); + return 0; + +found: + tmd->max_state =3D max_state; + /* + * If the cooling device already exists then the QMI service went away and + * came back. So just make sure the current cooling device state is + * reflected on the remote side and then return. + */ + if (tmd->rproc_cdev) + return qmi_tmd_send_state_request(tmd); + + return qmi_register_cooling_device(tmd); +} + +/* + * When the QMI service starts up on a remote subsystem this function will= fetch + * the list of TMDs on the subsystem, match it to the TMDs specified in de= vicetree + * and call qmi_tmd_init_control() for each + */ +static void qmi_tmd_svc_arrive(struct work_struct *work) +{ + struct qmi_tmd_client *client =3D + container_of(work, struct qmi_tmd_client, svc_arrive_work); + + struct tmd_get_mitigation_device_list_req_msg_v01 req =3D { 0 }; + struct tmd_get_mitigation_device_list_resp_msg_v01 *resp __free(kfree) = =3D NULL; + int ret =3D 0, i; + struct qmi_txn txn; + + /* resp struct is 1.1kB, allocate it on the heap. */ + resp =3D kzalloc(sizeof(*resp), GFP_KERNEL); + if (!resp) + return; + + /* Get a list of TMDs supported by the remoteproc */ + scoped_guard(mutex, &client->mutex) { + ret =3D qmi_txn_init(&client->handle, &txn, + tmd_get_mitigation_device_list_resp_msg_v01_ei, resp); + if (ret < 0) { + dev_err(client->dev, + "Transaction init error for instance_id: %#x ret %d\n", + client->id, ret); + return; + } + + ret =3D qmi_send_request(&client->handle, NULL, &txn, + QMI_TMD_GET_MITIGATION_DEVICE_LIST_REQ_V01, + TMD_GET_MITIGATION_DEVICE_LIST_REQ_MSG_V01_MAX_MSG_LEN, + tmd_get_mitigation_device_list_req_msg_v01_ei, &req); + if (ret < 0) { + qmi_txn_cancel(&txn); + return; + } + + ret =3D qmi_txn_wait(&txn, QMI_TMD_RESP_TIMEOUT); + if (ret < 0) { + dev_err(client->dev, "Transaction wait error for client %#x ret:%d\n", + client->id, ret); + return; + } + if (resp->resp.result !=3D QMI_RESULT_SUCCESS_V01) { + ret =3D resp->resp.result; + dev_err(client->dev, "Failed to get device list for client %#x ret:%d\n= ", + client->id, ret); + return; + } + + client->connection_active =3D true; + } + + for (i =3D 0; i < resp->mitigation_device_list_len; i++) { + struct tmd_mitigation_dev_list_type_v01 *device =3D + &resp->mitigation_device_list[i]; + + ret =3D qmi_tmd_init_control(client, + device->mitigation_dev_id.mitigation_dev_id, + device->max_mitigation_level); + if (ret) + break; + } +} + +static void thermal_qmi_net_reset(struct qmi_handle *qmi) +{ + struct qmi_tmd_client *client =3D container_of(qmi, struct qmi_tmd_client= , handle); + struct qmi_tmd *tmd =3D NULL; + + list_for_each_entry(tmd, &client->cdev_list, node) { + qmi_tmd_send_state_request(tmd); + } +} + +static void thermal_qmi_del_server(struct qmi_handle *qmi, struct qmi_serv= ice *service) +{ + struct qmi_tmd_client *client =3D container_of(qmi, struct qmi_tmd_client= , handle); + + scoped_guard(mutex, &client->mutex) + client->connection_active =3D false; +} + +static int thermal_qmi_new_server(struct qmi_handle *qmi, struct qmi_servi= ce *service) +{ + struct qmi_tmd_client *client =3D container_of(qmi, struct qmi_tmd_client= , handle); + struct sockaddr_qrtr sq =3D { AF_QIPCRTR, service->node, service->port }; + + scoped_guard(mutex, &client->mutex) + kernel_connect(qmi->sock, (struct sockaddr_unsized *)&sq, sizeof(sq), 0); + + queue_work(system_highpri_wq, &client->svc_arrive_work); + + return 0; +} + +static const struct qmi_ops thermal_qmi_event_ops =3D { + .new_server =3D thermal_qmi_new_server, + .del_server =3D thermal_qmi_del_server, + .net_reset =3D thermal_qmi_net_reset, +}; + +static void qmi_tmd_cleanup(struct qmi_tmd_client *client) +{ + struct qmi_tmd *tmd, *c_next; + + guard(mutex)(&client->mutex); + + client->connection_active =3D false; + + qmi_handle_release(&client->handle); + cancel_work(&client->svc_arrive_work); + list_for_each_entry_safe(tmd, c_next, &client->cdev_list, node) { + if (tmd->rproc_cdev) + remoteproc_cooling_unregister(tmd->rproc_cdev); + + list_del(&tmd->node); + } +} + +/* Parse the controls and allocate a qmi_tmd for each of them */ +static int qmi_tmd_alloc_cdevs(struct qmi_tmd_client *client) +{ + struct device *dev =3D client->dev; + struct device_node *node =3D dev->of_node; + struct device_node *subnode; + struct qmi_tmd *tmd; + int ret; + + for_each_available_child_of_node_scoped(node, subnode) { + const char *name; + + tmd =3D devm_kzalloc(dev, sizeof(*tmd), GFP_KERNEL); + if (!tmd) + return dev_err_probe(client->dev, -ENOMEM, + "Couldn't allocate tmd\n"); + + tmd->type =3D devm_kasprintf(client->dev, GFP_KERNEL, "%s", + subnode->name); + if (!tmd->type) + return dev_err_probe(dev, -ENOMEM, + "Couldn't allocate cooling device name\n"); + + if (of_property_read_string(subnode, "label", &name)) + return dev_err_probe(client->dev, -EINVAL, + "Failed to parse dev name for %s\n", + subnode->name); + + ret =3D strscpy(tmd->qmi_name, name, + QMI_TMD_MITIGATION_DEV_ID_LENGTH_MAX_V01 + 1); + if (ret =3D=3D -E2BIG) + return dev_err_probe(dev, -EINVAL, "TMD label %s is too long\n", + name); + + tmd->client =3D client; + tmd->np =3D subnode; + tmd->cur_state =3D 0; + list_add(&tmd->node, &client->cdev_list); + } + + if (list_empty(&client->cdev_list)) + return dev_err_probe(client->dev, -EINVAL, + "No cooling devices specified for client %s (%#x)\n", + client->name, client->id); + + return 0; +} + +static int qmi_tmd_client_probe(struct platform_device *pdev) +{ + const struct qmi_instance_data *match; + struct qmi_tmd_client *client; + struct device *dev =3D &pdev->dev; + int ret; + + client =3D devm_kzalloc(dev, sizeof(*client), GFP_KERNEL); + if (!client) + return -ENOMEM; + + client->dev =3D dev; + + match =3D of_device_get_match_data(dev); + if (!match) + return dev_err_probe(dev, -EINVAL, "No match data\n"); + + client->id =3D match->id; + client->name =3D match->name; + + mutex_init(&client->mutex); + INIT_LIST_HEAD(&client->cdev_list); + INIT_WORK(&client->svc_arrive_work, qmi_tmd_svc_arrive); + + ret =3D qmi_tmd_alloc_cdevs(client); + if (ret) + return ret; + + platform_set_drvdata(pdev, client); + + ret =3D qmi_handle_init(&client->handle, + TMD_GET_MITIGATION_DEVICE_LIST_RESP_MSG_V01_MAX_MSG_LEN, + &thermal_qmi_event_ops, NULL); + if (ret < 0) + return dev_err_probe(client->dev, ret, "QMI handle init failed for clien= t %#x\n", + client->id); + + ret =3D qmi_add_lookup(&client->handle, TMD_SERVICE_ID_V01, TMD_SERVICE_V= ERS_V01, + client->id); + if (ret < 0) { + qmi_handle_release(&client->handle); + return dev_err_probe(client->dev, ret, "QMI register failed for client 0= x%x\n", + client->id); + } + + return 0; +} + +static void qmi_tmd_client_remove(struct platform_device *pdev) +{ + struct qmi_tmd_client *client =3D platform_get_drvdata(pdev); + + qmi_tmd_cleanup(client); +} + +static const struct qmi_instance_data qmi_cdsp =3D { + .id =3D CDSP_INSTANCE_ID, + .name =3D "cdsp", +}; + +static const struct qmi_instance_data qmi_cdsp1 =3D { + .id =3D CDSP1_INSTANCE_ID, + .name =3D "cdsp1", +}; + +static const struct of_device_id qmi_tmd_device_table[] =3D { + { + .compatible =3D "qcom,qmi-cooling-cdsp", + .data =3D &qmi_cdsp, + }, + { + .compatible =3D "qcom,qmi-cooling-cdsp1", + .data =3D &qmi_cdsp1, + }, + {} +}; +MODULE_DEVICE_TABLE(of, qmi_tmd_device_table); + +static struct platform_driver qmi_tmd_device_driver =3D { + .probe =3D qmi_tmd_client_probe, + .remove =3D qmi_tmd_client_remove, + .driver =3D { + .name =3D "qcom-qmi-cooling", + .of_match_table =3D qmi_tmd_device_table, + }, +}; + +module_platform_driver(qmi_tmd_device_driver); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Qualcomm QMI Thermal Mitigation Device driver"); diff --git a/drivers/soc/qcom/qmi-cooling.h b/drivers/soc/qcom/qmi-cooling.h new file mode 100644 index 000000000000..e33f4c5979e5 --- /dev/null +++ b/drivers/soc/qcom/qmi-cooling.h @@ -0,0 +1,429 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2017, The Linux Foundation + * Copyright (c) 2023, Linaro Limited + */ + +#ifndef __QCOM_COOLING_H__ +#define __QCOM_COOLING_H__ + +#include + +#define TMD_SERVICE_ID_V01 0x18 +#define TMD_SERVICE_VERS_V01 0x01 + +#define QMI_TMD_GET_MITIGATION_DEVICE_LIST_RESP_V01 0x0020 +#define QMI_TMD_GET_MITIGATION_LEVEL_REQ_V01 0x0022 +#define QMI_TMD_GET_SUPPORTED_MSGS_REQ_V01 0x001E +#define QMI_TMD_SET_MITIGATION_LEVEL_REQ_V01 0x0021 +#define QMI_TMD_REGISTER_NOTIFICATION_MITIGATION_LEVEL_RESP_V01 0x0023 +#define QMI_TMD_GET_SUPPORTED_MSGS_RESP_V01 0x001E +#define QMI_TMD_SET_MITIGATION_LEVEL_RESP_V01 0x0021 +#define QMI_TMD_DEREGISTER_NOTIFICATION_MITIGATION_LEVEL_RESP_V01 0x0024 +#define QMI_TMD_MITIGATION_LEVEL_REPORT_IND_V01 0x0025 +#define QMI_TMD_GET_MITIGATION_LEVEL_RESP_V01 0x0022 +#define QMI_TMD_GET_SUPPORTED_FIELDS_REQ_V01 0x001F +#define QMI_TMD_GET_MITIGATION_DEVICE_LIST_REQ_V01 0x0020 +#define QMI_TMD_REGISTER_NOTIFICATION_MITIGATION_LEVEL_REQ_V01 0x0023 +#define QMI_TMD_DEREGISTER_NOTIFICATION_MITIGATION_LEVEL_REQ_V01 0x0024 +#define QMI_TMD_GET_SUPPORTED_FIELDS_RESP_V01 0x001F + +#define QMI_TMD_MITIGATION_DEV_ID_LENGTH_MAX_V01 32 +#define QMI_TMD_MITIGATION_DEV_LIST_MAX_V01 32 + +struct tmd_mitigation_dev_id_type_v01 { + char mitigation_dev_id[QMI_TMD_MITIGATION_DEV_ID_LENGTH_MAX_V01 + 1]; +}; + +static const struct qmi_elem_info tmd_mitigation_dev_id_type_v01_ei[] =3D { + { + .data_type =3D QMI_STRING, + .elem_len =3D QMI_TMD_MITIGATION_DEV_ID_LENGTH_MAX_V01 + 1, + .elem_size =3D sizeof(char), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0, + .offset =3D offsetof(struct tmd_mitigation_dev_id_type_v01, + mitigation_dev_id), + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, +}; + +struct tmd_mitigation_dev_list_type_v01 { + struct tmd_mitigation_dev_id_type_v01 mitigation_dev_id; + u8 max_mitigation_level; +}; + +static const struct qmi_elem_info tmd_mitigation_dev_list_type_v01_ei[] = =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct tmd_mitigation_dev_id_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0, + .offset =3D offsetof(struct tmd_mitigation_dev_list_type_v01, + mitigation_dev_id), + .ei_array =3D tmd_mitigation_dev_id_type_v01_ei, + }, + { + .data_type =3D QMI_UNSIGNED_1_BYTE, + .elem_len =3D 1, + .elem_size =3D sizeof(uint8_t), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0, + .offset =3D offsetof(struct tmd_mitigation_dev_list_type_v01, + max_mitigation_level), + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, +}; + +struct tmd_get_mitigation_device_list_req_msg_v01 { + char placeholder; +}; + +#define TMD_GET_MITIGATION_DEVICE_LIST_REQ_MSG_V01_MAX_MSG_LEN 0 +const struct qmi_elem_info tmd_get_mitigation_device_list_req_msg_v01_ei[]= =3D { + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, +}; + +struct tmd_get_mitigation_device_list_resp_msg_v01 { + struct qmi_response_type_v01 resp; + u8 mitigation_device_list_valid; + u32 mitigation_device_list_len; + struct tmd_mitigation_dev_list_type_v01 + mitigation_device_list[QMI_TMD_MITIGATION_DEV_LIST_MAX_V01]; +}; + +#define TMD_GET_MITIGATION_DEVICE_LIST_RESP_MSG_V01_MAX_MSG_LEN 1099 +static const struct qmi_elem_info tmd_get_mitigation_device_list_resp_msg_= v01_ei[] =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct qmi_response_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x02, + .offset =3D offsetof(struct tmd_get_mitigation_device_list_resp_msg_v01, + resp), + .ei_array =3D qmi_response_type_v01_ei, + }, + { + .data_type =3D QMI_OPT_FLAG, + .elem_len =3D 1, + .elem_size =3D sizeof(uint8_t), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x10, + .offset =3D offsetof(struct tmd_get_mitigation_device_list_resp_msg_v01, + mitigation_device_list_valid), + }, + { + .data_type =3D QMI_DATA_LEN, + .elem_len =3D 1, + .elem_size =3D sizeof(uint8_t), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x10, + .offset =3D offsetof(struct tmd_get_mitigation_device_list_resp_msg_v01, + mitigation_device_list_len), + }, + { + .data_type =3D QMI_STRUCT, + .elem_len =3D QMI_TMD_MITIGATION_DEV_LIST_MAX_V01, + .elem_size =3D sizeof(struct tmd_mitigation_dev_list_type_v01), + .array_type =3D VAR_LEN_ARRAY, + .tlv_type =3D 0x10, + .offset =3D offsetof(struct tmd_get_mitigation_device_list_resp_msg_v01, + mitigation_device_list), + .ei_array =3D tmd_mitigation_dev_list_type_v01_ei, + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, +}; + +struct tmd_set_mitigation_level_req_msg_v01 { + struct tmd_mitigation_dev_id_type_v01 mitigation_dev_id; + u8 mitigation_level; +}; + +#define TMD_SET_MITIGATION_LEVEL_REQ_MSG_V01_MAX_MSG_LEN 40 +static const struct qmi_elem_info tmd_set_mitigation_level_req_msg_v01_ei[= ] =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct tmd_mitigation_dev_id_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x01, + .offset =3D offsetof(struct tmd_set_mitigation_level_req_msg_v01, + mitigation_dev_id), + .ei_array =3D tmd_mitigation_dev_id_type_v01_ei, + }, + { + .data_type =3D QMI_UNSIGNED_1_BYTE, + .elem_len =3D 1, + .elem_size =3D sizeof(uint8_t), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x02, + .offset =3D offsetof(struct tmd_set_mitigation_level_req_msg_v01, + mitigation_level), + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, +}; + +struct tmd_set_mitigation_level_resp_msg_v01 { + struct qmi_response_type_v01 resp; +}; + +#define TMD_SET_MITIGATION_LEVEL_RESP_MSG_V01_MAX_MSG_LEN 7 +static const struct qmi_elem_info tmd_set_mitigation_level_resp_msg_v01_ei= [] =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct qmi_response_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x02, + .offset =3D offsetof(struct tmd_set_mitigation_level_resp_msg_v01, resp), + .ei_array =3D qmi_response_type_v01_ei, + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, +}; + +struct tmd_get_mitigation_level_req_msg_v01 { + struct tmd_mitigation_dev_id_type_v01 mitigation_device; +}; + +#define TMD_GET_MITIGATION_LEVEL_REQ_MSG_V01_MAX_MSG_LEN 36 + +static const struct qmi_elem_info tmd_get_mitigation_level_req_msg_v01_ei[= ] =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct tmd_mitigation_dev_id_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x01, + .offset =3D offsetof(struct tmd_get_mitigation_level_req_msg_v01, + mitigation_device), + .ei_array =3D tmd_mitigation_dev_id_type_v01_ei, + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, +}; + +struct tmd_get_mitigation_level_resp_msg_v01 { + struct qmi_response_type_v01 resp; + u8 current_mitigation_level_valid; + u8 current_mitigation_level; + u8 requested_mitigation_level_valid; + u8 requested_mitigation_level; +}; + +#define TMD_GET_MITIGATION_LEVEL_RESP_MSG_V01_MAX_MSG_LEN 15 +static const struct qmi_elem_info tmd_get_mitigation_level_resp_msg_ei[] = =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct qmi_response_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x02, + .offset =3D offsetof(struct tmd_get_mitigation_level_resp_msg_v01, resp), + .ei_array =3D qmi_response_type_v01_ei, + }, + { + .data_type =3D QMI_OPT_FLAG, + .elem_len =3D 1, + .elem_size =3D sizeof(uint8_t), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x10, + .offset =3D offsetof(struct tmd_get_mitigation_level_resp_msg_v01, + current_mitigation_level_valid), + }, + { + .data_type =3D QMI_UNSIGNED_1_BYTE, + .elem_len =3D 1, + .elem_size =3D sizeof(uint8_t), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x10, + .offset =3D offsetof(struct tmd_get_mitigation_level_resp_msg_v01, + current_mitigation_level), + }, + { + .data_type =3D QMI_OPT_FLAG, + .elem_len =3D 1, + .elem_size =3D sizeof(uint8_t), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x11, + .offset =3D offsetof(struct tmd_get_mitigation_level_resp_msg_v01, + requested_mitigation_level_valid), + }, + { + .data_type =3D QMI_UNSIGNED_1_BYTE, + .elem_len =3D 1, + .elem_size =3D sizeof(uint8_t), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x11, + .offset =3D offsetof(struct tmd_get_mitigation_level_resp_msg_v01, + requested_mitigation_level), + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, +}; + +struct tmd_register_notification_mitigation_level_req_msg_v01 { + struct tmd_mitigation_dev_id_type_v01 mitigation_device; +}; + +#define TMD_REGISTER_NOTIFICATION_MITIGATION_LEVEL_REQ_MSG_V01_MAX_MSG_LEN= 36 +static const struct qmi_elem_info + tmd_register_notification_mitigation_level_req_msg_v01_ei[] =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct tmd_mitigation_dev_id_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x01, + .offset =3D offsetof( + struct tmd_register_notification_mitigation_level_req_msg_v01, + mitigation_device), + .ei_array =3D tmd_mitigation_dev_id_type_v01_ei, + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, + }; + +struct tmd_register_notification_mitigation_level_resp_msg_v01 { + struct qmi_response_type_v01 resp; +}; + +#define TMD_REGISTER_NOTIFICATION_MITIGATION_LEVEL_RESP_MSG_V01_MAX_MSG_LE= N 7 +static const struct qmi_elem_info + tmd_register_notification_mitigation_level_resp_msg_v01_ei[] =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct qmi_response_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x02, + .offset =3D offsetof( + struct tmd_register_notification_mitigation_level_resp_msg_v01, + resp), + .ei_array =3D qmi_response_type_v01_ei, + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, + }; + +struct tmd_deregister_notification_mitigation_level_req_msg_v01 { + struct tmd_mitigation_dev_id_type_v01 mitigation_device; +}; + +#define TMD_DEREGISTER_NOTIFICATION_MITIGATION_LEVEL_REQ_MSG_V01_MAX_MSG_L= EN 36 +static const struct qmi_elem_info + tmd_deregister_notification_mitigation_level_req_msg_v01_ei[] =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct tmd_mitigation_dev_id_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x01, + .offset =3D offsetof( + struct tmd_deregister_notification_mitigation_level_req_msg_v01, + mitigation_device), + .ei_array =3D tmd_mitigation_dev_id_type_v01_ei, + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, + }; + +struct tmd_deregister_notification_mitigation_level_resp_msg_v01 { + struct qmi_response_type_v01 resp; +}; + +#define TMD_DEREGISTER_NOTIFICATION_MITIGATION_LEVEL_RESP_MSG_V01_MAX_MSG_= LEN 7 +static const struct qmi_elem_info + tmd_deregister_notification_mitigation_level_resp_msg_v01_ei[] =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct qmi_response_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x02, + .offset =3D offsetof( + struct tmd_deregister_notification_mitigation_level_resp_msg_v01, + resp), + .ei_array =3D qmi_response_type_v01_ei, + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, + }; + +struct tmd_mitigation_level_report_ind_msg_v01 { + struct tmd_mitigation_dev_id_type_v01 mitigation_device; + u8 current_mitigation_level; +}; + +#define TMD_MITIGATION_LEVEL_REPORT_IND_MSG_V01_MAX_MSG_LEN 40 +static const struct qmi_elem_info tmd_mitigation_level_report_ind_msg_v01_= ei[] =3D { + { + .data_type =3D QMI_STRUCT, + .elem_len =3D 1, + .elem_size =3D sizeof(struct tmd_mitigation_dev_id_type_v01), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x01, + .offset =3D offsetof(struct tmd_mitigation_level_report_ind_msg_v01, + mitigation_device), + .ei_array =3D tmd_mitigation_dev_id_type_v01_ei, + }, + { + .data_type =3D QMI_UNSIGNED_1_BYTE, + .elem_len =3D 1, + .elem_size =3D sizeof(uint8_t), + .array_type =3D NO_ARRAY, + .tlv_type =3D 0x02, + .offset =3D offsetof(struct tmd_mitigation_level_report_ind_msg_v01, + current_mitigation_level), + }, + { + .data_type =3D QMI_EOTI, + .array_type =3D NO_ARRAY, + .tlv_type =3D QMI_COMMON_TLV_TYPE, + }, +}; + +#endif /* __QMI_COOLING_INTERNAL_H__ */ --=20 2.34.1 From nobody Mon Feb 9 04:45:40 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E83D35E543 for ; Tue, 27 Jan 2026 15:58:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529492; cv=none; b=Kvlmb3f6bpFGKMNQl+TsNK3rhtv4psaWcCzDlyLHQG+xFBc/aNJvJXb77ZV1trFQ3hGVWlEJGgpItNu9o06r9zsjH2pq3/uoJEzFX1XC4SOYpBsvrmJWbox6A95x2CrujLvk2RaemTvjNYiXihm70qbL5hu7bKoThqrjm9a5t/E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529492; c=relaxed/simple; bh=75Hv2ud2YpxXHB3QLKMzr5BAhjhniJy//FaHGuH283c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=rLjGw6rrN3rZ+yALzcbWPeaZWVoFyEOmqSb/6PkcNg7Phl3a0bNDSGUsFot1tpNKgLio6CbKaL4KRCvR6pbjUDV/cDj/jIwsrSi97G9WTRo71KXdMlNi4zneM3a1eOu9neh7Z/zyrCGZzrLeS3uCqXWDouTuezSkZDtpJ8QxH54= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=MCQnY1Ov; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=HIKMkPAb; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="MCQnY1Ov"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="HIKMkPAb" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RA8r9W3857955 for ; Tue, 27 Jan 2026 15:58:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= x7DhjQ0phVpxDU6sKo7qBxnzRhjAFpM0+5pWd1KBa2Y=; b=MCQnY1OvOIuLXyHW 30F1Zx2EyvfiSzuyK9yi6yzsxDRmgGrUeg6sPhJRFLjJNpaRwJ6/aO3gLxz0Py5W lasreqt+mzqH0xREHSmMM8YlFT90TPm274Ws2/PP/IeFeQ8EOFVoLXqY/Y1CXKAM 2xLEYUB1zgtbwG9U6PtdkPFFELV4cyifHvoHZdIfAzC+jV96V1fZUV5YPv/ezG+C TL+K7/KW7oqKThWseLr52/Yxasw+Gk3/RWxfnO8mC08zVlYvpl+4ebfS+yCpDKdn LESrxuV5nWkHUrGGAGGwqbkBQorGXTx271cXpOJjtdP9BVW0kYU2CE0Cu/5s2Vr8 YG9Ahg== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bxffs3adg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 15:58:07 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-822f926eff5so2368008b3a.1 for ; Tue, 27 Jan 2026 07:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769529486; x=1770134286; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x7DhjQ0phVpxDU6sKo7qBxnzRhjAFpM0+5pWd1KBa2Y=; b=HIKMkPAbIwgMBst1s43c6hIFhPtDJnyxlsCzVR6KW5IrJKOdNQHQQdGt0A5wdzRNOY 3131wiuB0vnfDYqGRcWIJemS3mWw2pqNTqn8QRwzc71dn9IaVf7hMuar6EljVZD8InoU Paa2lDtumS1bC4fwT7t+y+oiwhGbgOE8MxhafDnWcfaIXdJ/7mV0gzwEFaY0FmOJI5U8 mTN/+bKpIDBtU55F3wEn8VQRkDftzT+vNe/Dsle7wGN3Va8sdHaPaAOf7MmLmQR9nkOI VbwHYRswzlXvAsqXMba36WOtyckMY3ZKlgThCqNOpBGDv9dZ0KGrYPWMp4dstGEvfIoZ UuXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769529486; x=1770134286; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=x7DhjQ0phVpxDU6sKo7qBxnzRhjAFpM0+5pWd1KBa2Y=; b=pQLAFs8ndVClX675UkivEJFnRb859WbOjKGrg6xymhzzMcxnn/TFcGGL4U8kitZ2Ak tFFJ9Cur05D/ve77a9vdZ92fLrvc/IzEU4qOgoMKynqfsdR4wo/yXkALZA5jSvNMkwjR OpVtgAKrgG8B9TqdSuWZn8rdISPUsdRdgWmQG3u1Gu+PM0qpO3Hq+69apQln4LlIDY+o r5uBw2xeZRnmOWbIdWc3+bXl7kq2tbhTXCZescjeLPWs55jKbe7JzOA/LTuR2suvAF6d VRx8Oyq6guKmNeBWPQRTL2rTDsEE5nHWngO4Nf9Iq2jGz/J+75M2eyulSAZsn2F8Z9aD LPIw== X-Forwarded-Encrypted: i=1; AJvYcCWLTX2bcAQuGcfD1Bjh9yADuMKfRxciCwZEASZukb/8S7Ff/NLtzDDDm3rTowOIc89TPOV2bNvntjd6IiU=@vger.kernel.org X-Gm-Message-State: AOJu0YwxVbP97icPYjoYfsyPne9mopPgISuzvW1lJSrpCegLYzwC6tmQ 0Lpvn+AErvYePGzv0NHgmuEzSlfMo+3+LrxFYXhiFptceJJ0KRS/Gb9P15K8yBJ8OBn20JPRK66 59OEkex0lo8RqkpHiZt6rHs2pNYgk+a8hNUTYk+quiXUKMdNFvgD4qvUUpiDKtOeUP64= X-Gm-Gg: AZuq6aJcHGtap+flYDpljPjx3oNZo6JFhlaNPH8yMdAp3aMvkgvmKj023LkcchZmwte b1fgOY5azJRCfvb3epBQuTqfTuyrV0oNFaryALJUbzP2cAdCfahgTh/Vg/V6QDRTaxr0T6sdfMw fegbkisXTYL25oDCdUtt4UAaBmquMzm38eADcHgEswxNy0cYN8MtKREubPyb+g+IvPTp3xoNh2k fs4cNdxbJg1ku5e2yVSF92rd7lJHL5Gpd1PoZinEp+of3R7hfTNMRsef6mgC5UH3BWQwEAKwJ2Y 5s3a4YWrc+o1tlloJoHWUyoLo79RgIv6SGfzZTB96iWuMueHB9r8ofsIg1ZBkY8w0aQ1Vv9uZ+B uhHjdTQMx6RbpywavyVSO9vd78qFljxtdDlAsXz0= X-Received: by 2002:a17:903:1a90:b0:2a1:10f6:3c1 with SMTP id d9443c01a7336-2a870d719ffmr25767625ad.26.1769529485849; Tue, 27 Jan 2026 07:58:05 -0800 (PST) X-Received: by 2002:a17:903:1a90:b0:2a1:10f6:3c1 with SMTP id d9443c01a7336-2a870d719ffmr25767395ad.26.1769529485130; Tue, 27 Jan 2026 07:58:05 -0800 (PST) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802ede745sm120577465ad.44.2026.01.27.07.58.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 07:58:04 -0800 (PST) From: Gaurav Kohli To: andersson@kernel.org, mathieu.poirier@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, konradybcio@kernel.org, mani@kernel.org, casey.connolly@linaro.org, amit.kucheria@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gaurav.kohli@oss.qualcomm.com, manaf.pallikunhi@oss.qualcomm.com Subject: [PATCH v2 5/8] arm64: dts: qcom: lemans: Enable CDSP cooling Date: Tue, 27 Jan 2026 21:27:19 +0530 Message-Id: <20260127155722.2797783-6-gaurav.kohli@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> References: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: SiB9qtSOrWKDxuHskZ9_uPqdS2tklD7a X-Authority-Analysis: v=2.4 cv=YpcChoYX c=1 sm=1 tr=0 ts=6978e08f cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=_rgrqTzvvZAetH2WXeAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-ORIG-GUID: SiB9qtSOrWKDxuHskZ9_uPqdS2tklD7a X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMCBTYWx0ZWRfXwOhv7mzxEHA+ 5UWsb6JbM1bXpZs9SA+zYSOGvf0Q3bQc7fUH2gDwYCkeKC/YlBUOjRsLAYKyh1F2bfnWRJfnW1y DemIwK6cS7e53Xm+E8mXIdKTLZVQNjKLfU+hW9MTK8XBjCnHVUciGfPR/NMw12/8BjJS2BfuqO+ i+n2D/QXWdq6mXGpVgDeIbQ6vMAO2L3Sn5SwA3pbbN+lUxDsoFm+CiIC7nGVX2UHBivLIt19Avd 5EkI/D4YTbNg5UcmTWKvh01YFYDsyR6KcblIkMqJkVe9b0EPL92KUdyBRWjiANDVi6UPXhp8i3S HQ+ZWBU8ayfppsyQCzIKs4nMf+f584sQRBs+TOGgNZW65Nrq9gOPvIrUcOVjxquw06aVE/zyjM0 levme6Nlh0hEWa+/1pek5lXonwrxHcuDG3lv4+aO6bSJ316c2P/lx/vUHv6wgtITH4qhYNCItjy uXJQ1Zwvd8YvYsUq+GA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 phishscore=0 impostorscore=0 suspectscore=0 spamscore=0 malwarescore=0 bulkscore=0 adultscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270130 Unlike the CPU, the CDSP does not throttle its speed automatically when it reaches high temperatures in Lemans. Set up CDSP cooling by throttling the cdsp when it reaches 105=C2=B0C. Signed-off-by: Gaurav Kohli --- arch/arm64/boot/dts/qcom/lemans.dtsi | 138 ++++++++++++++++++++++++--- 1 file changed, 126 insertions(+), 12 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qco= m/lemans.dtsi index 808827b83553..c747dd534caa 100644 --- a/arch/arm64/boot/dts/qcom/lemans.dtsi +++ b/arch/arm64/boot/dts/qcom/lemans.dtsi @@ -7281,6 +7281,15 @@ compute-cb@11 { }; }; }; + + cooling { + compatible =3D "qcom,qmi-cooling-cdsp"; + + cdsp_tmd0: cdsp-tmd0 { + label =3D "cdsp_sw"; + #cooling-cells =3D <2>; + }; + }; }; =20 nspb_noc: interconnect@2a0c0000 { @@ -7444,6 +7453,15 @@ compute-cb@13 { }; }; }; + + cooling { + compatible =3D "qcom,qmi-cooling-cdsp1"; + + cdsp_tmd1: cdsp-tmd1 { + label =3D "cdsp_sw"; + #cooling-cells =3D <2>; + }; + }; }; =20 remoteproc_adsp: remoteproc@30000000 { @@ -8168,7 +8186,7 @@ nsp-0-0-0-thermal { thermal-sensors =3D <&tsens2 5>; =20 trips { - trip-point0 { + nsp_0_0_0_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8180,6 +8198,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_0_0_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-0-1-0-thermal { @@ -8188,7 +8214,7 @@ nsp-0-1-0-thermal { thermal-sensors =3D <&tsens2 6>; =20 trips { - trip-point0 { + nsp_0_1_0_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8200,6 +8226,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_1_0_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-0-2-0-thermal { @@ -8208,7 +8242,7 @@ nsp-0-2-0-thermal { thermal-sensors =3D <&tsens2 7>; =20 trips { - trip-point0 { + nsp_0_2_0_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8220,6 +8254,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_2_0_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-1-0-0-thermal { @@ -8228,7 +8270,7 @@ nsp-1-0-0-thermal { thermal-sensors =3D <&tsens2 8>; =20 trips { - trip-point0 { + nsp_1_0_0_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8240,6 +8282,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_1_0_0_alert0>; + cooling-device =3D <&cdsp_tmd1 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-1-1-0-thermal { @@ -8248,7 +8298,7 @@ nsp-1-1-0-thermal { thermal-sensors =3D <&tsens2 9>; =20 trips { - trip-point0 { + nsp_1_1_0_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8260,6 +8310,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_1_1_0_alert0>; + cooling-device =3D <&cdsp_tmd1 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-1-2-0-thermal { @@ -8268,7 +8326,7 @@ nsp-1-2-0-thermal { thermal-sensors =3D <&tsens2 10>; =20 trips { - trip-point0 { + nsp_1_2_0_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8280,6 +8338,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_1_2_0_alert0>; + cooling-device =3D <&cdsp_tmd1 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 ddrss-0-thermal { @@ -8422,7 +8488,7 @@ nsp-0-0-1-thermal { thermal-sensors =3D <&tsens3 5>; =20 trips { - trip-point0 { + nsp_0_0_1_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8434,6 +8500,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_0_1_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-0-1-1-thermal { @@ -8442,7 +8516,7 @@ nsp-0-1-1-thermal { thermal-sensors =3D <&tsens3 6>; =20 trips { - trip-point0 { + nsp_0_1_1_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8454,6 +8528,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_1_1_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-0-2-1-thermal { @@ -8462,7 +8544,7 @@ nsp-0-2-1-thermal { thermal-sensors =3D <&tsens3 7>; =20 trips { - trip-point0 { + nsp_0_2_1_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8474,6 +8556,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_2_1_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-1-0-1-thermal { @@ -8482,7 +8572,7 @@ nsp-1-0-1-thermal { thermal-sensors =3D <&tsens3 8>; =20 trips { - trip-point0 { + nsp_1_0_1_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8494,6 +8584,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_1_0_1_alert0>; + cooling-device =3D <&cdsp_tmd1 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-1-1-1-thermal { @@ -8502,7 +8600,7 @@ nsp-1-1-1-thermal { thermal-sensors =3D <&tsens3 9>; =20 trips { - trip-point0 { + nsp_1_1_1_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8514,6 +8612,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_1_1_1_alert0>; + cooling-device =3D <&cdsp_tmd1 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-1-2-1-thermal { @@ -8522,7 +8628,7 @@ nsp-1-2-1-thermal { thermal-sensors =3D <&tsens3 10>; =20 trips { - trip-point0 { + nsp_1_2_1_alert0: trip-point0 { temperature =3D <105000>; hysteresis =3D <5000>; type =3D "passive"; @@ -8534,6 +8640,14 @@ trip-point1 { type =3D "passive"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_1_2_1_alert0>; + cooling-device =3D <&cdsp_tmd1 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 ddrss-1-thermal { --=20 2.34.1 From nobody Mon Feb 9 04:45:40 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E4D835D60B for ; Tue, 27 Jan 2026 15:58:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529495; cv=none; b=cS4UkEnYizUAnCD8yu/gG13z54NAYpjnTr/HPb5hIbgaEQr2mW2N7MGFoGyTVdJU8aoR9+wNrf5KsYk5nXFNQibwYrAAHd1/shu2a651XbmHYD12aC3kvWoRV2rvMIs0ZJid6IDAfNQZ0xnN3c54xdtlMBAXV5MRU9eAE05mQ1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529495; c=relaxed/simple; bh=imtITUMdGl12JmD9BqLF6obXBs2hrUtdLo4cmRhOnEg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ihgiF/hRgNdjRoPbcVhfu6lpCkBtpfEtfIW3FLkalu6KYyCxXYf0x78V64n6M2UJbcHzZjjKj45csMOl4PIl+H8a2zOXLIckpxzthk+ww+NOXbEZBwhmUEwh/aUA9xN0F33NKwmuGvP8NAOFgTDOvop/+BY586Cmzv0cBEUrhmw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=k9l0BtHs; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Tybqx73X; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="k9l0BtHs"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Tybqx73X" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60REZfPh1065942 for ; Tue, 27 Jan 2026 15:58:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= jK9v27e9BZ+Wwf8D2qBSh4rJOfb5MBzZq76RGHeZTQ4=; b=k9l0BtHs9jmTcDc9 RLFbrXAwEEHxBkgqN7JkKr057KYnbVGev1dqezGf09ldL140BX4Ajiga5aHObGA2 2lQ5Y3tDSOigOOFxrqLwj1v2X7J5vazuA2eWvLjEJX69inV6CLKduy2fUl9nzuRt hFoF8N+R1qEiIr8pGVfdvrZYT/+1Z6J8C/Hopoxc56/r3FjV5ilckkiT+qES3lKl 4hluLEbtNjTgsU3RbKxC7riUSF3AUgusba/cel56sGGF6QmSq1jrLgBzxsIKnRdF 27mR/Dvg8OiHh1S4YzO182pypC/bb1mTqmqhlUykIEZLXCo5GzFwD9yRwEYXM/3B RHx1Nw== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bxy8x09tb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 15:58:11 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2a7a98ba326so64277415ad.1 for ; Tue, 27 Jan 2026 07:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769529491; x=1770134291; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jK9v27e9BZ+Wwf8D2qBSh4rJOfb5MBzZq76RGHeZTQ4=; b=Tybqx73X4TXD0DlHGhIM+XBzdxmDrH0BxfN/y6aWbAuRkY4T4nodEgG/ywCgL/rdWF bXwUEaQc+iahHaQZ0mDlzKKk1bZxHQGxXDcc+7O38DRVO/eG0ye1ub8L8qxNq2T7G+I9 ioZ4gh8Cc8eM1zbuSOHpiaSApWP4cRszIcdxX2jRy/GcMTkPVI1iWdDAs3sQo6xcDxvD WhdmNAP81hxreGDjK8UxjrBVWtxuZRjEj2ovFRQv6ceuJCnZXBoaafJGTTcfFZS5bM6I WqgTcmO2is6f+V2H5aUVgPvD0mcHKUTV76eBghEtCbso1o87dcRjDV4kYhbWDh9YlF7l p8IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769529491; x=1770134291; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jK9v27e9BZ+Wwf8D2qBSh4rJOfb5MBzZq76RGHeZTQ4=; b=qfq1sNnD1iTZbX4fzG2h+x4PAY5yCmIjMA5E1Hy8sfXsrE8qdKHLXVYmbBU903ZRh1 LkDBqYoGegTyWrxNw0OCZosk/q/80++1piPHcRBkFS/1Do4YLZVB3Yxf/SxO1BUSHPzk OJlusXz3PIm23Pqxfu2ztZkWltCY6WUHV9efsH1sFMPML8gJ+s1G2dwHMMWgwelVq8pz qiTlnZ/t3u4atRadZPKMGaGR6+GldxhtwYaGFly/30RQH5I7yepJR7yHQSd8sxWqwjw1 Dcx6U5gb7f1Va2nn5XzRjbZ155UohDcJOfK2WUm5lcWH+XS0RkcoNhgN5DeTtvBjsa4A sBJA== X-Forwarded-Encrypted: i=1; AJvYcCUEWsD8Xbk85cUnRDfzAfM1qlT4f6lDZSFGlIVBJOqRv4o0ULlyy2IzJe/MmvaB1nPUx3iVhr76pC/y8Ig=@vger.kernel.org X-Gm-Message-State: AOJu0YyKBxaIfGQpGQSN1fheEQkoGh7tP6/owLmIr6qr5XSKnJ2MSsXU /OiUjFSgPjR6xqDmZhTj7yuNog3ux79HhnQdrGY9M2Q251ktHcyio3e972iiM2N0ct7lJJX0cHX ju7imfaRNr3myC01PQ0DBGD3eK9finXDE/ja0O0LFneLz6K45Hu0ApIqg50HoN0/tgLc= X-Gm-Gg: AZuq6aItZeZ1hLV7oZG4J8dPbXNyCw1e2THTDSW/m3oQy/IYgywf4q4dBA+ooiGl+XN aBqmQL9FO+8O4ayj6pgR9igqvwP+T1KJXurT6LIy03l7tQBHQYch882Pkn7qlx8Olkh4pjoxqHO kfRr6VqyRiwXzhOQNdlyvgKEUOmiZDzhGXjOtqz5967N+p5DB3Qk/WfW+ZS7ODFRAsF+IbP32jT q2wlDeC/7blc2boaEjtZVAeuYMP0FWPuEx1E0FHjnOrwF5RlSFFMuXaztl5Ns2+LgNfyCsQClua 7nOwn/S5WoJSACyg87c6TbYAXXRkMDuBZH+2oFbl8NsCLdFdD292uM+BX5VaoFXnK5vqJJ6JHbv iOQ21mWZUReLySWm6UutNzsRbt5Q6Ld+SFv6hY3U= X-Received: by 2002:a17:902:d490:b0:2a0:d0ae:454d with SMTP id d9443c01a7336-2a87133729cmr17254735ad.22.1769529490798; Tue, 27 Jan 2026 07:58:10 -0800 (PST) X-Received: by 2002:a17:902:d490:b0:2a0:d0ae:454d with SMTP id d9443c01a7336-2a87133729cmr17254425ad.22.1769529490171; Tue, 27 Jan 2026 07:58:10 -0800 (PST) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802ede745sm120577465ad.44.2026.01.27.07.58.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 07:58:09 -0800 (PST) From: Gaurav Kohli To: andersson@kernel.org, mathieu.poirier@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, konradybcio@kernel.org, mani@kernel.org, casey.connolly@linaro.org, amit.kucheria@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gaurav.kohli@oss.qualcomm.com, manaf.pallikunhi@oss.qualcomm.com Subject: [PATCH v2 6/8] arm64: dts: qcom: talos: Enable CDSP cooling Date: Tue, 27 Jan 2026 21:27:20 +0530 Message-Id: <20260127155722.2797783-7-gaurav.kohli@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> References: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 4Or1M2O_Px0EMsQazwKkgDBHFhKCHiVX X-Authority-Analysis: v=2.4 cv=OcWVzxTY c=1 sm=1 tr=0 ts=6978e093 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=9S75qEfK-iFrpP9ttAoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-ORIG-GUID: 4Or1M2O_Px0EMsQazwKkgDBHFhKCHiVX X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMCBTYWx0ZWRfXxmxjsCK8afHC 0V8ZqUnC/SPrMzD4XuCtXA1O7d55456aH33LDGr9MDGeo6H3gi5aysKa3gqUIhrhbYlJDOtVlUd MM8mwIeaLw3dYG/IGbQibe5OnXgnDwYiIfqr7mqZD/swEp8zm760eLHZTDmPc0Xv7lLjfmIXwfS IwSNmDykRlqy5XJF1tIRnJ3o8CLUvYlrWjr5ZyNKiAJWHu4GDEkjKYNR0rRLv5+iilNZEdQ1y6W 6bXNlN5x1XkWnMpYvEyCk7WfbCVbgyYVz2HuCDT3uVobeyC+z0SOHyyoD95OccfiZ/y2n+klrWL 9C6R7bgLBlL/G4U6KcPqZ0+Jq+0EMUOdDIHPO6yXqnjNURp6CDE2Gt9ylhMIB+wDY5EuXWyZlAp EusRursWwnJih6+87my9Bu6aqFQwSiiJzdtW9f8D39WByT64MRyTIoMazvunmTEP1UQVxvfz5il 3WEYEYnU6jy2Raa7T6g== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 clxscore=1015 phishscore=0 impostorscore=0 malwarescore=0 bulkscore=0 suspectscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270130 Unlike the CPU, the CDSP does not throttle its speed automatically when it reaches high temperatures in Talos. Set up CDSP cooling by throttling the CDSP when it reaches 105=C2=B0C. Signed-off-by: Gaurav Kohli --- arch/arm64/boot/dts/qcom/talos.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/talos.dtsi b/arch/arm64/boot/dts/qcom= /talos.dtsi index 75716b4a58d6..4091afd0b6e3 100644 --- a/arch/arm64/boot/dts/qcom/talos.dtsi +++ b/arch/arm64/boot/dts/qcom/talos.dtsi @@ -19,6 +19,7 @@ #include #include #include +#include =20 / { interrupt-parent =3D <&intc>; @@ -3554,6 +3555,15 @@ compute-cb@6 { }; }; }; + + cooling { + compatible =3D "qcom,qmi-cooling-cdsp"; + + cdsp_tmd0: cdsp-tmd0 { + label =3D "cdsp_sw"; + #cooling-cells =3D <2>; + }; + }; }; =20 pmu@90b6300 { @@ -4845,12 +4855,26 @@ q6-hvx-thermal { thermal-sensors =3D <&tsens0 10>; =20 trips { + q6_hvx_alert0: trip-point0 { + temperature =3D <105000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + q6-hvx-critical { temperature =3D <115000>; hysteresis =3D <1000>; type =3D "critical"; }; }; + + cooling-maps { + map0 { + trip =3D <&q6_hvx_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 mdm-core-thermal { --=20 2.34.1 From nobody Mon Feb 9 04:45:40 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B96235F8A3 for ; Tue, 27 Jan 2026 15:58:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529498; cv=none; b=tjhkQalphp2RsDuvMlVnZ00roKAfMuYPvRVzWWpddJXfDjSLbRq3f1Rja3UxK778hSBouImyT8R+BfvA88A4mYwMIo+KtIkZEHNsQ0mIPJtZ0jOXL9L1G6VuzxKCYS5guufGJekFZ1vIfkE7ScRSjZrkmX8lD3eVRq5+EnULwlE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529498; c=relaxed/simple; bh=rT9aOvKoSdoVMoHRIYOqTjccVfZ8vSzhwbpRtBd8d4U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ahOxL3kg25Kr5CtZT9r6IT8P/tx6+8CA1C8Hbsd67/SOjymhS4/zklOhDmKzK4QGXlgtBSXnlycnlOfi+rHMAOBTLAW4wPrPT6H0De02Jdt4sTPhDUfzo7rAJ0ugYyOY3hU+wrUIbubDn3urWVXqjqEcxU6cIuBQ4l4PRmC2hKY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=MckToMAX; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=GyBE5OAN; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="MckToMAX"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="GyBE5OAN" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RFA5in2379299 for ; Tue, 27 Jan 2026 15:58:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= F+ZHp27u6SO09MSQuvFyIVk4/ZmKs1kInQ5godvccYU=; b=MckToMAXYIa8T6OI vGtZEhd1polk+Ow4u8Tp/ZNtsbWZNEwPLWVomCBClbTeOvc/Xv7rMaESHIve8Qzh 6aF43VuejqjB7vU9gitmIFS1AgawiE9qtnDrtYdQrshlF2HDle19+OvV3O/2hLjC ekGIA6QMxPg78U2IX1xvqQTfB84AIQK4LUydKnSX0r+pRMAsmIyEyrgwK/x2Py8E 7Rn4LJSofT9SHv2zt1r9osDXOij3YBHGZl6UKB3mjom7wRkMPtel9TyhwWJ/05Wb TJ0Oj/sjZ6wEUt9aGrOoZRs0D91m05rsFKArpvfQnkeQTt3mzMIFcJWXcvMmwRiP mkXg+w== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bxsjr9hdu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 15:58:16 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2a13be531b2so58185075ad.2 for ; Tue, 27 Jan 2026 07:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769529496; x=1770134296; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F+ZHp27u6SO09MSQuvFyIVk4/ZmKs1kInQ5godvccYU=; b=GyBE5OANqbz3VLkJYtdL37ozw8xF508XEVtkcO2HQTH4+YyRYrwSM+eB5pdN5+Npmx zJQ0iA89z9AKL0BIVxE9SZPDWndP2ZtAfKcKw6+5Ix2b9eZc/vS4yAjJjDOI2PBozXa0 Pz/fZZn/Wt5JgVQCe1AmrqkvFzenO35E/1Er4Yb3bIE2HwHIg9W+LRoUlF7U3PsFNzGF M5W5dUbnmcMU9gNlVX8ckpCt3c3a+L2htPD5JDBi3fLV9b7PqW46n3J4OGQzIuo+WKVK SgyIlOD7nO1ZqwPOpNyi7RDfdLMdZWdhOyPPYSrl7PF8r764zDy2PNrOOk4jgJ+Cmjgf wKVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769529496; x=1770134296; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=F+ZHp27u6SO09MSQuvFyIVk4/ZmKs1kInQ5godvccYU=; b=uUQipiTxkmfzP4L96MFHKUsOeZAfLEtPmCGsO/9UBz36ypOaztEWdewt0Uyp7z6L+p TKtU6ziIjE3PAZQ8ovy/gkHfELNUx7JFCmx6gafcxcjnUjYITQ40KNnaPJ7dIknp1x9D GVpTrKo54W4y0jerrrIPSq3aRuHjPA0yfKhWx+VfuxNlIYzYGwk7GXaE6HoXk9mKEfP2 5oafeUiy9bwEUlddzuwEvI9JML1dKZr/F3K66E8K7jOxaPYm9Kwosh5FNVo2meyGmJ8T rGDl5NLaiDZeO6rB0JdSF9GnYRoguIAJ4tTomL07UqQ3ipP0Gs9lZEFcqJWQkQ+0EbOf 7rDg== X-Forwarded-Encrypted: i=1; AJvYcCXiUqkfjCygvLmSPfZ3Z65H2RaDMl6w00j3+tvVPbyeClQ1l9u03FhNI0j4A6llACMUNA95C1BH+o5JxF8=@vger.kernel.org X-Gm-Message-State: AOJu0YyYXsnEUZPNHrfG9ClVbEvCI1i/VnhaM0TQxoLlzlwuv3M01AHu ZgC9oItU5HazansJa+QAKbtx9+pCV7Z75fB5btDDbgrppYqMlrAe6Zab98hO/dEOSlJQcJ1v7Q6 EvkOQbvv7JW0ruLKjpGKk/788yka3azvLM6MryKuVAUolpazPn6vmYeF9i3sBdNBUdw0= X-Gm-Gg: AZuq6aKGKChhns07cMUhcZnUnNJAZvyTWShWs/8CAGmkI4Khh88FmLaoxWSJXurJwFC Xs4qTrsQpemAEQ9fKq7xrNCrgNljkuvvB7XzyBrQ4IoIVX3pIfr+oTh/EE7aukn+P2Z5RMhBoPV XVyf0PCRKNmvWpLcPqnHrOBOsF7p5fY1Mzu0cJ+7sEaGECTT8Jbn6vAriFjG+AMpqmyw7fGIJGC eNBRYJg36S3JsMU6Vrf00QRWAAQSJlhtmk3XyhFrOIGK2PaGRd+JVDgkGfpaiWrP7GF70+56qOH sqaxWXZcaqKIVNDUHND82CEK3GifVF1ECnOuWCvQUUWSlBITIWPe1IYpn43yaU8k3k8T/JOgqSi icnjvmNHHI63RAsQJxRCWmxk901LeJK8M7pEGRb0= X-Received: by 2002:a17:903:1206:b0:2a7:a98b:9fa7 with SMTP id d9443c01a7336-2a870d96a7dmr18054835ad.25.1769529495512; Tue, 27 Jan 2026 07:58:15 -0800 (PST) X-Received: by 2002:a17:903:1206:b0:2a7:a98b:9fa7 with SMTP id d9443c01a7336-2a870d96a7dmr18054575ad.25.1769529494982; Tue, 27 Jan 2026 07:58:14 -0800 (PST) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802ede745sm120577465ad.44.2026.01.27.07.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 07:58:14 -0800 (PST) From: Gaurav Kohli To: andersson@kernel.org, mathieu.poirier@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, konradybcio@kernel.org, mani@kernel.org, casey.connolly@linaro.org, amit.kucheria@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gaurav.kohli@oss.qualcomm.com, manaf.pallikunhi@oss.qualcomm.com Subject: [PATCH v2 7/8] arm64: dts: qcom: kodiak: Enable CDSP cooling Date: Tue, 27 Jan 2026 21:27:21 +0530 Message-Id: <20260127155722.2797783-8-gaurav.kohli@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> References: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: JLI1ZtFtL_ZUpNtiKsg8hCJs9oWuzsye X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMCBTYWx0ZWRfX1Pg3/Um1KG7O xYqoU7e+uU5W/GzBQOMwscISouUaDBg6fezBzE01sOuWEK2yP+KVgbsHn8fDf8l4hZk76hrFWpk ZBV4DqhVaz656rKSU7Ir4uHrm1TE6BCNBAitbsMl29e38LbIWMpwd0SVuWKV/cWS7BXNCLst87d P6AKK1NEbiMnjZo2mBM8YUADguBfHzinT2dARlp6L12h9xpiZ7Pv990IXgO2WH3PDc7uG+AeiWY t+Mog+8HHKHBwFZUUXCSs3E6aAE3eJBuvwjrS7pSSoMShZFnoQqMJfVa0V8Mz3iz9Lk2Spa1ngq fKzZXVV4jHcF9dd/Jo5wdg7VJKrobB8Ku574wssKjh6rmdkETETDtjNdqcnQ1UBZXte3jwc/emY HTYAkfmhBhLwR8yZvk78z9VGG8VP6OjVYPJ47RnI6NW4ZU7WzKefktv8iZeo2ktbLs84D9hGVx9 +67x9X1MiAkJ1XL7ABg== X-Authority-Analysis: v=2.4 cv=b+i/I9Gx c=1 sm=1 tr=0 ts=6978e098 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=9N0ZlmuXsyx8K3-BwEIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 X-Proofpoint-ORIG-GUID: JLI1ZtFtL_ZUpNtiKsg8hCJs9oWuzsye X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270130 Unlike the CPU, the CDSP does not throttle its speed automatically when it reaches high temperatures in kodiak. Set up CDSP cooling by throttling the cdsp when it reaches 100=C2=B0C. Signed-off-by: Gaurav Kohli --- arch/arm64/boot/dts/qcom/kodiak.dtsi | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/kodiak.dtsi b/arch/arm64/boot/dts/qco= m/kodiak.dtsi index 6079e67ea829..3c79572bf55f 100644 --- a/arch/arm64/boot/dts/qcom/kodiak.dtsi +++ b/arch/arm64/boot/dts/qcom/kodiak.dtsi @@ -4793,6 +4793,15 @@ compute-cb@14 { }; }; }; + + cooling { + compatible =3D "qcom,qmi-cooling-cdsp"; + + cdsp_tmd0: cdsp-tmd0 { + label =3D "cdsp_sw"; + #cooling-cells =3D <2>; + }; + }; }; =20 usb_1: usb@a600000 { @@ -7600,12 +7609,26 @@ nspss0_alert0: trip-point0 { type =3D "hot"; }; =20 + nspss0_alert1: trip-point1 { + temperature =3D <100000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + nspss0_crit: nspss0-crit { temperature =3D <110000>; hysteresis =3D <0>; type =3D "critical"; }; }; + + cooling-maps { + map0 { + trip =3D <&nspss0_alert1>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nspss1-thermal { @@ -7618,12 +7641,26 @@ nspss1_alert0: trip-point0 { type =3D "hot"; }; =20 + nspss1_alert1: trip-point1 { + temperature =3D <100000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + nspss1_crit: nspss1-crit { temperature =3D <110000>; hysteresis =3D <0>; type =3D "critical"; }; }; + + cooling-maps { + map0 { + trip =3D <&nspss1_alert1>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 video-thermal { --=20 2.34.1 From nobody Mon Feb 9 04:45:40 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC122361670 for ; Tue, 27 Jan 2026 15:58:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529503; cv=none; b=sTl+SA6appEHboeyYwja0AJyI+8cu2cdmp6B+4r8W7uQkg7lftt21jmxVxao+Mh3nvx8sZizG6YiyCTUU+aca4gCu/EAgljyeCxfETWadYxJtVdGIgC3qBfrNp5Rl7UufinRImRcQRXpZgYz6JYx0Vnvr3k04L0OAJCExwvX22w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769529503; c=relaxed/simple; bh=F/WRCepjFcpZUUlC6qKcNtIckwG89xuifemDPktE66M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ckASVvYgpXr1A57bWqiyCGmvf/C/QjY+Jy11r5CAo+el7AWdKbRnhil2zwi+hmhk73fpx0QQTAzkUV+h/2f6rHAtu6W2YACwTOVPny4gOfdksczkW9DASq+7Nr6mawgodMxmIXdijELR3734HvJjgq/XDk5XavDuM5sqFC6BPOM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=H7QtjTqX; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=kqH3vOlb; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="H7QtjTqX"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="kqH3vOlb" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60R9u2Im171353 for ; Tue, 27 Jan 2026 15:58:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= uXzCklFu+psMk/IKlNTq5oAZ736zPPobE3f7vWSqzaU=; b=H7QtjTqXAuw4k9a4 occA8r8M3E+Detbe8qIyRppt19qKFtMzZ0M/jgg7SFUYmUppEdtv/iWZzL6ArC2y m7VTpWEHYmoqalkwunzqygE7IXaZASNdWVB1eO/Vh0Q7g5IEQwsFTvpzNdHnA+Eg 4lhbsn5PysOrUyZUP4rGoMVmh2kNNCYX6PYfv8IN4SjeMGfBNVeLDd/4kTnKyrKj 7iG4DEynQb5evfIYFPAWKCFPliexrQpLWww6+9E4wNhhaZmdCG/T9SZYBQig5NGu 1AEOMQCEOoUwBcgXUz4iNMYVjWpm+v32CpJzeZtq4N0cV4VdTccDk25x75H0HrAh FUlSvw== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bxf3a3fk6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 15:58:21 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2a75ed2f89dso47767795ad.1 for ; Tue, 27 Jan 2026 07:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769529501; x=1770134301; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uXzCklFu+psMk/IKlNTq5oAZ736zPPobE3f7vWSqzaU=; b=kqH3vOlbRpnfhwXkKleZ+mquHbR/O8ceIvnyCg+4VLRUVcFlZ5m1wSMsIyaKnlj2yM vhB3ec59dIn2939I6PiJh0D5AovN+HFSaDUz4ZUezAbXdelv/7CNaGfpH0hNVjVcsH8w 6U2kPSstG/gEcL6w3D5ITJyqXOnGowfD0xb0Y/6M5f/oVnfOJKV8tdeA8IejOj7/6NxT Hw4RoNMZQcp3FsPEUq3HyqXbywpkW1nsm9ZtET4gmyI/fLW4o1/Jj78w7h4TktcAtxOH G3ttdtVhBWkW/WzsSX6y7cNabNQJN+RzzYgNtaBmyXXZVtXowmfBhNVfALiEWh1u0e2Z 7LbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769529501; x=1770134301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uXzCklFu+psMk/IKlNTq5oAZ736zPPobE3f7vWSqzaU=; b=f92QxdPd7MRZXEPwGWqCyLTYpXt9jlGZZrASAgfIXAbCPJkPgsqnLwQvdJMc3Ndlus P5A0+jB8z8AbaMvSS/kJ6YxrUmH0O7OH2+prUQRVLhKXJKnbbBh9vAOFeri8GkaAgQbd 5I2VqDFTerbvw5ZKCYDJhdbcndEUs3mnue74lR6gWz10IiSbs4d3L+vEbK1EAZYkKR09 Rl7YYIUooaECbUuALM7eemDXvgM/aNcSZ2Kg7TZR9d1iqCne2mtWFAACjcVjk34DawOZ aAW5VnZnFBM5KD3SsGisaEWwWvMBuykEusfHG0QVv2XRsZiVTQkmRPXHHOSjgOwyMf1a MnMg== X-Forwarded-Encrypted: i=1; AJvYcCXIKtW5G3CtlsLpdD/SP4eD1QAYmIp49fYnZ4CkTO481zHTtZucGb3MYCDcb4F904fKEwi/0TWTvFnNgXs=@vger.kernel.org X-Gm-Message-State: AOJu0YxctO2UpHYnGO67LFdEZOdfTWaaWsSqiZoSFp2HsDdgsbJNGi6K Y5v4Afcrhcow4B5TA/zt3dYz5cks28AFnEO/WfilXmax/qlk66QCQk7ux/njvdkCXCPNXrQGKFW sHyhUJWz/O7ETEh8dfWkN4OA+oGObv1wUpPw1ZrAY8gd9SHGttPqlM2QIwvyZIqMMyQ8= X-Gm-Gg: AZuq6aL1A7oZnDK3o6hPtkVn4mbqrn3VD4WWTz/3K71cAsfJi6gebsURLjLGxHddMvP DkD/tRPxgVdExfpxpUEGpnbxmGis84nb5ARhQmJ8u9frj0HN1ITh+xg2hjrWshbzr111oRnkSoA KKb/7D6pYWTGuadaRjNh0TaASZmwcg/aZBPHYwLWfUmH5DsZx1ymSElHWMPaHy11YSLs/zXJZ5I mGKz+/tSALA+ITLbv14vCaeZITjMrF9XbJMcKwQXOCpopZqEI/EFdE19JkGYzV7D+dlqhqKCSTf 2dy1VlnHwsIkKPpfPtnNcVPqN0hGyMNhPPtJf8ZVRQGaG/CAJz6cPfwHyT/thHKsWJK6Fbxl34G gt2izeN4aE66ETh2uDeaMMLO4d0Z1PoDTyKU+1F4= X-Received: by 2002:a17:902:ec87:b0:2a3:bf5f:926d with SMTP id d9443c01a7336-2a870d79392mr22357095ad.24.1769529500359; Tue, 27 Jan 2026 07:58:20 -0800 (PST) X-Received: by 2002:a17:902:ec87:b0:2a3:bf5f:926d with SMTP id d9443c01a7336-2a870d79392mr22356865ad.24.1769529499779; Tue, 27 Jan 2026 07:58:19 -0800 (PST) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802ede745sm120577465ad.44.2026.01.27.07.58.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 07:58:19 -0800 (PST) From: Gaurav Kohli To: andersson@kernel.org, mathieu.poirier@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, konradybcio@kernel.org, mani@kernel.org, casey.connolly@linaro.org, amit.kucheria@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gaurav.kohli@oss.qualcomm.com, manaf.pallikunhi@oss.qualcomm.com Subject: [PATCH v2 8/8] arm64: dts: qcom: monaco: Enable CDSP cooling Date: Tue, 27 Jan 2026 21:27:22 +0530 Message-Id: <20260127155722.2797783-9-gaurav.kohli@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> References: <20260127155722.2797783-1-gaurav.kohli@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMCBTYWx0ZWRfXwSLtFjE3R/Bx 3GbokdDHPkpKzfBICSP0WNlU/8iX5L8kTO2KSyNrz4S16M6i4mqVNDQs/VuElGan8Y5S+fqmpup /8cWkZvIGB6hmVxqg69IKLLqx9lhyVuTjXtGOyPZ00eNBxonMAwcgaeaR7saceFdF4ydKmlzMml 18DiNzZ/xwm/5C24naD+G4Yv6mH5iEyGFKnoccUd1xpM6epV36nEDBRbcxCE4OK4oNkT7OPGOi5 g9qjL9VQpNGSkw/OLHTRcZxILUnx89//BfxLrGM1oGPSbpodEmbvAjULlaBmfxIJEd1L44iYbUa Ni5p4UbtgPl3yqnfg/U9EclWHmrneqgouqg3lGGQJlzZiyWHHBm5xmZb1PNFyk76yMM3IKUpFT1 DShnsHGQA8aV2PBHSzJnPohXcO/c4HWZWPfdfFu85SYPWobVyzvukApMzWj16CFksDNv3XfdO20 2YtrzOOFdo0q/iEtd/w== X-Proofpoint-ORIG-GUID: awD2mikQ_ocrdrOaB2ziBKZirpyrGAHS X-Proofpoint-GUID: awD2mikQ_ocrdrOaB2ziBKZirpyrGAHS X-Authority-Analysis: v=2.4 cv=a6k9NESF c=1 sm=1 tr=0 ts=6978e09d cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=L7ffWoggXZAuNz6kUr0A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 phishscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 clxscore=1015 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270130 Unlike the CPU, the CDSP does not throttle its speed automatically when it reaches high temperatures in monaco. Set up CDSP cooling by throttling the cdsp when it reaches 105=C2=B0C. Signed-off-by: Gaurav Kohli --- arch/arm64/boot/dts/qcom/monaco.dtsi | 93 ++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/monaco.dtsi b/arch/arm64/boot/dts/qco= m/monaco.dtsi index 5d2df4305d1c..6d7a269cd98e 100644 --- a/arch/arm64/boot/dts/qcom/monaco.dtsi +++ b/arch/arm64/boot/dts/qcom/monaco.dtsi @@ -7194,6 +7194,15 @@ compute-cb@4 { }; }; }; + + cooling { + compatible =3D "qcom,qmi-cooling-cdsp"; + + cdsp_tmd0: cdsp-tmd0 { + label =3D "cdsp_sw"; + #cooling-cells =3D <2>; + }; + }; }; }; =20 @@ -7528,36 +7537,78 @@ nsp-0-0-0-thermal { thermal-sensors =3D <&tsens2 5>; =20 trips { + nsp_0_0_0_alert0: trip-point0 { + temperature =3D <115000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + nsp-critical { temperature =3D <125000>; hysteresis =3D <1000>; type =3D "critical"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_0_0_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-0-1-0-thermal { thermal-sensors =3D <&tsens2 6>; =20 trips { + nsp_0_1_0_alert0: trip-point0 { + temperature =3D <115000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + nsp-critical { temperature =3D <125000>; hysteresis =3D <1000>; type =3D "critical"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_1_0_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-0-2-0-thermal { thermal-sensors =3D <&tsens2 7>; =20 trips { + nsp_0_2_0_alert0: trip-point0 { + temperature =3D <115000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + nsp-critical { temperature =3D <125000>; hysteresis =3D <1000>; type =3D "critical"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_2_0_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 ddrss-0-thermal { @@ -7648,36 +7699,78 @@ nsp-0-0-1-thermal { thermal-sensors =3D <&tsens3 5>; =20 trips { + nsp_0_0_1_alert0: trip-point0 { + temperature =3D <115000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + nsp-critical { temperature =3D <125000>; hysteresis =3D <1000>; type =3D "critical"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_0_1_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-0-1-1-thermal { thermal-sensors =3D <&tsens3 6>; =20 trips { + nsp_0_1_1_alert0: trip-point0 { + temperature =3D <115000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + nsp-critical { temperature =3D <125000>; hysteresis =3D <1000>; type =3D "critical"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_1_1_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 nsp-0-2-1-thermal { thermal-sensors =3D <&tsens3 7>; =20 trips { + nsp_0_2_1_alert0: trip-point0 { + temperature =3D <115000>; + hysteresis =3D <5000>; + type =3D "passive"; + }; + nsp-critical { temperature =3D <125000>; hysteresis =3D <1000>; type =3D "critical"; }; }; + + cooling-maps { + map0 { + trip =3D <&nsp_0_2_1_alert0>; + cooling-device =3D <&cdsp_tmd0 + THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; =20 ddrss-1-thermal { --=20 2.34.1