From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
bchihi@baylibre.com, angelogioacchino.delregno@collabora.com,
rafael@kernel.org, amitk@kernel.org, rui.zhang@intel.com,
matthias.bgg@gmail.com, krzysztof.kozlowski+dt@linaro.org,
rdunlap@infradead.org, ye.xingchen@zte.com.cn,
p.zabel@pengutronix.de, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
khilman@baylibre.com, james.lo@mediatek.com,
rex-bc.chen@mediatek.com
Subject: Re: [PATCH 1/4] dt-bindings: thermal: mediatek: Add AP domain to LVTS thermal controllers for mt8195
Date: Fri, 17 Mar 2023 12:57:28 +0100 [thread overview]
Message-ID: <59fc344b-4d1a-e0b2-92b5-2341b014ae11@linaro.org> (raw)
In-Reply-To: <20230316223543.GA4008428-robh@kernel.org>
Hi Rob,
On 16/03/2023 23:35, Rob Herring wrote:
> On Thu, Mar 09, 2023 at 11:39:13AM +0100, Daniel Lezcano wrote:
>> On 09/03/2023 05:40, Chen-Yu Tsai wrote:
>>> On Wed, Mar 8, 2023 at 12:46 AM <bchihi@baylibre.com> wrote:
>>>>
>>>> From: Balsam CHIHI <bchihi@baylibre.com>
>>>>
>>>> Add AP Domain to LVTS thermal controllers dt-binding definition for mt8195.
>>>>
>>>> Signed-off-by: Balsam CHIHI <bchihi@baylibre.com>
>>>> ---
>>>> include/dt-bindings/thermal/mediatek,lvts-thermal.h | 10 ++++++++++
>>>> 1 file changed, 10 insertions(+)
>>>>
>>>> diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
>>>> index c09398920468..8fa5a46675c4 100644
>>>> --- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h
>>>> +++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
>>>> @@ -16,4 +16,14 @@
>>>> #define MT8195_MCU_LITTLE_CPU2 6
>>>> #define MT8195_MCU_LITTLE_CPU3 7
>>>>
>>>> +#define MT8195_AP_VPU0 8
>>>
>>> Can't this start from 0? This is a different hardware block. The index
>>> namespace is separate. Same question for MT8192.
>>
>> The ID is used to differentiate the thermal zone identifier in the device
>> tree from the driver.
>>
>> + vpu0-thermal {
>> + polling-delay = <0>;
>> + polling-delay-passive = <0>;
>> + thermal-sensors = <&lvts_ap MT8195_AP_VPU0>;
>> +
>> + trips {
>> + vpu0_crit: trip-crit {
>> + temperature = <100000>;
>> + hysteresis = <2000>;
>> + type = "critical";
>> + };
>> + };
>> + };
>>
>> If MT8195_AP_VPU0 is 0, then the code won't be able to differentiate
>> MT8195_AP_VPU0 and MT8195_MCU_BIG_CPU0
>>
>> The LVTS driver will call devm_thermal_of_zone_register() with the sensor
>> id. If MT8195_MCU_BIG_CPU0 and MT8195_AP_VPU0 have the same id, then at the
>> moment of registering the MT8195_AP_VPU0, the underlying OF thermal
>> framework code will use MT8195_MCU_BIG_CPU0 description instead because it
>> will be the first to be find in the DT.
>>
>> If MT8195_AP_VPU0 is described in DT before, then the same will happen when
>> registering MT8195_MCU_BIG_CPU0, MT8195_AP_VPU0 will be registered instead.
>>
>> IOW all ids must be different.
>
> That's broken for how producer/consumer phandle+args bindings work.
Do you mean this is broken for thermal zone description in the DT in
general ?
What would be the correct approach ?
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2023-03-17 11:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 15:45 [PATCH 0/4] Add LVTS's AP thermal domain support " bchihi
2023-03-07 15:45 ` [PATCH 1/4] dt-bindings: thermal: mediatek: Add AP domain to LVTS thermal controllers " bchihi
2023-03-08 9:14 ` AngeloGioacchino Del Regno
2023-03-09 4:40 ` Chen-Yu Tsai
2023-03-09 10:39 ` Daniel Lezcano
2023-03-10 3:20 ` Chen-Yu Tsai
2023-03-16 22:35 ` Rob Herring
2023-03-17 11:57 ` Daniel Lezcano [this message]
2023-03-16 22:36 ` Rob Herring
2023-04-01 20:51 ` Daniel Lezcano
2023-03-07 15:45 ` [PATCH 2/4] thermal/drivers/mediatek/lvts_thermal: Add AP domain " bchihi
2023-03-08 9:15 ` AngeloGioacchino Del Regno
2023-03-08 16:05 ` Balsam CHIHI
2023-04-01 20:51 ` Daniel Lezcano
2023-04-04 15:12 ` Balsam CHIHI
2023-03-07 15:45 ` [PATCH 3/4] arm64: dts: mediatek: mt8195: Add AP domain thermal zones bchihi
2023-03-07 15:45 ` [PATCH 4/4] arm64: dts: mediatek: mt8195: Add AP domain temperature thresholds bchihi
2023-03-08 9:17 ` AngeloGioacchino Del Regno
2023-03-08 16:01 ` Balsam CHIHI
2023-03-10 3:22 ` [PATCH 0/4] Add LVTS's AP thermal domain support for mt8195 Chen-Yu Tsai
2023-03-22 12:50 ` Balsam CHIHI
2023-04-01 20:52 ` Daniel Lezcano
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=59fc344b-4d1a-e0b2-92b5-2341b014ae11@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bchihi@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=james.lo@mediatek.com \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=rex-bc.chen@mediatek.com \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=wenst@chromium.org \
--cc=ye.xingchen@zte.com.cn \
/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
all inboxes | Powered by JetHome®