diff mbox series

[v3] dt-bindings: display: st, stm32-ltdc: Document stm32mp25 compatible

Message ID 20240827140455.115182-1-yannick.fertre@foss.st.com (mailing list archive)
State New, archived
Headers show
Series [v3] dt-bindings: display: st, stm32-ltdc: Document stm32mp25 compatible | expand

Commit Message

Yannick Fertre Aug. 27, 2024, 2:04 p.m. UTC
Add "st,stm32mp25-ltdc" compatible for SOC MP25. This new SOC introduce
new clocks (bus, ref & lvds). Bus clock was separated from lcd clock.
New sources are possible for lcd clock (lvds / ref).

Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
---

Changes in v3: Add max/min Items fields.
'make dt_binding_check' command fails on previous patch, rework fiedls mas/min items
of properties clocks & clock-names.

Changes in v2: Rework clock property.

 .../bindings/display/st,stm32-ltdc.yaml       | 28 +++++++++++++++----
 1 file changed, 23 insertions(+), 5 deletions(-)

Comments

Krzysztof Kozlowski Aug. 27, 2024, 2:49 p.m. UTC | #1
On 27/08/2024 16:04, Yannick Fertre wrote:
> Add "st,stm32mp25-ltdc" compatible for SOC MP25. This new SOC introduce
> new clocks (bus, ref & lvds). Bus clock was separated from lcd clock.
> New sources are possible for lcd clock (lvds / ref).
> 
> Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
> ---
> 
> Changes in v3: Add max/min Items fields.
> 'make dt_binding_check' command fails on previous patch, rework fiedls mas/min items
> of properties clocks & clock-names.
> 
> Changes in v2: Rework clock property.
> 
>  .../bindings/display/st,stm32-ltdc.yaml       | 28 +++++++++++++++----
>  1 file changed, 23 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
> index d6ea4d62a2cf..940127820de3 100644
> --- a/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
> +++ b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
> @@ -12,7 +12,9 @@ maintainers:
>  
>  properties:
>    compatible:
> -    const: st,stm32-ltdc
> +    enum:
> +      - st,stm32-ltdc
> +      - st,stm32mp25-ltdc
>  
>    reg:
>      maxItems: 1
> @@ -24,12 +26,12 @@ properties:
>      minItems: 1
>  
>    clocks:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 4
>  
>    clock-names:
> -    items:
> -      - const: lcd
> -
> +    minItems: 1
> +    maxItems: 4

Keep the blank line.

>    resets:
>      maxItems: 1
>  
> @@ -51,6 +53,22 @@ required:
>    - resets
>    - port
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - st,stm32mp25-ltdc
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 2

Instead, describe the items.

Missing clock-names

> +    else:
> +      properties:
> +        clocks:
> +          minItems: 1

minItems? Why are you changing existing device? Nothing in commit msg
explains this.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
index d6ea4d62a2cf..940127820de3 100644
--- a/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
+++ b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
@@ -12,7 +12,9 @@  maintainers:
 
 properties:
   compatible:
-    const: st,stm32-ltdc
+    enum:
+      - st,stm32-ltdc
+      - st,stm32mp25-ltdc
 
   reg:
     maxItems: 1
@@ -24,12 +26,12 @@  properties:
     minItems: 1
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    maxItems: 4
 
   clock-names:
-    items:
-      - const: lcd
-
+    minItems: 1
+    maxItems: 4
   resets:
     maxItems: 1
 
@@ -51,6 +53,22 @@  required:
   - resets
   - port
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - st,stm32mp25-ltdc
+    then:
+      properties:
+        clocks:
+          minItems: 2
+    else:
+      properties:
+        clocks:
+          minItems: 1
+
 additionalProperties: false
 
 examples: