Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Echo Zhang" <echo.zhang@mediatek.com>,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/7] dt-bindings: clock: mediatek: add MT8196 MMDVFS clock IDs
Date: Wed, 25 Nov 2026 06:13:08 +0000	[thread overview]
Message-ID: <sashiko-outbox-232652@kernel.org> (raw)
In-Reply-To: <20261125060037.649659-2-echo.zhang@mediatek.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] dt-bindings: clock: mediatek: software DVFS voters and dummy
  IDs in binding
- [Low] dt-bindings: clock: mediatek: clock count macro MMDVFS_USER_NUM
  in binding
--

commit 8ccadc25b913bfdd48ee17134dbe19aa8303b626
Author: Echo Zhang <echo.zhang@mediatek.com>

dt-bindings: clock: mediatek: add MT8196 MMDVFS clock IDs

This commit adds Devicetree clock binding IDs for the MediaTek MT8196
MMDVFS clock provider.

> diff --git a/include/dt-bindings/clock/mediatek,mt8196-mmdvfs.h b/include/dt-bindings/clock/mediatek,mt8196-mmdvfs.h
> new file mode 100644
> index 0000000000000..428d8a35abdba
> --- /dev/null
> +++ b/include/dt-bindings/clock/mediatek,mt8196-mmdvfs.h
> @@ -0,0 +1,74 @@

[ ... ]

> +/* Core user clocks used by multimedia hardware drivers */
> +#define MMDVFS_USER_DISP	0	/* user-disp */
> +#define MMDVFS_USER_MDP		1	/* user-mdp */
> +#define MMDVFS_USER_MML		2	/* user-mml */
> +#define MMDVFS_USER_SMI		3	/* user-smi */
> +#define MMDVFS_USER_JPEGDEC	4	/* user-jpegdec */
> +#define MMDVFS_USER_JPEGENC	5	/* user-jpegenc */
> +#define MMDVFS_USER_VENC	6	/* user-venc */
> +#define MMDVFS_USER_VFMT	7	/* user-vfmt */
> +#define MMDVFS_USER_IMG		8	/* user-img */
> +#define MMDVFS_USER_CAM		9	/* user-cam */
> +#define MMDVFS_USER_VCORE	10	/* user-vcore */
> +#define MMDVFS_USER_VMM		11	/* user-vmm */
> +#define MMDVFS_USER_VDISP	12	/* user-vdisp */
> +#define MMDVFS_USER_VDEC	13	/* user-vdec */
> +#define DUMMY_USER_DIS		14	/* dummy-dis */
> +#define DUMMY_USER_MDP		15	/* dummy-mdp */
> +#define DUMMY_USER_MML		16	/* dummy-mml */
> +#define DUMMY_USER_SMI		17	/* dummy-smi */
> +#define DUMMY_USER_VEN		18	/* dummy-ven */
> +#define DUMMY_USER_VDE		19	/* dummy-vde */
> +#define DUMMY_USER_IMG		20	/* dummy-img */
> +#define DUMMY_USER_CAM		21	/* dummy-cam */
> +#define MMDVFS_USER_CAM_SMI	22	/* user-cam-smi */
> +#define MMDVFS_USER_VCP_SMI	23	/* user-vcp-smi */
> +
> +/* AP voter clocks (24-33) - System level control */
> +#define MMDVFS_AP_CAM		24
> +#define MMDVFS_AP_CAMTM		25
> +#define MMDVFS_AP_VDE		26
> +#define MMDVFS_AP_IMG		27
> +#define MMDVFS_AP_IPE		28
> +#define MMDVFS_AP_DIS		29
> +#define MMDVFS_AP_MML		30
> +#define MMDVFS_AP_SMI		31
> +#define MMDVFS_AP_VEN		32
> +#define MMDVFS_AP_MDP		33
> +
> +/* VCP voter clocks (34-43) - VCP firmware control */
> +#define MMDVFS_VCP_CAM		34
> +#define MMDVFS_VCP_CAMTM	35
> +#define MMDVFS_VCP_VDE		36
> +#define MMDVFS_VCP_IMG		37
> +#define MMDVFS_VCP_IPE		38
> +#define MMDVFS_VCP_DIS		39
> +#define MMDVFS_VCP_MML		40
> +#define MMDVFS_VCP_SMI		41
> +#define MMDVFS_VCP_VEN		42
> +#define MMDVFS_VCP_MDP		43

[Severity: Medium]
Should virtual DVFS voting channels, voltage rail voters
(MMDVFS_USER_VCORE, MMDVFS_USER_VMM, MMDVFS_USER_VDISP), unprefixed dummy
placeholders (DUMMY_USER_DIS through DUMMY_USER_CAM), and duplicate AP/VCP
software voter slots be exposed as Devicetree clock binding IDs?

Devicetree bindings describe hardware rather than software voting
channels.  The actual MT8196 multimedia hardware clocks (such as
CLK_TOP2_IMG1, CLK_TOP2_CAM, CLK_TOP2_VDEC, CLK_TOP2_VENC, CLK_TOP2_DISP,
and CLK_TOP2_MDP) are already defined in
include/dt-bindings/clock/mediatek,mt8196-clock.h, whereas DVFS operating
points, voltage rails, and bandwidth requests are normally described with
OPP, regulator, and interconnect bindings.

> +
> +#define MMDVFS_USER_NUM		44
> +#endif /* _DT_BINDINGS_MMDVFS_CLK_MT8196_H */

[Severity: Low]
Should MMDVFS_USER_NUM be dropped from the Devicetree binding header?
Count macros are not clock IDs, and defining the total count in
include/dt-bindings/ means adding any new ID later changes the macro value
and breaks the binding ABI.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125060037.649659-1-echo.zhang@mediatek.com?part=1

  reply	other threads:[~2026-11-25  6:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  6:00 [PATCH 0/7] soc: mediatek: add MMDVFS support for MT8196 Echo Zhang
2026-11-25  6:00 ` [PATCH 1/7] dt-bindings: clock: mediatek: add MT8196 MMDVFS clock IDs Echo Zhang
2026-11-25  6:13   ` sashiko-bot [this message]
2026-11-25  6:00 ` [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding Echo Zhang
2026-11-25  6:12   ` sashiko-bot
2026-11-25  6:00 ` [PATCH 3/7] soc: mediatek: add MMDVFS core driver Echo Zhang
2026-11-25  6:18   ` sashiko-bot
2026-11-25  6:00 ` [PATCH 4/7] soc: mediatek: mmdvfs: add VCP backend Echo Zhang
2026-11-25  6:21   ` sashiko-bot
2026-11-25  6:00 ` [PATCH 5/7] soc: mediatek: mmdvfs: add MT8196 support Echo Zhang
2026-11-25  6:15   ` sashiko-bot
2026-11-25  6:00 ` [PATCH 6/7] soc: mediatek: mmdvfs: add read-only status debug Echo Zhang
2026-11-25  6:00 ` [PATCH 7/7] MAINTAINERS: add MediaTek MMDVFS entry Echo Zhang

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=sashiko-outbox-232652@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=echo.zhang@mediatek.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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