From mboxrd@z Thu Jan 1 00:00:00 1970 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 1A62635F5ED for ; Fri, 3 Jul 2026 05:04:22 +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=1783055077; cv=none; b=PWfkG57LUjUAscrgTGwvgpfTNK2Eo1j8x3IHiBpMoQaqseBuVlPWJS6REdex+25nxrkMSPs2ggcn350tiao+iyjruwdCQvr3blaUSMvkcElQzB1Ljr49NwW3140u//kFT/RFOJp/nxeURVuMut2FNWrTScXaJhTJ8R5LG8uV/eI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783055077; c=relaxed/simple; bh=mw2xywDtGE86eMiTObjMgtV9IqdLC+USGzaPZvRA/pk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pTPBn6SH6GnwD3x1CZcFMg4GNaltgd+QKG3rKNB7bX3WEArp3I8d3M0vJ+zuBQ3SZbpk59U6B21ij2cFilSVih0WVf5N7zdJPBrg9pN/GFO+FGZXrmkjjtDW4JoIAkmNxVxFUWbHm3r6YRarNWBo8ec6cOIDqV23nncAqBi6Vp0= 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=j7ybRX7o; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=U0RwNDdS; 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="j7ybRX7o"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="U0RwNDdS" 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 66342U1h2828780 for ; Fri, 3 Jul 2026 05:04:15 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= md8wWc6/cgAOJXI2yDz++qo+slmTKVQf5dEfPIb96Jk=; b=j7ybRX7o89rK6kKu /G3+cqhxVEaf/oFTjSHPoCgSuQuP/4WzvDXZCeYbKKYKHUoVp1U9aAvX9xzWQSo0 oud29xUyfv0iTHdkzbIKklSIsErlht4XidYcnKrunC5z4A3dT1A9rdbSvpC6gUa0 EWUJpcZs09+hGYc/hSK5f8RWdhUzilHjEFoiQGybOKeCmKTCLCsrlSK286SE3js7 7OaZLixqFcogRYT49HMkCB3W51uTTvg9Hj9ZDIlTx6t6DZ52hCNM982dFEo6NbjS spTT/RPehHg+zb5DvIcaOTBjshwU6/G6JSZwuz3iY4Nj6HWL/khgVDHWohJrQhOo ZswItg== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f64b58hn3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 03 Jul 2026 05:04:15 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-37e1f96b248so408237a91.3 for ; Thu, 02 Jul 2026 22:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783055055; x=1783659855; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=md8wWc6/cgAOJXI2yDz++qo+slmTKVQf5dEfPIb96Jk=; b=U0RwNDdSfbMXx084KS9S/y7u6A2YJmxu091bVSO234Rf6pcusQWpwAXXNwzAiO2MmM I/iUwiwTbnnioza9nEX0bd1eIh2DLgrI39/B/ggsC452JcSqhC6qL3UD4+uJ7xMpzJj0 XIbEVm0N/oveB9Optfytk9VER6dlmUPQG+6jJ+KEXVqmcAZQErAYAbNL7mfGyXRroC34 Zompz0btS0R3assV3qKY9YMzsGHg8XhG1dHVjfbn9/M3jbfvk54hmbdJ8N2sH8tRjE2F nfAJe2Lky93pM5dai2fbeQJfYVoWaTOm9GPsXz4xMWxokdjCSWsFIICo29nEZ6pSt+4c GAcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783055055; x=1783659855; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=md8wWc6/cgAOJXI2yDz++qo+slmTKVQf5dEfPIb96Jk=; b=DgS4KE0zJP2EuFfRmYKhdielhaJIxhyus45UotPGCCuqCCcYAa+jVKwmoUiLZg8oEJ fG3FrxTxF500j1OfjftT2Su24PsUxPrV89yozfDr8NeV0QGaLjrubpaGrAJqpMkEVRJj i1HneTbfW4krdTjrws8sZ6mD72lBuQulGOAYQ8a1sMpDvB/58vZXXpH3yekj14Yfn4vd EFzAWl2Uo1UaXCAPQHBbAJD6hbTAzWIMigsjQAZ0HCRaWVqWsMiJmQ1usBGoA76wLSel DaOOv4im+RFq7blsEB8HvDHHVUjlDFfB4DeLI9+xS82dB1Y0egI5MDWXJ3yIzB5Cn+0E nJZg== X-Forwarded-Encrypted: i=1; AHgh+Rq/NcUCtwtzwQlUwz4avW3LXthn8eMhs2+KDOUhuUL/0fAjZQXBFQr8eJfLR5ljtE2iqElgVYULrD1uPVI=@vger.kernel.org X-Gm-Message-State: AOJu0Yyy8JXpuSVfYO5fvnKHEUiNutUYxNhfJNqg+l6v+VDnn5lXJTFL JW3DCN4y0MuNqS3ebSdXAahE73mR2K68IeefvFeLuRGJeI87nWkyPaNaYSFRc6q/6GWnX5tDIOb hzsIqxpxvGMgZjz3sJy0qY93vmFQMi3EuGkfWhY2fY3x0z8LWBJ/md1daNH93iepXs1g= X-Gm-Gg: AfdE7clj8IC6BNLjdnUt/99eaA4xqJ76WJYWs9llGSN9RsOdvNyTdY9USftBWm9m43J 6hNY4RYEJV1CDdOMpQoQVBAzzWMipuUvrmziUp0d2/7C13LWjhwmQbSrNGOOgquTVNQjJsrUkta qA9Uae0mSfhGykZ+jPvq+GeHiqfVrG2stj0jOsoI20f9f7Myi8y6RtcnwoS7QGDjXkNOEtFlmbP Ynz+yvew1MrqCfMhDDYLPypM9T3PYerhGug6yoC9zcqSKZYANyuqasJXTTP+QxORx1GUEdxf99k +mgDjpuWX6ki3FRaibZ1wzaMA7rL27cTJ6dq4PYFrPX3KrLgb5MSDwzdGdq6dOLYw+8Y2T42wQc aCZldcsoS/kP3d7kEkbX1FBQgNH1CeBlMaoEsgsXK X-Received: by 2002:a17:90b:3811:b0:381:5ede:1296 with SMTP id 98e67ed59e1d1-3815ede1635mr77865a91.11.1783055054653; Thu, 02 Jul 2026 22:04:14 -0700 (PDT) X-Received: by 2002:a17:90b:3811:b0:381:5ede:1296 with SMTP id 98e67ed59e1d1-3815ede1635mr77838a91.11.1783055054031; Thu, 02 Jul 2026 22:04:14 -0700 (PDT) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30f0bbd2362sm16771941eec.20.2026.07.02.22.04.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2026 22:04:13 -0700 (PDT) From: Gaurav Kohli Date: Fri, 03 Jul 2026 10:33:08 +0530 Subject: [PATCH v4 05/10] remoteproc: qcom_q6v5_pas: enable QMI TMD cooling support 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: 7bit Message-Id: <20260703-qmi-tmd-v4-5-3882189c1f83@oss.qualcomm.com> References: <20260703-qmi-tmd-v4-0-3882189c1f83@oss.qualcomm.com> In-Reply-To: <20260703-qmi-tmd-v4-0-3882189c1f83@oss.qualcomm.com> To: Bjorn Andersson , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Lezcano , Amit Kucheria , Manivannan Sadhasivam , Konrad Dybcio , Gaurav Kohli , Kees Cook , "Gustavo A. R. Silva" , cros-qcom-dts-watchers@chromium.org Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-hardening@vger.kernel.org, Manaf Meethalavalappu Pallikunhi X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783055015; l=3860; i=gaurav.kohli@oss.qualcomm.com; s=20260302; h=from:subject:message-id; bh=mw2xywDtGE86eMiTObjMgtV9IqdLC+USGzaPZvRA/pk=; b=ikEWVDd9kQOc9aRYdLrIQRqy20EpLvW9r6pThjNeNOGwddivHx9OZ/0ZkxdGjXxxIaCKgSOFX LOXWhMa5YioCLK3ChMQTtJcVx8h012+foUjbvpUg3oqYjlxd7w6lT7E X-Developer-Key: i=gaurav.kohli@oss.qualcomm.com; a=ed25519; pk=IdNsqe8rWsF6dbpGHfwPEH9zM0nbOdRH72HxUT9qPak= X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAzMDA0NSBTYWx0ZWRfX/xPg0Tv3zI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zLUQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-07-03_01,2026-06-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 adultscore=0 clxscore=1015 malwarescore=0 phishscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607030045 Enable Thermal Mitigation Device (TMD) support for PAS-managed CDSP and modem remote processors on platforms that expose the QMI TMD service. This adds per-platform TMD configuration in qcom_q6v5_pas for: - Hamoa (X1E80100) CDSP - Kodiak CDSP and modem - Lemans (SA8775P) CDSP - Talos CDSP - Monaco CDSP For each remoteproc, the configured TMD QMI instance ID is used to bind to the TMD service running on that subsystem (e.g. CDSP: 0x43, modem: 0x0). The driver then uses the corresponding TMD endpoint names ("cdsp_sw", "pa", "modem") for cooling-device registration. QMI TMD identifies mitigation endpoints by name, while DT thermal bindings reference cooling devices by id. This change provides the mapping between DT cooling indices and QMI TMD names, allowing remoteproc nodes with #cooling-cells to act as cooling devices in the thermal framework. With this in place, thermal policies can request mitigation from CDSP and modem subsystems via QMI under thermal pressure. Signed-off-by: Gaurav Kohli --- drivers/remoteproc/qcom_q6v5_pas.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index ab5bcccc91a6..974526195e97 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -987,6 +987,15 @@ static void qcom_pas_remove(struct platform_device *pdev) device_init_wakeup(pas->dev, false); } +static const struct tmd_name cdsp_tmd_name[] = { + { .name = "cdsp_sw", .id = QCOM_CDSP_TMD_CDSP_SW }, +}; + +static const struct tmd_name modem_tmd_name[] = { + { .name = "pa", .id = QCOM_MODEM_TMD_PA }, + { .name = "modem", .id = QCOM_MODEM_TMD_MODEM }, +}; + static const struct qcom_pas_data adsp_resource_init = { .crash_reason_smem = 423, .firmware_name = "adsp.mdt", @@ -1144,6 +1153,9 @@ static const struct qcom_pas_data sa8775p_cdsp0_resource = { .ssr_name = "cdsp", .sysmon_name = "cdsp", .ssctl_id = 0x17, + .tmd_instance_id = 0x43, + .tmd_name = cdsp_tmd_name, + .num_tmd = ARRAY_SIZE(cdsp_tmd_name), }; static const struct qcom_pas_data sa8775p_cdsp1_resource = { @@ -1162,6 +1174,9 @@ static const struct qcom_pas_data sa8775p_cdsp1_resource = { .ssr_name = "cdsp1", .sysmon_name = "cdsp1", .ssctl_id = 0x20, + .tmd_instance_id = 0x44, + .tmd_name = cdsp_tmd_name, + .num_tmd = ARRAY_SIZE(cdsp_tmd_name), }; static const struct qcom_pas_data sdm845_cdsp_resource_init = { @@ -1189,6 +1204,9 @@ static const struct qcom_pas_data sm6350_cdsp_resource = { .ssr_name = "cdsp", .sysmon_name = "cdsp", .ssctl_id = 0x17, + .tmd_instance_id = 0x43, + .tmd_name = cdsp_tmd_name, + .num_tmd = ARRAY_SIZE(cdsp_tmd_name), }; static const struct qcom_pas_data sm8150_cdsp_resource = { @@ -1204,6 +1222,9 @@ static const struct qcom_pas_data sm8150_cdsp_resource = { .ssr_name = "cdsp", .sysmon_name = "cdsp", .ssctl_id = 0x17, + .tmd_instance_id = 0x43, + .tmd_name = cdsp_tmd_name, + .num_tmd = ARRAY_SIZE(cdsp_tmd_name), }; static const struct qcom_pas_data sm8250_cdsp_resource = { @@ -1288,6 +1309,9 @@ static const struct qcom_pas_data x1e80100_cdsp_resource = { .ssr_name = "cdsp", .sysmon_name = "cdsp", .ssctl_id = 0x17, + .tmd_instance_id = 0x43, + .tmd_name = cdsp_tmd_name, + .num_tmd = ARRAY_SIZE(cdsp_tmd_name), }; static const struct qcom_pas_data sm8350_cdsp_resource = { @@ -1356,6 +1380,9 @@ static const struct qcom_pas_data mpss_resource_init = { .ssr_name = "mpss", .sysmon_name = "modem", .ssctl_id = 0x12, + .tmd_instance_id = 0x0, + .tmd_name = modem_tmd_name, + .num_tmd = ARRAY_SIZE(modem_tmd_name), }; static const struct qcom_pas_data sc8180x_mpss_resource = { -- 2.34.1