* Re: [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding
@ 2026-11-26 9:13 Echo Zhang (张玉)
0 siblings, 0 replies; 5+ messages in thread
From: Echo Zhang (张玉) @ 2026-11-26 9:13 UTC (permalink / raw)
To: Roman Vivchar
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, MMDVFS Team,
Kyrie Wu (吴晗),
Ming-Fan Chen (陳明汎),
devicetree, linux-kernel, linux-arm-kernel, linux-clk, llvm
On 三, 2026-11-25 at 08:32 +0000, Roman Vivchar wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Hi,
>
> On Wednesday, November 25th, 2026 at 8:01 AM, Echo Zhang
> <echo.zhang@mediatek.com> wrote:
>
> > Describe the MMDVFS clock provider and its connection to VCP
> > firmware
> > in a common binding. Document the optional MMUP shared memory and
> > IPI
> > settings used by the firmware backend.
> >
> > Add an MT8196 binding for the HWCCF syscon and seven mux OPP tables
> > so
> > the driver can map clock rate requests to hardware votes.
> >
> > Signed-off-by: Echo Zhang <echo.zhang@mediatek.com>
> > ---
> > .../soc/mediatek/mediatek,mmdvfs.yaml | 60 +++++++++++++
> > .../soc/mediatek/mediatek,mt8196-mmdvfs.yaml | 87
> > +++++++++++++++++++
> > 2 files changed, 147 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml
> > create mode 100644
> > Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-
> > mmdvfs.yaml
> >
> > diff --git
> > a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.ya
> > ml
> > b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.ya
> > ml
> > new file mode 100644
> > index 000000000000..d65f4c9084cc
> > --- /dev/null
> > +++
> > b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.ya
> > ml
> > @@ -0,0 +1,60 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id:
> > https://urldefense.com/v3/__http://devicetree.org/schemas/soc/mediatek/mediatek,mmdvfs.yaml*__;Iw!!CTRNKA9wMg0ARbw!n7lWIzlOD5PGrwBV4ZmwXlYbDgI7RQI1BH_918VY_uKaFBB9d7yW3-iSfObuTmgmJZMABRAWn1txHv2p-im9$
> > +$schema:
> > https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!n7lWIzlOD5PGrwBV4ZmwXlYbDgI7RQI1BH_918VY_uKaFBB9d7yW3-iSfObuTmgmJZMABRAWn1txHm-gjpPT$
> > +
> > +title: MediaTek Multimedia Dynamic Voltage and Frequency Scaling
> > (MMDVFS)
> > +
> > +maintainers:
> > + - MediaTek MMDVFS Team <linux-mediatek@lists.infradead.org>
>
> Maintainers should be real people, not a mailing list.
>
> > +
> > +description:
> > + MediaTek MMDVFS provides dynamic voltage and frequency scaling
> > for multimedia
> > + hardware accelerators. The controller exposes virtual clocks
> > that multimedia
> > + consumers use through the common clock framework. The driver
> > aggregates
> > + consumer rate requests and sends the resulting DVFS votes to the
> > multimedia
> > + hardware voter and VCP firmware.
> > +
> > +select: false
> > +
> > +properties:
> > + mediatek,vcp:
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > + description:
> > + Phandle to the MediaTek VCP remote processor used for MMDVFS
> > shared
> > + memory, feature registration, notifier, and IPI operations.
> > +
> > + mediatek,mmup-sram:
> > + type: boolean
> > + description:
> > + Use the MMUP SRAM window for MMDVFS callback records and
> > status data.
> > +
> > + mediatek,mmup-enable:
> > + type: boolean
> > + description:
> > + Enable the MMUP path for MMDVFS shared memory and IPI
> > handling.
> > +
> > + mediatek,vcp-ipi-id:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description:
> > + VCP IPI channel id for MMDVFS. If omitted, the driver uses
> > the platform
> > + default.
> > +
> > + mediatek,mmup-ipi-id:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description:
> > + MMUP IPI channel id for MMDVFS. If omitted, the driver uses
> > the platform
> > + default.
> > +
> > + "#clock-cells":
> > + const: 1
> > + description:
> > + MMDVFS clock specifier. Consumers pass an SoC-specific
> > MMDVFS clock
> > + index.
> > +
> > +required:
> > + - mediatek,vcp
> > + - "#clock-cells"
> > +
> > +additionalProperties: true
> > diff --git
> > a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-
> > mmdvfs.yaml
> > b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-
> > mmdvfs.yaml
> > new file mode 100644
> > index 000000000000..13381c78dbd1
> > --- /dev/null
> > +++
> > b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-
> > mmdvfs.yaml
> > @@ -0,0 +1,87 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id:
> > https://urldefense.com/v3/__http://devicetree.org/schemas/soc/mediatek/mediatek,mt8196-mmdvfs.yaml*__;Iw!!CTRNKA9wMg0ARbw!n7lWIzlOD5PGrwBV4ZmwXlYbDgI7RQI1BH_918VY_uKaFBB9d7yW3-iSfObuTmgmJZMABRAWn1txHvsHrX-1$
> > +$schema:
> > https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!n7lWIzlOD5PGrwBV4ZmwXlYbDgI7RQI1BH_918VY_uKaFBB9d7yW3-iSfObuTmgmJZMABRAWn1txHm-gjpPT$
> > +
> > +title: MediaTek MT8196 Multimedia Dynamic Voltage and Frequency
> > Scaling
>
> Why there's mediatek,mmdvfs.yaml file if this exists?
>
> > +
> > +maintainers:
> > + - MediaTek MMDVFS Team <linux-mediatek@lists.infradead.org>
> > +
> > +allOf:
> > + - $ref: mediatek,mmdvfs.yaml#
> > +
> > +select:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - mediatek,mt8196-mmdvfs
> > + required:
> > + - compatible
>
> Drop. select is automatically inferred from the compatible.
>
> Best regards,
> Roman
Hi Roman,
Thank you for the review. I will replace the mailing list in the
maintainers fields with an individual maintainer in v2.
I added the common schema for properties that might be shared by future
SoCs, but this series only supports MT8196. That split is premature. I
will revisit the DT representation in light of the other binding
feedback and, if a separate binding remains justified, use a single
schema for this series. I will also drop the explicit select block;
the compatible already provides it.
Thanks,
Echo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/7] soc: mediatek: add MMDVFS support for MT8196
@ 2026-11-25 6:00 Echo Zhang
2026-11-25 6:00 ` [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding Echo Zhang
0 siblings, 1 reply; 5+ messages in thread
From: Echo Zhang @ 2026-11-25 6:00 UTC (permalink / raw)
To: Echo Zhang, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Stephen Boyd,
Brian Masney, Jerome Brunet, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, MMDVFS Team, kyrie.wu,
ming-fan.chen, devicetree, linux-kernel, linux-arm-kernel,
linux-clk, llvm
This series adds support for the MediaTek Multimedia Dynamic Voltage and
Frequency Scaling (MMDVFS) controller on MT8196. The controller provides
virtual clocks for multimedia hardware blocks and coordinates their
performance requests with platform voltage resources. The driver
aggregates consumer rate requests and programs the MT8196 hardware clock
control fabric (HWCCF) voter. Its VCP/MMUP backend coordinates shared
memory and IPI communication with firmware.
The series introduces the clock IDs and device tree bindings, followed by
the common clock provider, VCP backend and MT8196 topology and voting
data. It also adds a read-only debugfs status view and a MAINTAINERS entry.
This series depends on Xiangzhi Tang's MediaTek VCP remoteproc series,
which provides the public VCP API used by MMDVFS:
https://lore.kernel.org/r/20260427111446.22955-1-xiangzhi.tang@mediatek.com
Patch layout:
1/7: Define the MT8196 MMDVFS clock IDs used by DT consumers.
2/7: Document the common MMDVFS and MT8196 DT bindings.
3/7: Add the common driver, virtual clock provider and vote handling.
4/7: Add the VCP/MMUP shared-memory and IPI backend.
5/7: Add MT8196 topology data and HWCCF voting operations.
6/7: Add a read-only debugfs status view.
7/7: Add the MMDVFS files and contacts to MAINTAINERS.
Validation: the two MMDVFS bindings passed dt_binding_check. Each driver
commit built cumulatively with arm64 Clang on top of the VCP dependency.
The production changes were also ported to the MT8196 sapphire validation
tree, retaining its older VCP API compatibility and separate internal test
hooks. Its full package build and board boot passed. The status interface
reported initialization with three resource controllers, seven muxes. The
user, vote_step and force_step test completed with zero functional failures;
Echo Zhang (7):
dt-bindings: clock: mediatek: add MT8196 MMDVFS clock IDs
dt-bindings: soc: mediatek: add MMDVFS binding
soc: mediatek: add MMDVFS core driver
soc: mediatek: mmdvfs: add VCP backend
soc: mediatek: mmdvfs: add MT8196 support
soc: mediatek: mmdvfs: add read-only status debug
MAINTAINERS: add MediaTek MMDVFS entry
.../soc/mediatek/mediatek,mmdvfs.yaml | 60 +
.../soc/mediatek/mediatek,mt8196-mmdvfs.yaml | 87 ++
MAINTAINERS | 11 +
drivers/soc/mediatek/Kconfig | 19 +
drivers/soc/mediatek/Makefile | 1 +
drivers/soc/mediatek/mmdvfs/Makefile | 10 +
drivers/soc/mediatek/mmdvfs/mmdvfs-clk.c | 447 +++++++
drivers/soc/mediatek/mmdvfs/mmdvfs-core.c | 651 ++++++++++
drivers/soc/mediatek/mmdvfs/mmdvfs-debug.c | 200 +++
drivers/soc/mediatek/mmdvfs/mmdvfs-internal.h | 361 ++++++
drivers/soc/mediatek/mmdvfs/mmdvfs-mt8196.c | 637 ++++++++++
drivers/soc/mediatek/mmdvfs/mmdvfs-up-priv.h | 57 +
drivers/soc/mediatek/mmdvfs/mmdvfs-up.c | 275 +++++
.../soc/mediatek/mmdvfs/mmdvfs-vcp-memory.h | 104 ++
drivers/soc/mediatek/mmdvfs/mmdvfs-vcp.c | 1075 +++++++++++++++++
.../clock/mediatek,mt8196-mmdvfs.h | 74 ++
include/soc/mediatek/mmdvfs.h | 90 ++
17 files changed, 4159 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml
create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml
create mode 100644 drivers/soc/mediatek/mmdvfs/Makefile
create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-clk.c
create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-core.c
create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-debug.c
create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-internal.h
create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-mt8196.c
create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-up-priv.h
create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-up.c
create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-vcp-memory.h
create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-vcp.c
create mode 100644 include/dt-bindings/clock/mediatek,mt8196-mmdvfs.h
create mode 100644 include/soc/mediatek/mmdvfs.h
--
2.45.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding
2026-11-25 6:00 [PATCH 0/7] soc: mediatek: add MMDVFS support for MT8196 Echo Zhang
@ 2026-11-25 6:00 ` Echo Zhang
2026-11-25 8:32 ` Roman Vivchar
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Echo Zhang @ 2026-11-25 6:00 UTC (permalink / raw)
To: Echo Zhang, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Stephen Boyd,
Brian Masney, Jerome Brunet, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, MMDVFS Team, kyrie.wu,
ming-fan.chen, devicetree, linux-kernel, linux-arm-kernel,
linux-clk, llvm
Describe the MMDVFS clock provider and its connection to VCP firmware
in a common binding. Document the optional MMUP shared memory and IPI
settings used by the firmware backend.
Add an MT8196 binding for the HWCCF syscon and seven mux OPP tables so
the driver can map clock rate requests to hardware votes.
Signed-off-by: Echo Zhang <echo.zhang@mediatek.com>
---
.../soc/mediatek/mediatek,mmdvfs.yaml | 60 +++++++++++++
.../soc/mediatek/mediatek,mt8196-mmdvfs.yaml | 87 +++++++++++++++++++
2 files changed, 147 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml
create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml
diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml
new file mode 100644
index 000000000000..d65f4c9084cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mmdvfs.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Multimedia Dynamic Voltage and Frequency Scaling (MMDVFS)
+
+maintainers:
+ - MediaTek MMDVFS Team <linux-mediatek@lists.infradead.org>
+
+description:
+ MediaTek MMDVFS provides dynamic voltage and frequency scaling for multimedia
+ hardware accelerators. The controller exposes virtual clocks that multimedia
+ consumers use through the common clock framework. The driver aggregates
+ consumer rate requests and sends the resulting DVFS votes to the multimedia
+ hardware voter and VCP firmware.
+
+select: false
+
+properties:
+ mediatek,vcp:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the MediaTek VCP remote processor used for MMDVFS shared
+ memory, feature registration, notifier, and IPI operations.
+
+ mediatek,mmup-sram:
+ type: boolean
+ description:
+ Use the MMUP SRAM window for MMDVFS callback records and status data.
+
+ mediatek,mmup-enable:
+ type: boolean
+ description:
+ Enable the MMUP path for MMDVFS shared memory and IPI handling.
+
+ mediatek,vcp-ipi-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ VCP IPI channel id for MMDVFS. If omitted, the driver uses the platform
+ default.
+
+ mediatek,mmup-ipi-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ MMUP IPI channel id for MMDVFS. If omitted, the driver uses the platform
+ default.
+
+ "#clock-cells":
+ const: 1
+ description:
+ MMDVFS clock specifier. Consumers pass an SoC-specific MMDVFS clock
+ index.
+
+required:
+ - mediatek,vcp
+ - "#clock-cells"
+
+additionalProperties: true
diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml
new file mode 100644
index 000000000000..13381c78dbd1
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml
@@ -0,0 +1,87 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mt8196-mmdvfs.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT8196 Multimedia Dynamic Voltage and Frequency Scaling
+
+maintainers:
+ - MediaTek MMDVFS Team <linux-mediatek@lists.infradead.org>
+
+allOf:
+ - $ref: mediatek,mmdvfs.yaml#
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - mediatek,mt8196-mmdvfs
+ required:
+ - compatible
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt8196-mmdvfs
+
+ mediatek,hwccf:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the MT8196 multimedia hardware clock control fabric syscon
+ used for AP-side hardware votes.
+
+ mediatek,mux-opp-tables:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ minItems: 7
+ maxItems: 7
+ description: |
+ OPP tables for the seven MT8196 MMDVFS muxes, in this order:
+ display, MDP, SMI, VENC, VDEC, IMG, CAM. MDP and MML share
+ the MDP mux. Each OPP entry must have opp-hz and opp-level.
+
+required:
+ - compatible
+ - mediatek,hwccf
+ - mediatek,mux-opp-tables
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/mediatek,mt8196-mmdvfs.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ vcp: remoteproc@31800000 {
+ compatible = "mediatek,mt8196-vcp";
+ reg = <0 0x31800000 0 0x100000>;
+ };
+
+ mm_hwv: syscon@31b00000 {
+ compatible = "mediatek,mt8196-mm-hwv", "syscon";
+ reg = <0 0x31b00000 0 0x6000>;
+ };
+
+ mmdvfs_opp: opp-table {
+ compatible = "operating-points-v2";
+ opp-0 {
+ opp-hz = /bits/ 64 <100000000>;
+ opp-level = <0>;
+ };
+ };
+
+ mmdvfs: mmdvfs-mux {
+ compatible = "mediatek,mt8196-mmdvfs";
+ mediatek,vcp = <&vcp>;
+ mediatek,hwccf = <&mm_hwv>;
+ mediatek,mux-opp-tables = <&mmdvfs_opp>, <&mmdvfs_opp>,
+ <&mmdvfs_opp>, <&mmdvfs_opp>,
+ <&mmdvfs_opp>, <&mmdvfs_opp>,
+ <&mmdvfs_opp>;
+ #clock-cells = <1>;
+ };
+ };
--
2.45.2
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding
2026-11-25 6:00 ` [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding Echo Zhang
@ 2026-11-25 8:32 ` Roman Vivchar
2026-11-25 10:58 ` Krzysztof Kozlowski
2026-11-25 11:58 ` Krzysztof Kozlowski
2 siblings, 0 replies; 5+ messages in thread
From: Roman Vivchar @ 2026-11-25 8:32 UTC (permalink / raw)
To: Echo Zhang
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, MMDVFS Team, kyrie.wu,
ming-fan.chen, devicetree, linux-kernel, linux-arm-kernel,
linux-clk, llvm
Hi,
On Wednesday, November 25th, 2026 at 8:01 AM, Echo Zhang <echo.zhang@mediatek.com> wrote:
> Describe the MMDVFS clock provider and its connection to VCP firmware
> in a common binding. Document the optional MMUP shared memory and IPI
> settings used by the firmware backend.
>
> Add an MT8196 binding for the HWCCF syscon and seven mux OPP tables so
> the driver can map clock rate requests to hardware votes.
>
> Signed-off-by: Echo Zhang <echo.zhang@mediatek.com>
> ---
> .../soc/mediatek/mediatek,mmdvfs.yaml | 60 +++++++++++++
> .../soc/mediatek/mediatek,mt8196-mmdvfs.yaml | 87 +++++++++++++++++++
> 2 files changed, 147 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml
> create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml
>
> diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml
> new file mode 100644
> index 000000000000..d65f4c9084cc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mmdvfs.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek Multimedia Dynamic Voltage and Frequency Scaling (MMDVFS)
> +
> +maintainers:
> + - MediaTek MMDVFS Team <linux-mediatek@lists.infradead.org>
Maintainers should be real people, not a mailing list.
> +
> +description:
> + MediaTek MMDVFS provides dynamic voltage and frequency scaling for multimedia
> + hardware accelerators. The controller exposes virtual clocks that multimedia
> + consumers use through the common clock framework. The driver aggregates
> + consumer rate requests and sends the resulting DVFS votes to the multimedia
> + hardware voter and VCP firmware.
> +
> +select: false
> +
> +properties:
> + mediatek,vcp:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Phandle to the MediaTek VCP remote processor used for MMDVFS shared
> + memory, feature registration, notifier, and IPI operations.
> +
> + mediatek,mmup-sram:
> + type: boolean
> + description:
> + Use the MMUP SRAM window for MMDVFS callback records and status data.
> +
> + mediatek,mmup-enable:
> + type: boolean
> + description:
> + Enable the MMUP path for MMDVFS shared memory and IPI handling.
> +
> + mediatek,vcp-ipi-id:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + VCP IPI channel id for MMDVFS. If omitted, the driver uses the platform
> + default.
> +
> + mediatek,mmup-ipi-id:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + MMUP IPI channel id for MMDVFS. If omitted, the driver uses the platform
> + default.
> +
> + "#clock-cells":
> + const: 1
> + description:
> + MMDVFS clock specifier. Consumers pass an SoC-specific MMDVFS clock
> + index.
> +
> +required:
> + - mediatek,vcp
> + - "#clock-cells"
> +
> +additionalProperties: true
> diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml
> new file mode 100644
> index 000000000000..13381c78dbd1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml
> @@ -0,0 +1,87 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mt8196-mmdvfs.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek MT8196 Multimedia Dynamic Voltage and Frequency Scaling
Why there's mediatek,mmdvfs.yaml file if this exists?
> +
> +maintainers:
> + - MediaTek MMDVFS Team <linux-mediatek@lists.infradead.org>
> +
> +allOf:
> + - $ref: mediatek,mmdvfs.yaml#
> +
> +select:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - mediatek,mt8196-mmdvfs
> + required:
> + - compatible
Drop. select is automatically inferred from the compatible.
Best regards,
Roman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding
2026-11-25 6:00 ` [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding Echo Zhang
2026-11-25 8:32 ` Roman Vivchar
@ 2026-11-25 10:58 ` Krzysztof Kozlowski
2026-11-25 11:58 ` Krzysztof Kozlowski
2 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-25 10:58 UTC (permalink / raw)
To: Echo Zhang, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Stephen Boyd,
Brian Masney, Jerome Brunet, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, MMDVFS Team, kyrie.wu,
ming-fan.chen, devicetree, linux-kernel, linux-arm-kernel,
linux-clk, llvm
On 25/11/2026 07:00, Echo Zhang wrote:
> +description:
> + MediaTek MMDVFS provides dynamic voltage and frequency scaling for multimedia
> + hardware accelerators. The controller exposes virtual clocks that multimedia
> + consumers use through the common clock framework. The driver aggregates
> + consumer rate requests and sends the resulting DVFS votes to the multimedia
> + hardware voter and VCP firmware.
> +
> +select: false
What?
> +
> +properties:
> + mediatek,vcp:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Phandle to the MediaTek VCP remote processor used for MMDVFS shared
> + memory, feature registration, notifier, and IPI operations.
> +
> + mediatek,mmup-sram:
> + type: boolean
> + description:
> + Use the MMUP SRAM window for MMDVFS callback records and status data.
> +
> + mediatek,mmup-enable:
> + type: boolean
> + description:
> + Enable the MMUP path for MMDVFS shared memory and IPI handling.
> +
> + mediatek,vcp-ipi-id:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + VCP IPI channel id for MMDVFS. If omitted, the driver uses the platform
> + default.
> +
> + mediatek,mmup-ipi-id:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + MMUP IPI channel id for MMDVFS. If omitted, the driver uses the platform
> + default.
> +
> + "#clock-cells":
> + const: 1
> + description:
> + MMDVFS clock specifier. Consumers pass an SoC-specific MMDVFS clock
> + index.
> +
> +required:
> + - mediatek,vcp
> + - "#clock-cells"
> +
> +additionalProperties: true
> diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml
> new file mode 100644
> index 000000000000..13381c78dbd1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml
> @@ -0,0 +1,87 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mt8196-mmdvfs.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek MT8196 Multimedia Dynamic Voltage and Frequency Scaling
> +
> +maintainers:
> + - MediaTek MMDVFS Team <linux-mediatek@lists.infradead.org>
> +
> +allOf:
> + - $ref: mediatek,mmdvfs.yaml#
What?
> +
> +select:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - mediatek,mt8196-mmdvfs
> + required:
> + - compatible
What?
> +
> +properties:
> + compatible:
> + enum:
> + - mediatek,mt8196-mmdvfs
> +
> + mediatek,hwccf:
clock control is via clocks, no?
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Phandle to the MT8196 multimedia hardware clock control fabric syscon
> + used for AP-side hardware votes.
> +
> + mediatek,mux-opp-tables:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
NAK, you are messing with us...
> + minItems: 7
> + maxItems: 7
> + description: |
> + OPP tables for the seven MT8196 MMDVFS muxes, in this order:
> + display, MDP, SMI, VENC, VDEC, IMG, CAM. MDP and MML share
> + the MDP mux. Each OPP entry must have opp-hz and opp-level.
> +
> +required:
> + - compatible
> + - mediatek,hwccf
> + - mediatek,mux-opp-tables
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/mediatek,mt8196-mmdvfs.h>
> +
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + vcp: remoteproc@31800000 {
> + compatible = "mediatek,mt8196-vcp";
> + reg = <0 0x31800000 0 0x100000>;
> + };
> +
> + mm_hwv: syscon@31b00000 {
> + compatible = "mediatek,mt8196-mm-hwv", "syscon";
> + reg = <0 0x31b00000 0 0x6000>;
> + };
> +
What are all these nodes? Drop.
> + mmdvfs_opp: opp-table {
> + compatible = "operating-points-v2";
> + opp-0 {
> + opp-hz = /bits/ 64 <100000000>;
> + opp-level = <0>;
> + };
> + };
> +
> + mmdvfs: mmdvfs-mux {
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
If you cannot find a name matching your device, please check in kernel
sources for similar cases or you can grow the spec (via pull request to
DT spec repo).
Honestly, not a separate device. You just added it for Linux drivers.
NAK for entire binding.
> + compatible = "mediatek,mt8196-mmdvfs";
> + mediatek,vcp = <&vcp>;
> + mediatek,hwccf = <&mm_hwv>;
> + mediatek,mux-opp-tables = <&mmdvfs_opp>, <&mmdvfs_opp>,
> + <&mmdvfs_opp>, <&mmdvfs_opp>,
> + <&mmdvfs_opp>, <&mmdvfs_opp>,
> + <&mmdvfs_opp>;
> + #clock-cells = <1>;
> + };
> + };
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding
2026-11-25 6:00 ` [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding Echo Zhang
2026-11-25 8:32 ` Roman Vivchar
2026-11-25 10:58 ` Krzysztof Kozlowski
@ 2026-11-25 11:58 ` Krzysztof Kozlowski
2 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-25 11:58 UTC (permalink / raw)
To: Echo Zhang
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, MMDVFS Team, kyrie.wu,
ming-fan.chen, devicetree, linux-kernel, linux-arm-kernel,
linux-clk, llvm, Krzysztof Kozlowski
On 2026-11-25 14:00 +0800, Echo Zhang wrote:
> Describe the MMDVFS clock provider and its connection to VCP firmware
> in a common binding. Document the optional MMUP shared memory and IPI
> settings used by the firmware backend.
>
> Add an MT8196 binding for the HWCCF syscon and seven mux OPP tables so
> the driver can map clock rate requests to hardware votes.
>
> Signed-off-by: Echo Zhang <echo.zhang@mediatek.com>
> ---
> .../soc/mediatek/mediatek,mmdvfs.yaml | 60 +++++++++++++
> .../soc/mediatek/mediatek,mt8196-mmdvfs.yaml | 87 +++++++++++++++++++
.... and this has build check failures :/
Best regards,
Krzysztof
--
Krzysztof Kozlowski <krzk@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-26 9:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-26 9:13 [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding Echo Zhang (张玉)
-- strict thread matches above, loose matches on Subject: below --
2026-11-25 6:00 [PATCH 0/7] soc: mediatek: add MMDVFS support for MT8196 Echo Zhang
2026-11-25 6:00 ` [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding Echo Zhang
2026-11-25 8:32 ` Roman Vivchar
2026-11-25 10:58 ` Krzysztof Kozlowski
2026-11-25 11:58 ` Krzysztof Kozlowski
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®