From mboxrd@z Thu Jan 1 00:00:00 1970 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 67D6A405C49 for ; Mon, 15 Jun 2026 15:33:20 +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=1781537601; cv=none; b=IwfrR6D0V0iubLcnRQF8ck/5lGatdiB+Q/b/ELZsOZC632XIG7NNEY1/HX+dcAdAZV/OeS8BqTCVDe8cAkg5Xb3c3/534UA3ndD0fa0+4UkZGDsuBd5Zhf7NTf/UKdRYik6HZ9jWtGmsH5Ji/y81hF9k9zLHDWFOlPeI6K8TXKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781537601; c=relaxed/simple; bh=KwUenCCTGlmgA/VcqQxmvfMpJVnf0YViC+wBXBgr9oQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Tos2f7PBjDGCmH4/b7aAlhczK+s2OSC5XyVMvVUUIL2ockvfd0zE6+mXroHFEZZ6E9goOuOhN0UyzcgTUelAdg+XgQo60T3kHPDMLSoRrMFZ/FqR9pWTWZQyuo8CL3DBRy8z8y00+XCgAZFXqLH7e97JMIXpVjfgFl4Kn7UuCTk= 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=ACi9lPJz; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=G4FVspkn; 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="ACi9lPJz"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="G4FVspkn" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FFLoHZ943116 for ; Mon, 15 Jun 2026 15:33:19 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= OwMQO0LcqR49s8kdpKn9p05zdjYBTA9VDNonkRXI1Ww=; b=ACi9lPJzRqm6Ft+O dQs5XME/f76WWxRbnjH7GJ7yfRAJ2lHzskCTVl96VVuuwqmcqBRtVMUqPQwW3fwS 5F9ZAoMx6bOYAxIPNQlAWCSXjLoJ4Um3P8BhymdqZ2s17XAFb4Kao6Of/JHgdHUE RRvkmeUAi1K/Hu99t6ZtQ7AJOh2FiEv3YyIrtJV7JS8h0jxdJV4ijb0mzl+w9tKL FUpM643/Y29wQJ3odnMZPs0FD3oeVVC6ozRBJ9OmCs5L15B0NNVkHRkkzAVhExJq RWspUUlJU1bFkheNdOxoMzD1T7sL4hrierQXWZ0N1FFreFhI9v/FL/0U6kwB81US d4yZwQ== Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etgvhgysu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 15:33:19 +0000 (GMT) Received: by mail-vk1-f199.google.com with SMTP id 71dfb90a1353d-59eba324559so2142361e0c.1 for ; Mon, 15 Jun 2026 08:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781537598; x=1782142398; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OwMQO0LcqR49s8kdpKn9p05zdjYBTA9VDNonkRXI1Ww=; b=G4FVspknmIx4qVoSmnuMkxSLBE9M1h+QgmFvJXAkA0MM+xpJ291axmz6HFAZwv3vbV OA36TNKiRxVHTbo7dpXJzXXQYWeJTuBTZ1hqm2lHvt/9iZvBNUxbsq90/joqunGa1tI0 FitYOUNVbGxNZ5cHkGgZZAW/4QU3R4bZycwOYedYlfHLqWULuA++qFJirzs/TqpUqJ7I l3ZaIjh9+Wu8rECSW+EBsEUzFlvSysEKDRwcJ2XnuMOKfP7Z3+961fcu70S0aP5wCFxi 1ypytZIQmWUr7zKNG1K+y5kP/WtElpaK2bR6QnqO2xa5G7pa/erQJ2+KA2OY0/4yjccJ HNxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781537598; x=1782142398; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OwMQO0LcqR49s8kdpKn9p05zdjYBTA9VDNonkRXI1Ww=; b=j1OnEsOBnhxEMbQ5AZz+3Dvn3N+apSNCR3mEK3u4wUE9Ifhpi09SogV30KaSvJsSt+ 4qfTbomYP2GyoYUgwPpmRufqD+Kd3FxfaKMFL6hCDbDU1HfNy8oo51ofR7wgIOyUfR1O j208Iq/Xf4UanpDURhxyiyaBR3XCF2aFouJL2AH+xZzKw3jVa/ffTdjl3Bs8vESb/peF A1hL4+J1whTNl+qMrMQDwbIrh8EXGTFGEoOODf9ymmr+egVJAs/jdFnQcCl1lOe2X69h GaRES91mL3AUYeokuXoPwoJHsQW0/F3lJoDHnO8FxLR6wsqhT9XIPJfeY1wGg0zezJVF lcDA== X-Forwarded-Encrypted: i=1; AFNElJ+XoraY0U6E2di270NisfasJG/2GSe6q3jSTp3w0g6GdpffkEDrHV8yuSuxgCN8yqULZw0eapQl5W33XBc=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2IPrZtuOZGRL0S4ohYrSXN64vm1aoRvEyP806DV1vuM3v/csV WQNwPSZ4NVcI1Kjm1M/deEyyXeA0bypKzodXgb+hwyXGewTKENpDx0lA14XRoayRLPG34lDi2sd JdLPBU/honjLT1GLVzSVsnCRpWGEXBEfCAD3ODOTeP1r9o6L80I4tqsJeUyh+LkJSra4= X-Gm-Gg: Acq92OFs+UenmIbsQwUnM9UmZ5BYl3hS76Gssr4soWJULG+J1RkqfY9dte2roudwphE WNgt/7oA4+59M+37A83y6FFR/tUfjpFDB6BPdMXwYe93EvTMhcLs+PA7ZquwbmoGVI4wwmYmnei bqrcCuUnm3Sz7WLFeOsB8SN3ozs/7HBJOZppY9R22X616dH3UAPeG/Ow2iYVoEQSCfSKODRzZXY xi0dXHYcIa4uSEIylOI2NI8uHFW+ZEXXowwqZijzu+mAVDeoqaGKz3DQiGYmVIqU3Xfgk9AmKQk 9cVNtuolBk9Y/1sXUj1FfJhr5U4/JKD/4cVWL+aq07VGIk4B3q/S6PdNSWPT5fmPeqozRQblKuA jLvuF98tjrXChwSV2C9PxqxhVa55qgXjpbBaaImaefnbXbM0u/he1sHv6fZUSYLMbIJ7Du5KG+C mDOl32TBzxCaBEYQ== X-Received: by 2002:a05:6122:907:b0:5a0:9ad4:7016 with SMTP id 71dfb90a1353d-5bb6c13290fmr6584825e0c.10.1781537598492; Mon, 15 Jun 2026 08:33:18 -0700 (PDT) X-Received: by 2002:a05:6122:907:b0:5a0:9ad4:7016 with SMTP id 71dfb90a1353d-5bb6c13290fmr6584791e0c.10.1781537597998; Mon, 15 Jun 2026 08:33:17 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:b0eb:75fa:2a81:cf30? ([2a05:6e02:1041:c10:b0eb:75fa:2a81:cf30]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922fa51440sm739885e9.9.2026.06.15.08.33.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jun 2026 08:33:16 -0700 (PDT) Message-ID: Date: Mon, 15 Jun 2026 17:33:15 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/8] dt-bindings: remoteproc: qcom,pas: add thermal mitigation properties To: Dmitry Baryshkov Cc: Gaurav Kohli , Krzysztof Kozlowski , Bjorn Andersson , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Amit Kucheria , Manivannan Sadhasivam , Konrad Dybcio , Kees Cook , "Gustavo A. R. Silva" , cros-qcom-dts-watchers@chromium.org, 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 References: <03d863ee-2caa-41f2-94b5-7332fc930b42@oss.qualcomm.com> <7f1e46fb-15e3-4638-9930-8abc1dd5a778@oss.qualcomm.com> <3cbcaf8c-357e-42d2-91c1-9d1a32c55ed0@oss.qualcomm.com> <9a31bb29-75d7-42fa-b8a8-4155cf85cadf@oss.qualcomm.com> <93e7251c-c75d-4e43-9ae2-bf485af58de3@oss.qualcomm.com> Content-Language: en-US From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDE2NCBTYWx0ZWRfX1CWO0VBXrZMQ dW+CAe9Nr1XFNs6Qpnqdhiqqza5GkSRk0J2vzFaEZSvEAcN3wrpGhstqCKROgUJq3dUGmI3A2Q/ fsuMsARlyEwYAIvnWHhbJJ1uvAa7CQs= X-Authority-Analysis: v=2.4 cv=Zqnd7d7G c=1 sm=1 tr=0 ts=6a301b3f cx=c_pps a=+D9SDfe9YZWTjADjLiQY5g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=UGbA0b5lBdDrEDKOv_UA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=vmgOmaN-Xu0dpDh8OwbV:22 X-Proofpoint-GUID: Z-76NWBB2I-vYt-8zuSqs7X-MvJt7DDf X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDE2NCBTYWx0ZWRfX6eS0sSCQk92f HtqDzpxZwbvZVHXK8P0HzN1OyDQL/+CPfe2CfO6B8CQUKVNPhVDeZkbrJoz0AN9IBsDgYjXTQqT VBPV4zx95s6vDXeXARZn5DPLd9A5Ml5jnBiAjhga1PobRruSVgdLFtGFniROJOug1p+dq04XN34 07c5sxjrDQm+dFOm5v9HsnvJHflI922ANMYIl09b0/40PRnpp6fZbAnvVFWKIHm2kjYmtjj+qxc 9/mWks3N+7UhrVvvLQrbZoJsfQLp/A05pv/8XcBon7WuKZ7NAhmBprmyTfURJ5xwEeJK0XLUObS 11IXwXVaa8frwgSxJM3GmYT3ulyTurtam0SBIIOmhr3gSkusXOZkxVzNEMaUt9hMNDM4Q7SqUAC c8Ds3DBr5/TuOftl4Jhhi2edxIqfgE1yt2cAVobYS/3ny06RkYhkFdB+Jwc4DkFFaDVDzvxWQr2 lZesYDDKtkAuU+ncSGw== X-Proofpoint-ORIG-GUID: Z-76NWBB2I-vYt-8zuSqs7X-MvJt7DDf 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-06-15_03,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1015 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150164 Le 15/06/2026 à 17:14, Dmitry Baryshkov a écrit : > On Mon, Jun 15, 2026 at 04:33:38PM +0200, Daniel Lezcano wrote: >> >> >> Le 15/06/2026 à 16:11, Dmitry Baryshkov a écrit : >>> On Mon, Jun 15, 2026 at 02:30:49PM +0200, Daniel Lezcano wrote: >>>> Hi Gaurav, >>>> >>>> Le 15/06/2026 à 14:12, Gaurav Kohli a écrit : >>>>> >>>>> >>>>> On 6/15/2026 4:04 PM, Daniel Lezcano wrote: >>>>>> On 6/13/26 13:05, Gaurav Kohli wrote: >>>>>>> >>>>>>> >>>>>>> On 6/13/2026 1:11 PM, Krzysztof Kozlowski wrote: >>>>>>>> On 12/06/2026 15:52, Gaurav Kohli wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> On 6/11/2026 5:53 PM, Krzysztof Kozlowski wrote: >>>>>>>>>> On 11/06/2026 13:12, Gaurav Kohli wrote: >>>>>>>>>>>> Why? And where is this generic property defined? You cannot just >>>>>>>>>>>> sprinkle generic properties in random bindings. >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Ack, will add why part. >>>>>>>>>>> These names are matched with the thermal >>>>>>>>>>> mitigation device identifiers >>>>>>>>>>> populated by remote firmware over QMI and define >>>>>>>>>>> mitigation devices are >>>>>>>>>>> exposed as cooling devices. >>>>>>>>>> >>>>>>>>>> No, -names correspond to values passed via DT, not >>>>>>>>>> some remote firmware. >>>>>>>>>> The remote firmware should give you interface which >>>>>>>>>> is explicit and does >>>>>>>>>> not need such properties. >>>>>>>>> >>>>>>>>> thanks Krzysztof for review, We need tmd-names because >>>>>>>>> of following reasons: >>>>>>>>> >>>>>>>>> Following Daniel's series [1], the thermal framework supports >>>>>>>>> mapping multiple cooling devices per remoteproc/device via indexed >>>>>>>>> cooling-cells. >>>>>>>>> >>>>>>>>> 1) The thermal framework's cooling-maps reference >>>>>>>>> cooling devices by index (for #cooling-cells = <3>). >>>>>>>>> Without tmd- names, >>>>>>>>> there's no way to know which index corresponds to which >>>>>>>>> TMD, as firmware >>>>>>>>> may return tmd-names in any order. >>>>>>>>> >>>>>>>>> below are the changes post new thermal mapping changes: >>>>>>>>> DT: tmd-names = "cdsp_sw", "xyz"; >>>>>>>>> Firmware: ["cdsp_sw", "xyz1", "xyz2",] >>>>>>>>> Driver registers: Only "cdsp_sw" (index 0) and "xyz" (index 1) >>>>>>>> >>>>>>>> names property are not to instruct drivers to register or not to >>>>>>>> register something. >>>>>>>> >>>>>>>> I don't understand the problem and explanation in the binding is >>>>>>>> basically non-existing. >>>>>>>> >>>>>>>> Remember that all lists and indices ARE FIXED, so driver knows exactly >>>>>>>> which index means what. >>>>>>>> >>>>>>> >>>>>>> thanks for review, shall i use driver data, which is basically >>>>>>> pas data structure like below: >>>>>>> >>>>>>> static const struct qcom_pas_data { >>>>>>>      .crash_reason_smem = 601, >>>>>>>      .firmware_name = "cdsp.mdt", >>>>>>>      .tmd_names = (const char *[]){"xyz", NULL}, >>>>>>>      .num_tmds = 1, >>>>>>> >>>>>>> Is something like above acceptable? and this will also help to >>>>>>> filter tmd names as well? >>>>>> >>>>>> >>>>>> How the thermal framework will bind the thermal zone with the TMD ? >>>>>> (node pointer, id) ? >>>>>> >>>>> >>>>> Hi Daniel, >>>>> >>>>> thanks for review. >>>>> >>>>> With id only, in this case instead of taking tmd names from device tree, >>>>> qmi_tmd will take tmd name from pas_data(driver) and register with the >>>>> cooling framework with id only. Please let us know if this looks fine. >>>> May be I'm missing something but: >>>> >>>> - The QMI TMD returns a list of names, not ids >>>> - The QMI TMD may return the list in different order than assumed >>>> - The cooling map index points to the name of the TMD in the DT >>>> - This name is used to match the name in the aformentionned list >>>> - The index in the list and the id in the DT can differ >>> >>> Would it be better if we define standard indices for the standard names? >>> This way we decouple the actual firmware strings from the DT. >> >> I don't think so, it seems to me too fragile and prone to error. >> >> It is a remote proc, an external subsystem. The contract between the client >> and the server is the protocol. The protocol specifies the identifier as >> named strings, the TMD names, not numerical identifiers. >> >> When asking for the list of TMDs, we get a list of strings. But as it is an >> external subsystems, may be tomorrow someone decide to send list ordered >> alphabetically, or per number of states, or whatever. >> >> With hardcoded id the QMI TMD clients break > > I was thinking about something like: > > #define QCOM_TMD_DSP 0 > #define QCOM_TMD_PA 1 Ah ok, it is correct if: tmd-names = "dsp", "pa" Or #define QCOM_TMD_PA 0 #define QCOM_TMD_DSP 1 tmd-names = "pa", "dsp" > cooling-maps { > map0 { > cooling-device = <&remoteproc_cdsp QCOM_TMD_DSP 0 2>; > }; > map1 { > cooling-device = <&remoteproc_mpss QCOM_TMD_DSP 0 2>; > }; > map2 { > cooling-device = <&remoteproc_mpss QCOM_TMD_PA 0 2>; > }; > }; > > >> >>>> Krzysztof , I don't get why having the TMD names as properties is wrong, >>>> they describes the existing TMDs on the system and the cooling maps index >>>> points to the one to be connected with thermal zone. >>> >> >