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 661D8405C47 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=fkhQjpx+gB85CkVd70MJscQNzGJgDHhZBObsI0VE8UjkcP9w6t3loXWBxkMb3Z+ZKJbcggaIxlgICbQIFQ9ojKd/x0E3/1TQY6sN/IijyrBddYdhRMDEDmW3iLcJHScQtYkeXNu7WS3sxVNNwB/gPvhvt8otm0kGM4BVF1hvXlw= 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=DRT02+vN; 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="DRT02+vN" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FFLj7u876554 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-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etegushqw-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-f198.google.com with SMTP id 71dfb90a1353d-59ebf602dbcso1955867e0c.2 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=1781537599; x=1782142399; 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=DRT02+vNNFqAME/zbKOYa2Pc7tzwL/MSYTUrtsMNAdLlM/OCbsByyxm0YEvMOrIlXl JJeYvJLEuAjZL06juLweVT2LDeb/7525CHV/eIttlHRhB1qtnjPOpXipoiLT76/u9uCA Afy7Dsa9sS1mATXK2EucuwZGFhSmlJIYgVfsWF6F7fPbPSDhxO9HS3TqSBDYW9xNt8pO Y1QQGdcxi9Zf8gBT7tHfogs5q2nyFCcCzfQb7ODkeOl30RsWDj4+d0ywjvPsUWohk0Bm KKSubp21jy1QK22rDkvVpDyxNu+0QNujV0bQl9GThJ5RzsYRI6rAg0yOHV4S0pjLSes+ ridw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781537599; x=1782142399; 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=G3Tb2urEqRY2RVaOBvN/zec/ZxmDMM9525OATExtfLPzmGfWc4o3RE92R0j7TiOs5J iPc4P93MiaLHQ5cG8s2FgSo1zmYiVTjuS7R2xsHVXsL2/MaYDBMrIYcSusmBrPB3XbrW 1M+FgcF5M1G4Lg7Ch4XSTNuj5yUhM7pZ5zAYOg/h4AtPV3cg7V/PLW58xA68VzNb/fTR AYWidZRUfjoiESwiCGb75urst4EO/VRiX4NuH+SiNel6pnEwiCwCTatLtm8fqRtcsbr0 NAiYXLwTv05m4SMR157yI6GM5Cy+kfxGbx3WVKFd361gDF1iAFt6pk7C2RCk9rp0odIC LYHg== X-Forwarded-Encrypted: i=1; AFNElJ8s/Gbi2nf/8+OEQRJd3LGulGL7RlLxkBaHnqdvYd0ys3aGV/HK2TX/9A5McvbJ/NNqj96crPuyDrjz@vger.kernel.org X-Gm-Message-State: AOJu0Ywr6BqrHsiw/Po4EpIStyWgXmTZjZVtFdxEvVjojfjCgLLcds/3 uF/RbhusQ2jXlMWEmzBYAL1bGFhlcQjZCCcTZV2h1Bdyeav6fKddc4KJVCRxE1zE6xxCFc4lyB+ QRjot6G16ZqhLBb8VY2fP17/OzK3R8yXaPzYPOrgWVhWnBp9Db9R30hOq+C/uGQ07 X-Gm-Gg: Acq92OGdr+QW/2IJjwrlVvlJYcb3GywN9ig6PYxkQHsm3TSkXCo22Jb/f6RuvkYA0e0 T11ECZElprlNxyLHt1YyfklKUtba4pdwCZIk6Av3feGKVbxDCSzRIqYvL4SZAlwCLe90RTvr7/y EVelReWNCCPtmDyUtHxzYI3n6bQQ6ST5d6lO5f14ZPKuVKssp5G8KDWMg2H+kz/lnFsKhbNVeXm Wtcmit+D9Ye2MrjeSF2P4bB57A81JIwDaopnBocQtj5Jxzv5TzguT6F3Sgov96z1ecpjQ26suVV zqK/TI5y7JFcDkcANB648PDhXqGL3OoSmrp9joD6Yw8cmVj9Uxpdh7lMBN4ZT20ETLcyHJ0RwXS YAGKvNicIu/7q/Lm3UtAfD/KwD+xPg7uXQ5dOh+KQI0tz4qd4++slMdgGWNPNUEXupACShk0ftb uv3KGTDUkEZ2KdIA== X-Received: by 2002:a05:6122:907:b0:5a0:9ad4:7016 with SMTP id 71dfb90a1353d-5bb6c13290fmr6584834e0c.10.1781537598501; 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: devicetree@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-Details-Enc: AW1haW4tMjYwNjE1MDE2NCBTYWx0ZWRfXx95Hov1PmP7K dcLlSxQJQD4OSri87IiJze/4u+iZ1tOsmaH2VzJmwo8uagdLq0alE1Z1HobWnlo6YWI9RWYFXcJ HMiQr+dPY2dHVVTKeoIMLR39WTqsGtiZC9uJudjj4oNbwUCosJt2iOXWUkY+6hJpOEDUa0ZHEk9 jsVfi9wLV8cnrn1RipG0ArXRw6M8K7dzp4SFNNNxem7t7Jic18mfZJOFucUrgj7uovkglyfMamL xyUN36FTtrr/QONL/QKp5iTS1+CAsb6noKoUhKaAkKY5bjCQWKGiGYHLrRQlMi0JnsQhXQUrPE8 mbsxf9G5emBdDY4Pi0MsNVpMDE6EyN0lFQR/Lj4vKF3/5kN9igYut77tLlRIXIwIr9kYK2yRin3 MsbzgmeBD94BjXejKNPJIxUKqW4tKeOr00cA5VAbDtOlldckEFlKLypSBEyJI16is0EHfkhHBIC SHmKuD19w9YeRZtuGww== X-Proofpoint-ORIG-GUID: Wu7QvdYSYGyXNn3-TQZD8bes2NFlBVlW X-Authority-Analysis: v=2.4 cv=HMvz0Itv c=1 sm=1 tr=0 ts=6a301b3f cx=c_pps a=1Os3MKEOqt8YzSjcPV0cFA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=UGbA0b5lBdDrEDKOv_UA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=hhpmQAJR8DioWGSBphRh:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDE2NCBTYWx0ZWRfX9WqQES7ysI7Y 2A7/1eAySldB5BOmAHkCBwDu7qq7RQ0JUHptWllQZQvxs2Sk8bZiGfc+BFnCOIRASQHkF7JoEq5 srz2yjpzaCEQtx0Omkvx3ste6V1qmuU= X-Proofpoint-GUID: Wu7QvdYSYGyXNn3-TQZD8bes2NFlBVlW 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 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=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. >>> >> >