lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <caab284a85ad5906d1d2befd6a3bd2ef77301758.camel@mediatek.com>
Date: Fri, 23 May 2025 02:55:24 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "lgirdwood@...il.com" <lgirdwood@...il.com>, "robh@...nel.org"
	<robh@...nel.org>, "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
	"matthias.bgg@...il.com" <matthias.bgg@...il.com>, "krzk+dt@...nel.org"
	<krzk+dt@...nel.org>
CC: Singo Chang (張興國) <Singo.Chang@...iatek.com>,
	"broonie@...nel.org" <broonie@...nel.org>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@...iatek.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jason-JH Lin (林睿祥) <Jason-JH.Lin@...iatek.com>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>,
	Paul-pl Chen (陳柏霖) <Paul-pl.Chen@...iatek.com>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"conor+dt@...nel.org" <conor+dt@...nel.org>
Subject: Re: [PATCH 1/2] dt-bindings: regulator: mediatek: Add MT8196 vmm
 controller

On Thu, 2025-05-22 at 23:03 +0800, Nancy.Lin wrote:
> From: Nancy Lin <nancy.lin@...iatek.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,
> 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@...iatek.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: "https://urldefense.com/v3/__http://devicetree.org/schemas/regulator/mediatek,mt8196-vmm-regulator.yaml*__;Iw!!CTRNKA9wMg0ARbw!gawATNOT3u6UBtTwtgnoZggwdwVL3VBuFZQyf-baV8j1wUMIV1sIaqBvhcqtfnZSlmXFesengtZaYxCWtDo$ "
> +$schema: https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!gawATNOT3u6UBtTwtgnoZggwdwVL3VBuFZQyf-baV8j1wUMIV1sIaqBvhcqtfnZSlmXFesengtZaLcnGLmw$ 
> +
> +title: MediaTek MT8196 VMM (Vcore for MultiMedia) Regulator Controller
> +
> +maintainers:
> +  - Nancy Lin <nancy.lin@...iatek.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"
> +
> +  mediatek,hw-ccf:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: Phandle to the hardware common clock framework syscon controller.
> +
> +  mediatek,vcp:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: Phandle to the Video Co-Processor (VCP) node.
> +
> +patternProperties:
> +  "^(vdisp|vdec-vcore)$":
> +    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:
> +        type: string
> +        description: The name of the virtual regulator.
> +    required:
> +      - regulator-name
> +    additionalProperties: false
> +
> +required:
> +  - compatible
> +  - mediatek,hw-ccf
> +  - mediatek,vcp
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    vmm: vmm {
> +      compatible = "mediatek,mt8196-vmm";
> +      mediatek,hw-ccf = <&mm_hwv>;
> +      mediatek,vcp = <&vcp>;
> +
> +      vdisp: vdisp {
> +        regulator-name = "vdisp";
> +      };
> +      vdec_vcore: vdec-vcore {
> +        regulator-name = "vdec-vcore";
> +      };
> +    };

device tree is used to describe real hardware.
vmm is a virtual device which is used for software to integrate the related driver,
so it should not have this virtual device.
According to your description, vcp is the master to control regulator,
so I think the device tree would be

vcp {
	regulator-name = "vdisp", "vdec-vcore";
};

And vcp driver control these regulator.

I'm not sure what does hw-ccf do, if it's also controlled by vcp, the node should be

vcp {
	mediatek,hw-ccf = <&mm_hwv>;
	regulator-name = "vdisp", "vdec-vcore";
};

Regards,
CK


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