* [PATCH 1/2] dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC
@ 2026-10-26 10:21 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 ` [PATCH 1/2] dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC sashiko-bot
0 siblings, 2 replies; 3+ messages in thread
From: Christian Marangi @ 2026-10-26 10:21 UTC (permalink / raw)
To: Chaotian Jing, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Wenbin Mei, linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Cc: Christian Marangi
Add dedicated compatible for Airoha AN7581 SoC integrated MMC controller.
The MMC controller is based on the MT7988 with the difference that it does
have a single clock controlling it.
Add the dedicated compatible to describe the 2 register requirement and
permit to define only 2 clock (the main one and a fixed clock for HS)
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
index a4d032224dce..49ad2a8a390d 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
--
2.55.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] mmc: mtk-sd: Add Airoha AN7581 MMC compatible
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 ` Christian Marangi
2026-10-26 10:49 ` [PATCH 1/2] dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC sashiko-bot
1 sibling, 0 replies; 3+ messages in thread
From: Christian Marangi @ 2026-10-26 10:21 UTC (permalink / raw)
To: Chaotian Jing, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Wenbin Mei, linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Cc: Christian Marangi
Add dedicated compatible for Airoha AN7581 SoC that implement a dedicated
MMC controller based on MT7988 with the difference of having a single clock
controlling it.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/mmc/host/mtk-sd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 5b160fdad3f0..736cff2783e2 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -713,6 +713,7 @@ static const struct mtk_mmc_compatible mt8196_compat = {
};
static const struct of_device_id msdc_of_ids[] = {
+ { .compatible = "airoha,an7581-mmc", .data = &mt7986_compat},
{ .compatible = "mediatek,mt2701-mmc", .data = &mt2701_compat},
{ .compatible = "mediatek,mt2712-mmc", .data = &mt2712_compat},
{ .compatible = "mediatek,mt6779-mmc", .data = &mt6779_compat},
--
2.55.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/2] dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC
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
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-10-26 10:49 UTC (permalink / raw)
To: Christian Marangi, devicetree; +Cc: robh, conor+dt
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-26 10:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/2] dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox