dt-bindings: mmc: mtk-sd: Document support for Airoha AN7581 SoC
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
@@ -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
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
@@ -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
Re: [PATCH v2 2/2] mmc: mtk-sd: Add Airoha AN7581 MMC compatible
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.
Signed-off-by Christian Marangi <[email protected]>
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@@ -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
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
Signed-off-by Christian Marangi <[email protected]>---
Changes v2:
- Also add compatible to restrict clock-names for source and hclkDocumentation/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
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
Signed-off-by Christian Marangi <[email protected]>---
Changes v2:
- Also add compatible to restrict clock-names for source and hclkDocumentation/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
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
Signed-off-by Christian Marangi <[email protected]>---
Changes v2:
- Also add compatible to restrict clock-names for source and hclkDocumentation/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
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
Signed-off-by Christian Marangi <[email protected]>---
Changes v2:
- Also add compatible to restrict clock-names for source and hclkDocumentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 +++ 1 file changed, 3 insertions(+)
Best regards,
Krzysztof
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)
Signed-off-by Christian Marangi <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 37 lines
---
Changes v2:
- Also add compatible to restrict clock-names for source and hclkDocumentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/mmc/mtk-sd.yaml +3
-1@@ -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