diff mbox series

[RFC,v4,4/4] dt-binding: mmc: histb-dw-mshc: Add Hi3798MV200 compatible string

Message ID 20230415-mmc-hi3798mv200-v4-4-44096e187f53@outlook.com (mailing list archive)
State New, archived
Headers show
Series mmc: add support for the dw-mmc controller on Hi3798MV200 | expand

Commit Message

Yang Xiwen via B4 Relay April 16, 2023, 9:19 a.m. UTC
From: Yang Xiwen <forbidden405@outlook.com>

Add Hi3798MV200 compatible string and an extra clock for it.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
---
 .../bindings/mmc/hisilicon,histb-dw-mshc.yaml      | 26 +++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski April 16, 2023, 11:16 a.m. UTC | #1
On 16/04/2023 11:19, Yang Xiwen via B4 Relay wrote:
> From: Yang Xiwen <forbidden405@outlook.com>
> 
> Add Hi3798MV200 compatible string and an extra clock for it.
> 
> Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
> ---
>  .../bindings/mmc/hisilicon,histb-dw-mshc.yaml      | 26 +++++++++++++++++++++-
>  1 file changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml
> index 301b6ad39c5af..2f8335fd2c965 100644
> --- a/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml
> @@ -19,6 +19,7 @@ properties:
>    compatible:
>      enum:
>        - hisilicon,hi3798cv200-dw-mshc
> +      - hisilicon,hi3798mv200-dw-mshc
>  
>    reg:
>      maxItems: 1
> @@ -27,14 +28,16 @@ properties:
>      maxItems: 1
>  
>    clocks:
> -    maxItems: 4

You miss now minItems. Are you sure you tested your bindings? This
should fail.

Anyway, wait with sending new versions of patches to give other people
chance to review. It's already second patchset today.

Best regards,
Krzysztof
Yang Xiwen April 16, 2023, 11:23 a.m. UTC | #2
On 4/16/2023 7:16 PM, Krzysztof Kozlowski wrote:
> On 16/04/2023 11:19, Yang Xiwen via B4 Relay wrote:
>> From: Yang Xiwen <forbidden405@outlook.com>
>>
>> Add Hi3798MV200 compatible string and an extra clock for it.
>>
>> Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
>> ---
>>  .../bindings/mmc/hisilicon,histb-dw-mshc.yaml      | 26 +++++++++++++++++++++-
>>  1 file changed, 25 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml
>> index 301b6ad39c5af..2f8335fd2c965 100644
>> --- a/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml
>> +++ b/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml
>> @@ -19,6 +19,7 @@ properties:
>>    compatible:
>>      enum:
>>        - hisilicon,hi3798cv200-dw-mshc
>> +      - hisilicon,hi3798mv200-dw-mshc
>>  
>>    reg:
>>      maxItems: 1
>> @@ -27,14 +28,16 @@ properties:
>>      maxItems: 1
>>  
>>    clocks:
>> -    maxItems: 4
> 
> You miss now minItems. Are you sure you tested your bindings? This
> should fail.
> 
> Anyway, wait with sending new versions of patches to give other people
> chance to review. It's already second patchset today.
> 
> Best regards,
> Krzysztof
> 
Sorry for that. I'll fix that in v5 and send the new patchset a few days
later, waiting for others to review the driver.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml
index 301b6ad39c5af..2f8335fd2c965 100644
--- a/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml
+++ b/Documentation/devicetree/bindings/mmc/hisilicon,histb-dw-mshc.yaml
@@ -19,6 +19,7 @@  properties:
   compatible:
     enum:
       - hisilicon,hi3798cv200-dw-mshc
+      - hisilicon,hi3798mv200-dw-mshc
 
   reg:
     maxItems: 1
@@ -27,14 +28,16 @@  properties:
     maxItems: 1
 
   clocks:
-    maxItems: 4
+    maxItems: 5
 
   clock-names:
+    minItems: 4
     items:
       - const: ciu
       - const: biu
       - const: ciu-sample
       - const: ciu-drive
+      - const: sap-dll-mode
 
 required:
   - compatible
@@ -45,6 +48,27 @@  required:
 
 allOf:
   - $ref: synopsys-dw-mshc-common.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: hisilicon,hi3798mv200-dw-mshc
+
+    then:
+      properties:
+        clocks:
+          minItems: 5
+
+        clock-names:
+          minItems: 5
+
+    else:
+      properties:
+        clocks:
+          maxItems: 4
+
+        clock-names:
+          maxItems: 4
 
 unevaluatedProperties: false