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 679FE3F888D for ; Mon, 15 Jun 2026 14:33:42 +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=1781534023; cv=none; b=kRXIR8itYEHqAOxa6N7HIyjk9nKLEtnq83aMGHTZkp+OBjibQoaZ0lzhFEHvG05O9mTjyAcGPS3TFDsXiKcei0DRJ361d+AviBhmjmW9f6a5kviGBuL3FvR/FczB5LJnxd/mOEdNwkHmkmILIJQNkVJcBPKO/DnJ2Z9R4zNki3c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781534023; c=relaxed/simple; bh=4Wm4l/st3gWaMHoN5Bw5U9Pr/QJGQ1bGkwqydPvFm9I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=klEv2CamLl9CW5sQOXYiw9DNMm0HqwzjJO49oV1wyrYjomfk4holYRy+MOB+DzoleZv/FnK/gKMFhzZydIN8WqPtKKX27ZulGMF6me6al+5shU81/vY+IrbBmtdomBGpDePt9YNt5cL0wHypKUrcUp8nE4ZKz1SqhJonHgdxVDQ= 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=DDJRlQES; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jMKlb5H2; 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="DDJRlQES"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jMKlb5H2" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FCZa654116605 for ; Mon, 15 Jun 2026 14:33:41 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= CGb3OAKHAE1yyRO+IKe2XZ30dzp4/YLjRoSdCH3llnQ=; b=DDJRlQESjIFuNyKl k5kRzn5+M3e93sSvxkkqq45B/3srqZe9zJXZVifACNYDIxlA2zk8EHg4P5lOw9TS 2AyUibj0XZfyWZn+OzEDCwK82MpZf/kyLRtQ0Wf0gx7T4CHctCexao+pYbgbTonM VX7Df3fRFxTU0hOw3WlmCl/aLRHaSol4NgNiiJfg65WDghreBTxPqQ1gq+W+ihVg NNsE0hdC4wxrrm4PJiG5AlvaYGOFLrzBe3ahkoMusiTkNw4OMbujkg+Ir+XNbAru 2J+xLr8crUW8LumVWHsZxQurWq8d6yzchDDZr7SbZ4ZdIseka+JjqrzfjwUyfApc K9vUnw== Received: from mail-vs1-f72.google.com (mail-vs1-f72.google.com [209.85.217.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etetjs6tf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 14:33:41 +0000 (GMT) Received: by mail-vs1-f72.google.com with SMTP id ada2fe7eead31-6c33d75153dso984727137.0 for ; Mon, 15 Jun 2026 07:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781534020; x=1782138820; 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=CGb3OAKHAE1yyRO+IKe2XZ30dzp4/YLjRoSdCH3llnQ=; b=jMKlb5H2zgBDDIVh0W75SFvzkunxYiEMZHANAvpECbjfPAtq2lrbro5253fZe2buPO mrptL+ECra4klMIpeX8xuCv9Hokd8XvSFdnQJlXEvfD687jPgG482CycqTfEMb6/ZiCK +Vkt1eh1LsA3yj49Aevc0OvawxxS/mGLoIFhk9FVFbbUnZgN3N3BU5poEiOuj6C1tIDI Q+cJHSA+BmIkUuY6UYxL1EbbaZ23sL9eCORleihRw1w5EYKMkmfeitdRRwWp++CUn/ss 4m2zkqcCuMmTVsu2UKn36S47hWSGK/v+x3dQ94zlEoKCPtxE/7WR4rFOU4kZ0csuyPp4 7EHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781534020; x=1782138820; 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=CGb3OAKHAE1yyRO+IKe2XZ30dzp4/YLjRoSdCH3llnQ=; b=H8WOwmENieF/LY9iO3s7/b36g2hbDXa9bLbtiRimmNEIuMAYOQSqShJQx4eqiXm8xd OHIxaeE5XSWC2uWkZCKKLxZT88Uq74ShJXRkxusE2USADrUxqrQCkAV3Jezc9xweQNZx xM3DL9EKojNaepiXFqVLi84aCEOHZToifxikNbBQHUPmKYOjfDpjUd/anYdbVIhvslv/ tiFUo5QSoghTWiuGp3dEYcaIt9htyBeEDKpShymvmF9MvTSBwogKraJePkDCBnLHwcRp n6P+Niz79sxn6lCatueUt3CY9RtZdt1MngSb9N58yF4jDj6WSnv6xSO+bijdlEUrtCIA 2wGw== X-Forwarded-Encrypted: i=1; AFNElJ8fPh5wqLHziUG5pLy76JNxPJlAoJxRzSlORCDZxNp1gltBurSv+SH6IiQsiHP/geVbifHb0x9sMRmB+No=@vger.kernel.org X-Gm-Message-State: AOJu0YwjRctNaYoqKwxEXe6jzSzBemEdsSPqykRsmv3tzI0PfnvoB9ja SNTUiWaL9bhEJc+wR8g6k8YCEd+nTD8bsXVospb2YA0RIsgudofZ7+oN89u71ZJVHKXr242JVWK BrBiOk9tEG9PBOHhEiMeRLuNCHSOUFEunSo3YRL/lru5FDMQ4FCRethVscGl56PaJu1Y= X-Gm-Gg: Acq92OEyreJ5a2wncFJsaaFMOCWmno06uR8XVl51TtQn7WpZfEkQkXH9uRRNKwmxKMA 5c7SLoB6bG73eelSRPue6IQtjfb20a4pcoM4EW0Rp2ZBI6OOFgboQUEWXEwEccX7PYSj+I9whi0 VUkKel5xaxrjKYAsz+Lh1gLbDzPiObtxfO0HnWaMORyRZCUstEPs8LSIhANmG47GbU5lbKTt8ac iyfk50O6c2mgRmJUbzkRJ7EziL+w/L9hWpn6vi062N6rIGeA5MID89YUIDPtp9gzEmzoafeW0zk 4y9r9WnjqPLN1wAR3HXSFQZGBdERdhE1pkySbUvMYF99qXXQHtgyxmuPoXCv/2hZ7XcwTQN8VHc HqvjYPU+4EJF4uAiJxydUU650Sz5l102EWrrjxgkfnkC0JvtA8z2pRP1zIr+Wbiz+n4ji//a1UP xWJPpyGpF2J7asCA== X-Received: by 2002:a05:6102:149c:b0:604:f849:462e with SMTP id ada2fe7eead31-71e88db5afamr7325415137.25.1781534020431; Mon, 15 Jun 2026 07:33:40 -0700 (PDT) X-Received: by 2002:a05:6102:149c:b0:604:f849:462e with SMTP id ada2fe7eead31-71e88db5afamr7325358137.25.1781534019875; Mon, 15 Jun 2026 07:33:39 -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 ffacd0b85a97d-4606f2cf5d9sm30916812f8f.32.2026.06.15.07.33.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jun 2026 07:33:39 -0700 (PDT) Message-ID: <93e7251c-c75d-4e43-9ae2-bf485af58de3@oss.qualcomm.com> Date: Mon, 15 Jun 2026 16:33:38 +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: <20260609-qmi-tmd-v3-1-291a2ff4c634@oss.qualcomm.com> <20260610-ocelot-of-stimulating-excellence-bcb0fe@quoll> <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> 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: AW1haW4tMjYwNjE1MDE1MiBTYWx0ZWRfX98vk2MiJ77GI TSWED/1ePYguxIc1RD0mOOWKIVt8w+wslVf3Mb0E1esfa0KTefCHXgRleS+TI+YOJ5AYeLUUdJD w19fSrUMLhP0q7sRxK/6z5SprHdA2OKB9JzJa8sFudPd8Rz6ZgTzb060yiBN35WmkTcPM+IXO8T ZEy+4UpXgHThzNB1+WfHwHiPUHvgc9baRTC3qPheSEq7nPRGeq+aDKzfJZNHg/9W0oCAEt+vLhw ugPyCwn5MxWbNNdagCyIP5ud5n2ETegk7+wAkVFKlv1Gi9fkVDZDWbdgtu8GZedg+U+cDPIog25 Nt7oCLa35DSvpvZl8DfP8Kyufv5XO6m3X1C++UFAg1rEMra/whE2enisWCoAd72psbjzCF0LNm9 I7Sa5rLamfxVqb8SKZbKdtlg3HXA04z4LLNDO8aZnd66181uf1Zfo55w0Ax5LRqI/XywI8MR3u6 s5lsqxlzhMniXbSF1jw== X-Proofpoint-ORIG-GUID: UKIpWpIkE802FwDNT7ydyDLcsjCKFHLz X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDE1MiBTYWx0ZWRfX5tM0Nmgm7GYA ozszPspKLuLM9KZ0VjXvXW1rn4rgLTPAroDlkz9WrDhlzamqx78TbP3aJk88WaQ6ANhaNAHNnnT 4zVKvUHT04ZQcfMI87xHOUMmVbdbNJE= X-Authority-Analysis: v=2.4 cv=HttG3UTS c=1 sm=1 tr=0 ts=6a300d45 cx=c_pps a=DUEm7b3gzWu7BqY5nP7+9g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=y33DeBKr3xWxJ8ptnqUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=-aSRE8QhW-JAV6biHavz:22 X-Proofpoint-GUID: UKIpWpIkE802FwDNT7ydyDLcsjCKFHLz 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_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 suspectscore=0 clxscore=1015 impostorscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150152 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 >> 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. >