From: Krzysztof Kozlowski <krzk@kernel.org>
To: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>,
Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Amit Kucheria <amit.kucheria@oss.qualcomm.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Kees Cook <kees@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
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
<manaf.pallikunhi@oss.qualcomm.com>
Subject: Re: [PATCH v3 1/8] dt-bindings: remoteproc: qcom,pas: add thermal mitigation properties
Date: Wed, 24 Jun 2026 12:42:24 +0200 [thread overview]
Message-ID: <5b0f1f39-ddaa-4a2e-ab29-34aacc9ff672@kernel.org> (raw)
In-Reply-To: <61765401-3397-497d-a0ca-e9bf9d76cc6a@oss.qualcomm.com>
On 18/06/2026 09:17, Daniel Lezcano wrote:
> On 6/16/26 06:21, Krzysztof Kozlowski wrote:
>> On 15/06/2026 14:30, Daniel Lezcano wrote:
>>> Hi Gaurav,
>>>>>> 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
>>>
>>> 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.
>>
>>
>> 'xxx-names' have a fixed meaning in DT by convention - assign
>> identifiable strings to the 'xxx'. I miss the property 'tmd' in such
>> case - its definition and meaning. Where is it?
>>
>> But maybe you just want list of strings, so I am open to discuss it - I
>> don't understand the need for this property and commit and property
>> description tell me nothing.
>>
>> Really, this commit message is basically non-existing. It explains what
>> it did and provides that much explanation WHY:
>>
>> "- tmd-names (thermal mitigation device names)"
>>
>> Really? This is the explanation why this change is being made, why this
>> property is needed?
>>
>> So sure, describe the problem being solved and WHY this problem is being
>> solved that way. Maybe it will fit DT.
>
> Ok, I understand
>
> Let me try to clarify.
>
> When the QMI TMD protocol is initialized, the list of available TMDs
> provided by the service is requested. They are identified by a *string*
> not a numerical id.
>
> We can not assume the list is always in the same order because the QMI
> TMD is a separate subsystem and the interface is the protocol. The
> protocol does not refer to any TMD with an index but its name.
> Hardcoding an index here is not possible.
Still given device (remoteproc) will provide a fixed, one name for TMD.
That name is fully deducible from the compatible.
>
> The name identifies the TMD we connect to and in return we receive a
> handler to use when sending the QMI messages.
>
> That is for the driver part.
>
> I understand for the DT, it is possible to not give the tmd-names
> because the it can go into the driver's data structure.
>
> But the thermal framework won't be able to associate a cooling device
> (one TMD) with a thermal zone because the cooling mapping must point to
> a cooling device in the DT.
>
> Initially, Gaurav sent a description where each TMD was a child node of
> the remote proc node. And you rightfully told us it is no longer the way
> to go as stated in the documentation. And you suggested to replace the
> child nodes with an array with the tmd-names and add an index in the
> cooling map pointing to this array.
There was only one child node. It was one-to-one mapping, thus I don't
think I suggested using any tmd-names.
Here is the code:
https://lore.kernel.org/linux-devicetree/20251223123227.1317244-4-gaurav.kohli@oss.qualcomm.com/
and I clearly see one cooling only:
+ cooling:
+ $ref: /schemas/thermal/qcom,qmi-cooling.yaml#
Therefore I still do not see the need of tmd-names. You know the name of
cooling device, because you have strict one-to-one mapping.
>
> The thermal framework has been extended to support this new format and
> associate the cooling device with the thermal zone. This change is now
> upstream for v7.2 [1]
>
> The resulting implementation is the driver gets the tmd-names array
> property. For each name, it connects to the QMI TMD and register the
> cooling device with the index corresponding to the name position on the
> tmd-names array.
>
> On the other side, the thermal framework parses the cooling-map, gets
> the index and do the association (binding).
>
> The tmd-names array property replaces the child nodes and allows to do
> the mapping between the string based identifier with a numerical id.
>
> I hope that clarifies the approach.
>
> -- Daniel
>
> [1]
> https://lore.kernel.org/all/20260526140802.1059293-12-daniel.lezcano@oss.qualcomm.com/
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-06-24 10:42 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 10:22 [PATCH v3 0/8] Add support for Qualcomm remoteproc subsystem cooling Gaurav Kohli
2026-06-09 10:22 ` [PATCH v3 1/8] dt-bindings: remoteproc: qcom,pas: add thermal mitigation properties Gaurav Kohli
2026-06-09 10:47 ` Dmitry Baryshkov
2026-06-10 12:02 ` Gaurav Kohli
2026-06-10 7:31 ` Krzysztof Kozlowski
2026-06-11 11:12 ` Gaurav Kohli
2026-06-11 12:23 ` Krzysztof Kozlowski
2026-06-12 13:52 ` Gaurav Kohli
2026-06-13 7:41 ` Krzysztof Kozlowski
2026-06-13 11:05 ` Gaurav Kohli
2026-06-15 5:03 ` Krzysztof Kozlowski
2026-06-15 10:34 ` Daniel Lezcano
2026-06-15 12:12 ` Gaurav Kohli
2026-06-15 12:30 ` Daniel Lezcano
2026-06-15 14:11 ` Dmitry Baryshkov
2026-06-15 14:33 ` Daniel Lezcano
2026-06-15 15:14 ` Dmitry Baryshkov
2026-06-15 15:33 ` Daniel Lezcano
2026-06-15 22:15 ` Dmitry Baryshkov
2026-06-17 12:32 ` Konrad Dybcio
2026-06-19 12:16 ` Daniel Lezcano
2026-06-16 4:21 ` Krzysztof Kozlowski
2026-06-18 7:17 ` Daniel Lezcano
2026-06-24 10:42 ` Krzysztof Kozlowski [this message]
2026-06-24 15:56 ` Daniel Lezcano
2026-06-09 10:22 ` [PATCH v3 2/8] soc: qcom: Add support for QMI TMD cooling devices Gaurav Kohli
2026-06-09 11:30 ` Dmitry Baryshkov
2026-06-09 12:08 ` Daniel Lezcano
2026-06-10 13:42 ` Dmitry Baryshkov
2026-06-10 14:15 ` Daniel Lezcano
2026-06-11 10:53 ` Gaurav Kohli
2026-06-11 22:50 ` Dmitry Baryshkov
2026-06-09 10:22 ` [PATCH v3 3/8] remoteproc: qcom: pas: register TMD thermal " Gaurav Kohli
2026-06-09 11:05 ` Dmitry Baryshkov
2026-06-09 12:03 ` Konrad Dybcio
2026-06-11 4:45 ` Gaurav Kohli
2026-06-11 20:34 ` Dmitry Baryshkov
2026-06-09 10:22 ` [PATCH v3 4/8] arm64: dts: qcom: kodiak: Enable CDSP & Modem cooling Gaurav Kohli
2026-06-09 10:57 ` Dmitry Baryshkov
2026-06-15 5:32 ` Gaurav Kohli
2026-06-15 15:25 ` Dmitry Baryshkov
2026-06-09 10:23 ` [PATCH v3 5/8] arm64: dts: qcom: lemans: Enable CDSP cooling Gaurav Kohli
2026-06-09 10:23 ` [PATCH v3 6/8] arm64: dts: qcom: talos: " Gaurav Kohli
2026-06-09 10:23 ` [PATCH v3 7/8] arm64: dts: qcom: monaco: " Gaurav Kohli
2026-06-09 10:23 ` [PATCH v3 8/8] arm64: dts: qcom: hamoa: " Gaurav Kohli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5b0f1f39-ddaa-4a2e-ab29-34aacc9ff672@kernel.org \
--to=krzk@kernel.org \
--cc=amit.kucheria@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=daniel.lezcano@oss.qualcomm.com \
--cc=devicetree@vger.kernel.org \
--cc=gaurav.kohli@oss.qualcomm.com \
--cc=gustavoars@kernel.org \
--cc=kees@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=manaf.pallikunhi@oss.qualcomm.com \
--cc=mani@kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox