linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Laura Nao <laura.nao@collabora.com>,
	mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, matthias.bgg@gmail.com,
	p.zabel@pengutronix.de, richardcochran@gmail.com
Cc: guangjie.song@mediatek.com, wenst@chromium.org,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
	kernel@collabora.com
Subject: Re: [PATCH v2 09/29] dt-bindings: clock: mediatek: Describe MT8196 peripheral clock controllers
Date: Wed, 25 Jun 2025 14:48:39 +0200	[thread overview]
Message-ID: <ae478fd7-c627-433c-a614-b76dcd4164d2@collabora.com> (raw)
In-Reply-To: <86654ad1-a2ab-4add-b9de-4d56c67f377b@kernel.org>

Il 25/06/25 13:06, Krzysztof Kozlowski ha scritto:
> On 25/06/2025 11:45, AngeloGioacchino Del Regno wrote:
>> Il 25/06/25 10:57, Krzysztof Kozlowski ha scritto:
>>> On 25/06/2025 10:20, AngeloGioacchino Del Regno wrote:
>>>> Il 24/06/25 18:02, Krzysztof Kozlowski ha scritto:
>>>>> On 24/06/2025 16:32, Laura Nao wrote:
>>>>>> +  '#reset-cells':
>>>>>> +    const: 1
>>>>>> +    description:
>>>>>> +      Reset lines for PEXTP0/1 and UFS blocks.
>>>>>> +
>>>>>> +  mediatek,hardware-voter:
>>>>>> +    $ref: /schemas/types.yaml#/definitions/phandle
>>>>>> +    description:
>>>>>> +      On the MT8196 SoC, a Hardware Voter (HWV) backed by a fixed-function
>>>>>> +      MCU manages clock and power domain control across the AP and other
>>>>>> +      remote processors. By aggregating their votes, it ensures clocks are
>>>>>> +      safely enabled/disabled and power domains are active before register
>>>>>> +      access.
>>>>>
>>>>> Resource voting is not via any phandle, but either interconnects or
>>>>> required opps for power domain.
>>>>
>>>> Sorry, I'm not sure who is actually misunderstanding what, here... let me try to
>>>> explain the situation:
>>>>
>>>> This is effectively used as a syscon - as in, the clock controllers need to perform
>>>> MMIO R/W on both the clock controller itself *and* has to place a vote to the clock
>>>> controller specific HWV register.
>>>
>>> syscon is not the interface to place a vote for clocks. "clocks"
>>> property is.
>>>
>>>>
>>>> This is done for MUX-GATE and GATE clocks, other than for power domains.
>>>>
>>>> Note that the HWV system is inside of the power domains controller, and it's split
>>>> on a per hardware macro-block basis (as per usual MediaTek hardware layout...).
>>>>
>>>> The HWV, therefore, does *not* vote for clock *rates* (so, modeling OPPs would be
>>>> a software quirk, I think?), does *not* manage bandwidth (and interconnect is for
>>>> voting BW only?), and is just a "switch to flip".
>>>
>>> That's still clocks. Gate is a clock.
>>>
>>>>
>>>> Is this happening because the description has to be improved and creating some
>>>> misunderstanding, or is it because we are underestimating and/or ignoring something
>>>> here?
>>>>
>>>
>>> Other vendors, at least qcom, represent it properly - clocks. Sometimes
>>> they mix up and represent it as power domains, but that's because
>>> downstream is a mess and because we actually (at upstream) don't really
>>> know what is inside there - is it a clock or power domain.
>>>
>>
>> ....but the hardware voter cannot be represented as a clock, because you use it
>> for clocks *or* power domains (but at the same time, and of course in different
>> drivers, and in different *intertwined* registers).
> 
> BTW:
> 
> git grep mediatek,hardware-voter
> 0 results
> 
> so I do not accept explanation that you use it in different drivers. Now
> is the first time this is being upstream, so now is the time when this
> is shaped.

I was simply trying to explain how I'm using it in the current design and nothing
else; and I am happy to understand what other solution could there be for this and
if there's anything cleaner.

You see what I do, and I'm *sure* that you definitely know that my goal is *not* to
just tick yet another box, but to make things right, - and with the best possible
shape and, especially, community agreement.

