From: sashiko-bot@kernel.org
To: "Christian Marangi" <ansuelsmth@gmail.com>, devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC
Date: Mon, 26 Oct 2026 10:49:07 +0000 [thread overview]
Message-ID: <sashiko-outbox-185015@kernel.org> (raw)
In-Reply-To: <20261026102138.36786-1-ansuelsmth@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: mmc: mtk-sd: missing clocks constraints for airoha,an7581-mmc
--
commit c2ecb5aa718b8cb2478402c7db169bd4c820f420
Author: Christian Marangi <ansuelsmth@gmail.com>
dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC
This commit adds the airoha,an7581-mmc compatible string to the MediaTek
MMC controller binding and updates the register count constraint for two
register regions.
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> index a4d032224dcee..49ad2a8a390d6 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> @@ -14,6 +14,7 @@ properties:
> compatible:
> oneOf:
> - enum:
> + - airoha,an7581-mmc
> - mediatek,mt2701-mmc
> - mediatek,mt2712-mmc
> - mediatek,mt6779-mmc
> @@ -238,6 +239,7 @@ allOf:
> compatible:
> contains:
> enum:
> + - airoha,an7581-mmc
> - mediatek,mt7986-mmc
> - mediatek,mt7988-mmc
> - mediatek,mt8183-mmc
[Severity: Medium]
Should airoha,an7581-mmc also be added to a clocks and clock-names
conditional block under allOf in
Documentation/devicetree/bindings/mmc/mtk-sd.yaml?
The commit message notes that this compatible is added to permit defining
only 2 clocks, and in drivers/mmc/host/mtk-sd.c, msdc_drv_probe() ->
msdc_of_clock_parse() requires the source and hclk clocks.
However, the top-level properties:clocks and properties:clock-names
definitions in Documentation/devicetree/bindings/mmc/mtk-sd.yaml only bound
the array length:
clocks:
description:
Should contain phandle for the clock feeding the MMC controller.
minItems: 2
maxItems: 7
clock-names:
minItems: 2
maxItems: 7
While per-SoC clock counts and clock-names constants are constrained in
allOf conditional blocks such as:
- if:
properties:
compatible:
enum:
- mediatek,mt2701-mmc
...
then:
properties:
clocks:
minItems: 2
items:
- description: source clock
- description: HCLK which used for host
- description: independent source clock gate
clock-names:
minItems: 2
items:
- const: source
- const: hclk
- const: source_cg
Without a corresponding allOf constraint for airoha,an7581-mmc, device tree
nodes using this compatible can specify between 2 and 7 clocks with
arbitrary clock-names and pass dt_binding_check, only to fail at runtime in
msdc_of_clock_parse().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261026102138.36786-1-ansuelsmth@gmail.com?part=1
prev parent reply other threads:[~2026-10-26 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 10:21 [PATCH 1/2] dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC Christian Marangi
2026-10-26 10:21 ` [PATCH 2/2] mmc: mtk-sd: Add Airoha AN7581 MMC compatible Christian Marangi
2026-10-26 10:49 ` sashiko-bot [this message]
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-185015@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@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