devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Nancy.Lin" <nancy.lin@mediatek.com>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Cc: Mark Brown <broonie@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com,
	jason-jh.lin@mediatek.com, singo.chang@mediatek.com,
	paul-pl.chen@mediatek.com
Subject: Re: [PATCH 1/2] dt-bindings: regulator: mediatek: Add MT8196 vmm controller
Date: Thu, 22 May 2025 17:09:19 +0200	[thread overview]
Message-ID: <d21e1775-d5d4-4f58-865e-0cb33d14f371@kernel.org> (raw)
In-Reply-To: <20250522150426.3418225-2-nancy.lin@mediatek.com>

On 22/05/2025 17:03, Nancy.Lin wrote:
> From: Nancy Lin <nancy.lin@mediatek.com>
> 
> Add a device tree binding document for the MediaTek MT8196 VMM (Vcore
> for MultiMedia) regulator controller. The VMM controller acts as the
> main power supplier for multimedia power domains, such as those used
> by display, video encode and decode subsystems. It provides virtual
> regulators that serve as the power sources for various multimedia IPs,

Virtual regulators do not sound real, so feels like you want some sort
of power domains?

A nit, subject: drop second/last, redundant "bindings". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18

> and coordinates with the hardware common clock framework (hwccf) and
> the Video Companion Processor (VCP) to manage the power domains of
> these components. The regulator is controlled by the VCP firmware,
> and the operating system signals its requirement through a voting
> hardware block (hwccf).
> 
> Signed-off-by: Nancy Lin <nancy.lin@mediatek.com>
> ---
>  .../mediatek,mt8196-vmm-regulator.yaml        | 70 +++++++++++++++++++
>  1 file changed, 70 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt8196-vmm-regulator.yaml
> 
> diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt8196-vmm-regulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt8196-vmm-regulator.yaml
> new file mode 100644
> index 000000000000..a50e35c2e238
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt8196-vmm-regulator.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/regulator/mediatek,mt8196-vmm-regulator.yaml#"
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek MT8196 VMM (Vcore for MultiMedia) Regulator Controller
> +
> +maintainers:
> +  - Nancy Lin <nancy.lin@mediatek.com>
> +
> +description: |
> +  The MediaTek MT8196 VMM (Vcore for Multi Media) controller acts as the
> +  main power supplier for multimedia power domains, such as those used by
> +  display, video encode and decode subsystems. The VMM hardware block
> +  provides virtual regulators that serve as the power sources (suppliers)
> +  for various multimedia IPs. It coordinates with the MediaTek hardware
> +  common clock framework (HWCCF) and the Video Companion Processor (VCP)
> +  to manage the power domains of these multimedia components.
> +
> +  Each child node under the VMM node represents a virtual regulator
> +  (e.g., vdisp, vdec-vcore) and must specify a 'regulator-name'.
> +
> +properties:
> +  compatible:
> +    const: "mediatek,mt8196-vmm"

Not tested...

> +
> +  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.

> +
> +  mediatek,vcp:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: Phandle to the Video Co-Processor (VCP) node.

For what purpose?

> +
> +patternProperties:
> +  "^(vdisp|vdec-vcore)$":

Redundant nodes, useless. Drop these completely.


> +    type: object
> +    description: |
> +      Virtual regulator for a specific multimedia domain.
> +      The node name should match the supported regulator (e.g., vdisp, vdec-vcore).
> +    properties:
> +      regulator-name:

No, you cannot start redefining properties. This binding is nowhere
close to hardware description. Looks like some copy-paste downstream
driver, so binding to fulfill driver needs.

Please rework to match hardware. I suggest reaching internally to get
some help how upstream drivers and bindings look like *prior* sending
downstream code.

Best regards,
Krzysztof

  reply	other threads:[~2025-05-22 15:09 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 [this message]
2025-05-22 15:18     ` Krzysztof Kozlowski
2025-05-28  4:01     ` Nancy Lin (林欣螢)
2025-05-28  6:29       ` Krzysztof Kozlowski
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=d21e1775-d5d4-4f58-865e-0cb33d14f371@kernel.org \
    --to=krzk@kernel.org \
    --cc=Project_Global_Chrome_Upstream_Group@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=jason-jh.lin@mediatek.com \
    --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=nancy.lin@mediatek.com \
    --cc=paul-pl.chen@mediatek.com \
    --cc=robh@kernel.org \
    --cc=singo.chang@mediatek.com \
    /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).