diff mbox series

[1/2] dt-bindings: ufs: mediatek, ufs: add compatible for MT8195 SoC

Message ID 20220415165939.1861470-1-fparent@baylibre.com (mailing list archive)
State New, archived
Headers show
Series [1/2] dt-bindings: ufs: mediatek, ufs: add compatible for MT8195 SoC | expand

Commit Message

Fabien Parent April 15, 2022, 4:59 p.m. UTC
Add bindings for the MT8195 UFS support.

The MT8195 SoC requires more clocks to be enabled compared to MT8183 and
MT8192. Document the clocks required for MT8195.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 .../devicetree/bindings/ufs/mediatek,ufs.yaml | 27 ++++++++++++++-----
 1 file changed, 21 insertions(+), 6 deletions(-)

Comments

Krzysztof Kozlowski April 18, 2022, 11:49 a.m. UTC | #1
On 15/04/2022 18:59, Fabien Parent wrote:
> Add bindings for the MT8195 UFS support.
> 
> The MT8195 SoC requires more clocks to be enabled compared to MT8183 and
> MT8192. Document the clocks required for MT8195.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  .../devicetree/bindings/ufs/mediatek,ufs.yaml | 27 ++++++++++++++-----
>  1 file changed, 21 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
> index 32fd535a514a..5ed36e95e933 100644
> --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
> +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
> @@ -14,16 +14,31 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - mediatek,mt8183-ufshci
> -      - mediatek,mt8192-ufshci
> +    oneOf:
> +      - enum:
> +          - mediatek,mt8183-ufshci
> +          - mediatek,mt8192-ufshci
> +      - items:
> +          - const: mediatek,mt8195-ufshci
> +          - const: mediatek,mt8183-ufshci

Are you sure that these devices are compatible? Amount of clock
differences suggests that not (or original bindings were not complete).

>  
>    clocks:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 8
>  
>    clock-names:
> -    items:
> -      - const: ufs
> +    oneOf:
> +      - items:
> +          - const: ufs
> +      - items:
> +          - const: ufs
> +          - const: ufs_aes
> +          - const: ufs_tick
> +          - const: unipro_sysclk
> +          - const: unipro_tick
> +          - const: unipro_mp_bclk
> +          - const: ufs_tx_symbol
> +          - const: ufs_mem_sub

Add allOf:if:then: which specifies these clocks per different compatible.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
index 32fd535a514a..5ed36e95e933 100644
--- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
@@ -14,16 +14,31 @@  allOf:
 
 properties:
   compatible:
-    enum:
-      - mediatek,mt8183-ufshci
-      - mediatek,mt8192-ufshci
+    oneOf:
+      - enum:
+          - mediatek,mt8183-ufshci
+          - mediatek,mt8192-ufshci
+      - items:
+          - const: mediatek,mt8195-ufshci
+          - const: mediatek,mt8183-ufshci
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    maxItems: 8
 
   clock-names:
-    items:
-      - const: ufs
+    oneOf:
+      - items:
+          - const: ufs
+      - items:
+          - const: ufs
+          - const: ufs_aes
+          - const: ufs_tick
+          - const: unipro_sysclk
+          - const: unipro_tick
+          - const: unipro_mp_bclk
+          - const: ufs_tx_symbol
+          - const: ufs_mem_sub
 
   phys:
     maxItems: 1