devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] dt-bindings: lcdif: Fix constraints for imx8mp
@ 2022-12-08  9:45 Alexander Stein
  2022-12-08  9:53 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Stein @ 2022-12-08  9:45 UTC (permalink / raw)
  To: Marek Vasut, David Airlie, Daniel Vetter, Rob Herring,
	Krzysztof Kozlowski
  Cc: Alexander Stein, dri-devel, devicetree

i.MX8MP uses 3 clocks, so soften the restrictions for clocks & clock-names.
This SoC requires a power-domain for this peripheral to use. Add it as
a required property.

Fixes: f5419cb0743f ("dt-bindings: lcdif: Add compatible for i.MX8MP")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
Changes in v2:
* Squash both patches into one
* Split the conditionals from fsl,imx6sx-lcdif
* Mark power-domains as required for fsl,imx8mp-lcdif
* Ignored the A-b & R-b due to reorganization

I'm not sure if this is the best way to add the constraints. I noticed that
imx6sx also uses a power-domain, but imx6ul which is compatible to imx6sx does
not, so they can't be merged.

I also have noticed that dtbs_check doesn't raise a warning when
power-domains is actually missing.

 .../bindings/display/fsl,lcdif.yaml           | 31 ++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
index 876015a44a1e6..24014651f7dc8 100644
--- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
+++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
@@ -52,6 +52,9 @@ properties:
   interrupts:
     maxItems: 1
 
+  power-domains:
+    maxItems: 1
+
   port:
     $ref: /schemas/graph.yaml#/properties/port
     description: The LCDIF output port
@@ -81,7 +84,33 @@ allOf:
           maxItems: 3
       required:
         - clock-names
-    else:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx8mp-lcdif
+    then:
+      properties:
+        clocks:
+          minItems: 3
+          maxItems: 3
+        clock-names:
+          minItems: 3
+          maxItems: 3
+        power-domains:
+          minItems: 1
+      required:
+        - clock-names
+        - power-domains
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - fsl,imx6sx-lcdif
+                - fsl,imx8mp-lcdif
+    then:
       properties:
         clocks:
           maxItems: 1
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 1/1] dt-bindings: lcdif: Fix constraints for imx8mp
  2022-12-08  9:45 [PATCH v2 1/1] dt-bindings: lcdif: Fix constraints for imx8mp Alexander Stein
@ 2022-12-08  9:53 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-08  9:53 UTC (permalink / raw)
  To: Alexander Stein, Marek Vasut, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski
  Cc: dri-devel, devicetree

On 08/12/2022 10:45, Alexander Stein wrote:
> i.MX8MP uses 3 clocks, so soften the restrictions for clocks & clock-names.
> This SoC requires a power-domain for this peripheral to use. Add it as
> a required property.
> 
> Fixes: f5419cb0743f ("dt-bindings: lcdif: Add compatible for i.MX8MP")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> Changes in v2:
> * Squash both patches into one
> * Split the conditionals from fsl,imx6sx-lcdif
> * Mark power-domains as required for fsl,imx8mp-lcdif
> * Ignored the A-b & R-b due to reorganization
> 
> I'm not sure if this is the best way to add the constraints. I noticed that
> imx6sx also uses a power-domain, but imx6ul which is compatible to imx6sx does
> not, so they can't be merged.
> 
> I also have noticed that dtbs_check doesn't raise a warning when
> power-domains is actually missing.
> 
>  .../bindings/display/fsl,lcdif.yaml           | 31 ++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
> index 876015a44a1e6..24014651f7dc8 100644
> --- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
> +++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
> @@ -52,6 +52,9 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> +  power-domains:
> +    maxItems: 1
> +
>    port:
>      $ref: /schemas/graph.yaml#/properties/port
>      description: The LCDIF output port
> @@ -81,7 +84,33 @@ allOf:
>            maxItems: 3
>        required:
>          - clock-names
> -    else:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: fsl,imx8mp-lcdif
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 3
> +          maxItems: 3
> +        clock-names:
> +          minItems: 3
> +          maxItems: 3
> +        power-domains:
> +          minItems: 1

Drop power domains here.

> +      required:
> +        - clock-names
> +        - power-domains
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              enum:
> +                - fsl,imx6sx-lcdif
> +                - fsl,imx8mp-lcdif
> +    then:
>        properties:
>          clocks:
>            maxItems: 1

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-08  9:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-08  9:45 [PATCH v2 1/1] dt-bindings: lcdif: Fix constraints for imx8mp Alexander Stein
2022-12-08  9:53 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).