Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>
Cc: "Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Paul-pl Chen (陳柏霖)" <Paul-pl.Chen@mediatek.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>
Subject: Re: [PATCH 1/2] dt-bindings: regulator: mediatek: Add MT8196 vmm controller
Date: Wed, 28 May 2025 08:29:33 +0200	[thread overview]
Message-ID: <5be237d3-5b8d-42ee-a492-d5d7b075fe81@kernel.org> (raw)
In-Reply-To: <9ada04bb73e980f981d3b933552f0eda47d4fd26.camel@mediatek.com>

On 28/05/2025 06:01, Nancy Lin (林欣螢) wrote:
>>
>> Virtual regulators do not sound real, so feels like you want some
>> sort
>> of power domains?
>>
> This regulator supplies power to the power domain. Before the power
> domain can be powered up, the MediaTek PM driver first enables the
> regulator that the power domain relies on, and then powers up the
> domain. While "virtual" might not be the best term, it accurately
> describes a regulator used to control the power switch.
> 
> Ultimately, the VCP (uP) handles the on/off control of the regulator.
> Therefore, we encapsulate it as a standard regulator in the kernel.
> 
> The internal control of the VMM regulator is as follows:
>    kernel                 HWCCF                          VCP (uP)
> |--------------|      |--------------|   irq    |---------------------|
> | VMM reglator | ---> | hardware     |  ----->  | get buck on/off irq |
> |              |      | voter        |          | and then turn on/off|
> |              |      |              |          | buck                |
> |--------------|      |--------------|          |---------------------|
> 
> When the regulator needs to be turned on or off, it uses the voter
> provided by hwccf to cast a vote for on/off. The VCP then receives the
> corresponding IRQ for the regulator and performs the buck on/off
> accordingly.

OK, thanks for explanation.

> 
...

> 
>>> +
>>> +  mediatek,hw-ccf:
>>> +    $ref: /schemas/types.yaml#/definitions/phandle
>>> +    description: Phandle to the hardware common clock framework
>>> syscon controller.
>>
>> No, you cannot express clocks with syscon.
>>
> HWCCF is MediaTek's internal naming; the functionality of the hardware
> IP is voter. We use the IP to vote for buck on/off, and the VCP will
> get the voting result to perform buck on/off. I will refine the
> naming/description to "voter."


OK, that was a bit confusing, but now I have more questions:

Why isn't this a child of the HWCCF? You do not have here any resources,
so this looks just to instantiate device for Linux.

Looking at your diagram earlier (maybe include it in binding description
if this stays as is at the end) I would imagine phandle only to hwccf.
But you have two phandles - HWCCF and VCP.

So maybe this is part of VCP device, not HWCCF? I don't know. I am
afraid the moment I will suggest you something someone from Collabora
will be pointing out that my advice us wrong and I don't know this
hardware. Yeah, I don't know it. You should know it.

> 
>>> +
>>> +  mediatek,vcp:
>>> +    $ref: /schemas/types.yaml#/definitions/phandle
>>> +    description: Phandle to the Video Co-Processor (VCP) node.
>>
>> For what purpose?
>>
> This is used to ensure that the VCP uP is ready to receive the hwccf
> IRQ and handle the corresponding buck on/off operations.
> 
>>> +
>>> +patternProperties:
>>> +  "^(vdisp|vdec-vcore)$":
>>
>> Redundant nodes, useless. Drop these completely.
>>
> OK.
Best regards,
Krzysztof


  reply	other threads:[~2025-05-28  6:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 15:03 [PATCH 0/2] Add MT8196 VMM driver support Nancy.Lin
2025-05-22 15:03 ` [PATCH 1/2] dt-bindings: regulator: mediatek: Add MT8196 vmm controller Nancy.Lin
2025-05-22 15:09   ` Krzysztof Kozlowski
2025-05-22 15:18     ` Krzysztof Kozlowski
2025-05-28  4:01     ` Nancy Lin (林欣螢)
2025-05-28  6:29       ` Krzysztof Kozlowski [this message]
2025-05-22 16:28   ` Rob Herring (Arm)
2025-05-23  2:55   ` CK Hu (胡俊光)
2025-05-22 15:03 ` [PATCH 2/2] soc: mediatek: Add MT8196 VMM driver support Nancy.Lin
2025-05-22 15:10   ` Krzysztof Kozlowski
2025-05-28  4:24     ` Nancy Lin (林欣螢)

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=5be237d3-5b8d-42ee-a492-d5d7b075fe81@kernel.org \
    --to=krzk@kernel.org \
    --cc=Jason-JH.Lin@mediatek.com \
    --cc=Nancy.Lin@mediatek.com \
    --cc=Paul-pl.Chen@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Singo.Chang@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=chunkuang.hu@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --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