Skip to contentSkip to conversation

dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC

PATCH In review Christian Marangi 3 participants 8 messages Oct 27 – Oct 30

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC

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)

---
Changes v2:
- Also add compatible to restrict clock-names for source and hclk

 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +3 -0
index a4d032224dce..704d59360bcb 100644
@@ -14,6 +14,7 @@ properties:
   compatible:
     oneOf:
       - enum:
+          - airoha,an7581-mmc
           - mediatek,mt2701-mmc
           - mediatek,mt2712-mmc
           - mediatek,mt6779-mmc
@@ -182,6 +183,7 @@ allOf:
       properties:
         compatible:
           enum:
+            - airoha,an7581-mmc
             - mediatek,mt2701-mmc
             - mediatek,mt6779-mmc
             - mediatek,mt6795-mmc
@@ -238,6 +240,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - airoha,an7581-mmc
               - mediatek,mt7986-mmc
               - mediatek,mt7988-mmc
               - mediatek,mt8183-mmc
Signature · 1 line
2.55.0
#1 lore raw

PATCH v2 2/2 mmc: mtk-sd: Add Airoha AN7581 MMC compatible

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.

---
 drivers/mmc/host/mtk-sd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/mtk-sd.c +1 -0
index 5b160fdad3f0..736cff2783e2 100644
@@ -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},
Signature · 1 line
2.55.0
#3 lore raw
In reply to Christian Marangi
Quoted 7 lines · 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)

Quoted 7 lines

---
Changes v2:
- Also add compatible to restrict clock-names for source and hclk

 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 +++
 1 file changed, 3 insertions(+)

Your driver part suggests it's fully compatible with other variant. Why not expressing it with fallback?

Best regards,
Krzysztof

#4 lore raw
Quoted 16 lines · Krzysztof Kozlowski
Quoted 7 lines · 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)

Quoted 7 lines

---
Changes v2:
- Also add compatible to restrict clock-names for source and hclk

 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 +++
 1 file changed, 3 insertions(+)
Quoted 3 lines

Your driver part suggests it's fully compatible with other variant. Why not expressing it with fallback?

You mean something like

   compatible = "airoha,an7581-mmc", "mediatek,mt7988-mmc";

? (my concern is if this would be problematic with the current if conditions in the schema)

The driver is very liberal for the clock configuration as it does use lots of _optional... But it's not possible to reuse one of the current compatible as they all require additional property that Airoha SoC doesn't have (either additional clocks or single register)

Signature · 1 line
	Ansuel
#5 lore raw
Quoted 21 lines · Christian Marangi
Quoted 16 lines · Krzysztof Kozlowski
Quoted 7 lines · 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)

Quoted 7 lines

---
Changes v2:
- Also add compatible to restrict clock-names for source and hclk

 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 +++
 1 file changed, 3 insertions(+)
Quoted 3 lines

Your driver part suggests it's fully compatible with other variant. Why not expressing it with fallback?

Quoted 6 lines

You mean something like

   compatible = "airoha,an7581-mmc", "mediatek,mt7988-mmc";

? (my concern is if this would be problematic with the current if conditions in the schema)

I see, the first "if:then:" would be tricky to convert to "contains" for the compatible, without bringing a few more conditional blocks. I guess it's fine here.

Best regards,
Krzysztof

Reviewed-by on v2 1/2
#6 lore raw
In reply to Christian Marangi
Quoted 7 lines · 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)

Quoted 7 lines

---
Changes v2:
- Also add compatible to restrict clock-names for source and hclk

 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 +++
 1 file changed, 3 insertions(+)

Best regards,
Krzysztof

#7 lore raw
In reply to Christian Marangi
Quoted 9 lines · 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)

Applied for next, thanks!

Kind regards
Uffe

Quoted 37 lines

---
Changes v2:
- Also add compatible to restrict clock-names for source and hclk

 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +3 -1
index a4d032224dce..704d59360bcb 100644
@@ -14,6 +14,7 @@ properties:
   compatible:
     oneOf:
       - enum:
+          - airoha,an7581-mmc
           - mediatek,mt2701-mmc
           - mediatek,mt2712-mmc
           - mediatek,mt6779-mmc
@@ -182,6 +183,7 @@ allOf:
       properties:
         compatible:
           enum:
+            - airoha,an7581-mmc
             - mediatek,mt2701-mmc
             - mediatek,mt6779-mmc
             - mediatek,mt6795-mmc
@@ -238,6 +240,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - airoha,an7581-mmc
               - mediatek,mt7986-mmc
               - mediatek,mt7988-mmc
               - mediatek,mt8183-mmc
--

2.55.0

#2 lore raw

Re: [PATCH v2 2/2] mmc: mtk-sd: Add Airoha AN7581 MMC compatible

In reply to Christian Marangi
Quoted 6 lines · 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.

Applied for next, thanks!

Kind regards
Uffe

Quoted 19 lines
---
 drivers/mmc/host/mtk-sd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/mtk-sd.c +1 -1
index 5b160fdad3f0..736cff2783e2 100644
@@ -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