Cheers,
Angelo



  reply	other threads:[~2025-06-25 12:48 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 14:31 [PATCH v2 00/29] Add support for MT8196 clock controllers Laura Nao
2025-06-24 14:31 ` [PATCH v2 01/29] clk: mediatek: clk-pll: Add set/clr regs for shared PLL enable control Laura Nao
2025-06-24 14:31 ` [PATCH v2 02/29] clk: mediatek: clk-pll: Add ops for PLLs using set/clr regs and FENC Laura Nao
2025-06-24 14:31 ` [PATCH v2 03/29] clk: mediatek: clk-mux: Add ops for mux gates with set/clr/upd " Laura Nao
2025-06-24 14:31 ` [PATCH v2 04/29] clk: mediatek: clk-mtk: Introduce mtk_clk_get_hwv_regmap() Laura Nao
2025-06-24 14:31 ` [PATCH v2 05/29] clk: mediatek: clk-mux: Add ops for mux gates with HW voter and FENC Laura Nao
2025-06-24 14:31 ` [PATCH v2 06/29] clk: mediatek: clk-gate: Refactor mtk_clk_register_gate to use mtk_gate struct Laura Nao
2025-06-24 14:31 ` [PATCH v2 07/29] clk: mediatek: clk-gate: Add ops for gates with HW voter Laura Nao
2025-06-24 14:31 ` [PATCH v2 08/29] clk: mediatek: clk-mtk: Add MUX_DIV_GATE macro Laura Nao
2025-06-24 14:32 ` [PATCH v2 09/29] dt-bindings: clock: mediatek: Describe MT8196 peripheral clock controllers Laura Nao
2025-06-24 16:02   ` Krzysztof Kozlowski
2025-06-25  8:20     ` AngeloGioacchino Del Regno
2025-06-25  8:57       ` Krzysztof Kozlowski
2025-06-25  9:45         ` AngeloGioacchino Del Regno
2025-06-25 11:05           ` Krzysztof Kozlowski
2025-06-25 12:42             ` AngeloGioacchino Del Regno
2025-06-27  8:37               ` Krzysztof Kozlowski
2025-06-30  9:21                 ` AngeloGioacchino Del Regno
2025-06-25 11:06           ` Krzysztof Kozlowski
2025-06-25 12:48             ` AngeloGioacchino Del Regno [this message]
2025-06-27  8:44               ` Krzysztof Kozlowski
2025-06-24 14:32 ` [PATCH v2 10/29] dt-bindings: reset: Add MediaTek MT8196 Reset Controller binding Laura Nao
2025-06-24 16:03   ` Krzysztof Kozlowski
2025-06-24 16:04     ` Krzysztof Kozlowski
2025-06-25  8:48     ` Laura Nao
2025-06-24 14:32 ` [PATCH v2 11/29] clk: mediatek: Add MT8196 apmixedsys clock support Laura Nao
2025-06-24 14:32 ` [PATCH v2 12/29] clk: mediatek: Add MT8196 topckgen " Laura Nao
2025-07-15  4:53   ` Chen-Yu Tsai
2025-07-15  5:26   ` Chen-Yu Tsai
2025-06-24 14:32 ` [PATCH v2 13/29] clk: mediatek: Add MT8196 topckgen2 " Laura Nao
2025-06-24 14:32 ` [PATCH v2 14/29] clk: mediatek: Add MT8196 vlpckgen " Laura Nao
2025-07-15  7:28   ` Chen-Yu Tsai
2025-07-18  8:31     ` Chen-Yu Tsai
2025-07-22 10:52       ` Laura Nao
2025-06-24 14:32 ` [PATCH v2 15/29] clk: mediatek: Add MT8196 peripheral " Laura Nao
2025-06-24 14:32 ` [PATCH v2 16/29] clk: mediatek: Add MT8196 ufssys " Laura Nao
2025-06-24 14:32 ` [PATCH v2 17/29] clk: mediatek: Add MT8196 pextpsys " Laura Nao
2025-06-24 14:32 ` [PATCH v2 18/29] clk: mediatek: Add MT8196 adsp " Laura Nao
2025-07-15  4:36   ` Chen-Yu Tsai
2025-06-24 14:32 ` [PATCH v2 19/29] clk: mediatek: Add MT8196 I2C " Laura Nao
2025-06-24 14:32 ` [PATCH v2 20/29] clk: mediatek: Add MT8196 mcu " Laura Nao
2025-06-24 14:32 ` [PATCH v2 21/29] clk: mediatek: Add MT8196 mdpsys " Laura Nao
2025-06-24 14:32 ` [PATCH v2 22/29] clk: mediatek: Add MT8196 mfg " Laura Nao
2025-06-29 20:56   ` kernel test robot
2025-06-24 14:32 ` [PATCH v2 23/29] clk: mediatek: Add MT8196 disp0 " Laura Nao
2025-06-24 14:32 ` [PATCH v2 24/29] clk: mediatek: Add MT8196 disp1 " Laura Nao
2025-06-24 14:32 ` [PATCH v2 25/29] clk: mediatek: Add MT8196 disp-ao " Laura Nao
2025-06-24 14:32 ` [PATCH v2 26/29] clk: mediatek: Add MT8196 ovl0 " Laura Nao
2025-06-24 14:32 ` [PATCH v2 27/29] clk: mediatek: Add MT8196 ovl1 " Laura Nao
2025-06-24 14:32 ` [PATCH v2 28/29] clk: mediatek: Add MT8196 vdecsys " Laura Nao
2025-06-24 14:32 ` [PATCH v2 29/29] clk: mediatek: Add MT8196 vencsys " Laura Nao
2025-06-24 15:49 ` [PATCH v2 00/29] Add support for MT8196 clock controllers Nícolas F. R. A. Prado

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=ae478fd7-c627-433c-a614-b76dcd4164d2@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=guangjie.song@mediatek.com \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=laura.nao@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=wenst@chromium.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;
as well as URLs for NNTP newsgroup(s).