diff mbox series

[v2,5/8] dt-bindings: ufs: mediatek,ufs: Document MT8192 compatible with MT8183

Message ID 20240411114300.169055-6-angelogioacchino.delregno@collabora.com (mailing list archive)
State New, archived
Headers show
Series MediaTek UFS fixes and cleanups - Part 1 | expand

Commit Message

AngeloGioacchino Del Regno April 11, 2024, 11:42 a.m. UTC
The MT8192 UFS controller is compatible with the MT8183 one:
document this by allowing to assign both compatible strings
"mediatek,mt8192-ufshci", "mediatek,mt8183-ufshci" to the UFSHCI node.

In preparation for adding MT8195 to the mix, the MT8192 compatible
was added as enum instead of const.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../devicetree/bindings/ufs/mediatek,ufs.yaml        | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Conor Dooley April 11, 2024, 3:07 p.m. UTC | #1
On Thu, Apr 11, 2024 at 01:42:57PM +0200, AngeloGioacchino Del Regno wrote:
> The MT8192 UFS controller is compatible with the MT8183 one:
> document this by allowing to assign both compatible strings
> "mediatek,mt8192-ufshci", "mediatek,mt8183-ufshci" to the UFSHCI node.
> 
> In preparation for adding MT8195 to the mix, the MT8192 compatible
> was added as enum instead of const.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
>  .../devicetree/bindings/ufs/mediatek,ufs.yaml        | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
> index 32fd535a514a..adcd13023866 100644
> --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
> +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
> @@ -14,9 +14,15 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - mediatek,mt8183-ufshci
> -      - mediatek,mt8192-ufshci
> +    oneOf:
> +      - items:
> +          - enum:
> +              - mediatek,mt8183-ufshci
> +              - mediatek,mt8192-ufshci
> +      - items:
> +          - enum:
> +              - mediatek,mt8192-ufshci
> +          - const: mediatek,mt8183-ufshci

It's a bit more distruptive since you'll have to modify a dts, but why
permit both of these ways of describing the mt8192? Could we drop it
from the original enum and no longer allow it in isolation? There
shouldn't be any compatibility concerns with doing so.
AngeloGioacchino Del Regno April 11, 2024, 3:11 p.m. UTC | #2
Il 11/04/24 17:07, Conor Dooley ha scritto:
> On Thu, Apr 11, 2024 at 01:42:57PM +0200, AngeloGioacchino Del Regno wrote:
>> The MT8192 UFS controller is compatible with the MT8183 one:
>> document this by allowing to assign both compatible strings
>> "mediatek,mt8192-ufshci", "mediatek,mt8183-ufshci" to the UFSHCI node.
>>
>> In preparation for adding MT8195 to the mix, the MT8192 compatible
>> was added as enum instead of const.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> ---
>>   .../devicetree/bindings/ufs/mediatek,ufs.yaml        | 12 +++++++++---
>>   1 file changed, 9 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
>> index 32fd535a514a..adcd13023866 100644
>> --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
>> +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
>> @@ -14,9 +14,15 @@ allOf:
>>   
>>   properties:
>>     compatible:
>> -    enum:
>> -      - mediatek,mt8183-ufshci
>> -      - mediatek,mt8192-ufshci
>> +    oneOf:
>> +      - items:
>> +          - enum:
>> +              - mediatek,mt8183-ufshci
>> +              - mediatek,mt8192-ufshci
>> +      - items:
>> +          - enum:
>> +              - mediatek,mt8192-ufshci
>> +          - const: mediatek,mt8183-ufshci
> 
> It's a bit more distruptive since you'll have to modify a dts, but why
> permit both of these ways of describing the mt8192? Could we drop it
> from the original enum and no longer allow it in isolation? There
> shouldn't be any compatibility concerns with doing so.

Yes, will remove that in v3 :-)

Thanks!
Angelo
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
index 32fd535a514a..adcd13023866 100644
--- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
@@ -14,9 +14,15 @@  allOf:
 
 properties:
   compatible:
-    enum:
-      - mediatek,mt8183-ufshci
-      - mediatek,mt8192-ufshci
+    oneOf:
+      - items:
+          - enum:
+              - mediatek,mt8183-ufshci
+              - mediatek,mt8192-ufshci
+      - items:
+          - enum:
+              - mediatek,mt8192-ufshci
+          - const: mediatek,mt8183-ufshci
 
   clocks:
     maxItems: 1