[PATCH v6 2/9] dt-bindings: soc: imx-blk-ctrl: add i.MX91 blk-ctrl compatible

Joy Zou posted 9 patches 3 months, 2 weeks ago
There is a newer version of this series
[PATCH v6 2/9] dt-bindings: soc: imx-blk-ctrl: add i.MX91 blk-ctrl compatible
Posted by Joy Zou 3 months, 2 weeks ago
Add new compatible string "fsl,imx91-media-blk-ctrl" for i.MX91,
which has different input clocks compared to i.MX93. Update the
clock-names list and handle it in the if-else branch accordingly.

Keep the same restriction for the existed compatible strings.

Signed-off-by: Joy Zou <joy.zou@nxp.com>
---
Changes for v5:
1. modify the imx93-blk-ctrl binding for imx91 support.
---
 .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 55 +++++++++++++++----
 1 file changed, 43 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
index b3554e7f9e76..db5ee65f8eb8 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
@@ -18,7 +18,9 @@ description:
 properties:
   compatible:
     items:
-      - const: fsl,imx93-media-blk-ctrl
+      - enum:
+          - fsl,imx91-media-blk-ctrl
+          - fsl,imx93-media-blk-ctrl
       - const: syscon
 
   reg:
@@ -31,21 +33,50 @@ properties:
     maxItems: 1
 
   clocks:
+    minItems: 8
     maxItems: 10
 
   clock-names:
-    items:
-      - const: apb
-      - const: axi
-      - const: nic
-      - const: disp
-      - const: cam
-      - const: pxp
-      - const: lcdif
-      - const: isi
-      - const: csi
-      - const: dsi
+    minItems: 8
+    maxItems: 10
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx93-media-blk-ctrl
+    then:
+      properties:
+        clock-names:
+          items:
+            - const: apb
+            - const: axi
+            - const: nic
+            - const: disp
+            - const: cam
+            - const: pxp
+            - const: lcdif
+            - const: isi
+            - const: csi
+            - const: dsi
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx91-media-blk-ctrl
+    then:
+      properties:
+        clock-names:
+          items:
+            - const: apb
+            - const: axi
+            - const: nic
+            - const: disp
+            - const: cam
+            - const: lcdif
+            - const: isi
+            - const: csi
 required:
   - compatible
   - reg
-- 
2.37.1
Re: [PATCH v6 2/9] dt-bindings: soc: imx-blk-ctrl: add i.MX91 blk-ctrl compatible
Posted by Krzysztof Kozlowski 3 months, 2 weeks ago
On Mon, Jun 23, 2025 at 05:57:25PM +0800, Joy Zou wrote:
> Add new compatible string "fsl,imx91-media-blk-ctrl" for i.MX91,
> which has different input clocks compared to i.MX93. Update the
> clock-names list and handle it in the if-else branch accordingly.
> 
> Keep the same restriction for the existed compatible strings.
> 
> Signed-off-by: Joy Zou <joy.zou@nxp.com>
> ---
> Changes for v5:
> 1. modify the imx93-blk-ctrl binding for imx91 support.

This is just vague. Anything can be "modify". Why are you doing this?
What are you doing here?

> ---
>  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 55 +++++++++++++++----
>  1 file changed, 43 insertions(+), 12 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> index b3554e7f9e76..db5ee65f8eb8 100644
> --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> @@ -18,7 +18,9 @@ description:
>  properties:
>    compatible:
>      items:
> -      - const: fsl,imx93-media-blk-ctrl
> +      - enum:
> +          - fsl,imx91-media-blk-ctrl
> +          - fsl,imx93-media-blk-ctrl
>        - const: syscon
>  
>    reg:
> @@ -31,21 +33,50 @@ properties:
>      maxItems: 1
>  
>    clocks:
> +    minItems: 8
>      maxItems: 10
>  
>    clock-names:
> -    items:
> -      - const: apb
> -      - const: axi
> -      - const: nic
> -      - const: disp
> -      - const: cam
> -      - const: pxp
> -      - const: lcdif
> -      - const: isi
> -      - const: csi
> -      - const: dsi
> +    minItems: 8
> +    maxItems: 10
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: fsl,imx93-media-blk-ctrl
> +    then:
> +      properties:

Missing constraints for clocks

> +        clock-names:
> +          items:
> +            - const: apb
> +            - const: axi
> +            - const: nic
> +            - const: disp
> +            - const: cam
> +            - const: pxp
> +            - const: lcdif
> +            - const: isi
> +            - const: csi
> +            - const: dsi

Keep list in comon part.

> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: fsl,imx91-media-blk-ctrl

This should be before if: for imx93. 91 < 93

> +    then:
> +      properties:

Why imx91 now has 10 clocks?

v6 and this has basic issues. The quality of NXP patches decreases :/

> +        clock-names:
> +          items:
> +            - const: apb
> +            - const: axi
> +            - const: nic
> +            - const: disp
> +            - const: cam
> +            - const: lcdif
> +            - const: isi
> +            - const: csi

No, look at other bindings how they share clock lists.

Best regards,
Krzysztof
Re: [PATCH v6 2/9] dt-bindings: soc: imx-blk-ctrl: add i.MX91 blk-ctrl compatible
Posted by Frank Li 3 months, 2 weeks ago
On Tue, Jun 24, 2025 at 09:28:43AM +0200, Krzysztof Kozlowski wrote:
> On Mon, Jun 23, 2025 at 05:57:25PM +0800, Joy Zou wrote:
> > Add new compatible string "fsl,imx91-media-blk-ctrl" for i.MX91,
> > which has different input clocks compared to i.MX93. Update the
> > clock-names list and handle it in the if-else branch accordingly.
> >
> > Keep the same restriction for the existed compatible strings.
> >
> > Signed-off-by: Joy Zou <joy.zou@nxp.com>
> > ---
> > Changes for v5:
> > 1. modify the imx93-blk-ctrl binding for imx91 support.
>
> This is just vague. Anything can be "modify". Why are you doing this?
> What are you doing here?
>
> > ---
> >  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 55 +++++++++++++++----
> >  1 file changed, 43 insertions(+), 12 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> > index b3554e7f9e76..db5ee65f8eb8 100644
> > --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> > +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> > @@ -18,7 +18,9 @@ description:
> >  properties:
> >    compatible:
> >      items:
> > -      - const: fsl,imx93-media-blk-ctrl
> > +      - enum:
> > +          - fsl,imx91-media-blk-ctrl
> > +          - fsl,imx93-media-blk-ctrl
> >        - const: syscon
> >
> >    reg:
> > @@ -31,21 +33,50 @@ properties:
> >      maxItems: 1
> >
> >    clocks:
> > +    minItems: 8
> >      maxItems: 10
> >
> >    clock-names:
> > -    items:
> > -      - const: apb
> > -      - const: axi
> > -      - const: nic
> > -      - const: disp
> > -      - const: cam
> > -      - const: pxp
> > -      - const: lcdif
> > -      - const: isi
> > -      - const: csi
> > -      - const: dsi
> > +    minItems: 8
> > +    maxItems: 10
> >
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: fsl,imx93-media-blk-ctrl
> > +    then:
> > +      properties:
>
> Missing constraints for clocks
>
> > +        clock-names:
> > +          items:
> > +            - const: apb
> > +            - const: axi
> > +            - const: nic
> > +            - const: disp
> > +            - const: cam
> > +            - const: pxp
> > +            - const: lcdif
> > +            - const: isi
> > +            - const: csi
> > +            - const: dsi
>
> Keep list in comon part.
>
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: fsl,imx91-media-blk-ctrl
>
> This should be before if: for imx93. 91 < 93
>
> > +    then:
> > +      properties:
>
> Why imx91 now has 10 clocks?
>
> v6 and this has basic issues. The quality of NXP patches decreases :/
>
> > +        clock-names:
> > +          items:
> > +            - const: apb
> > +            - const: axi
> > +            - const: nic
> > +            - const: disp
> > +            - const: cam
> > +            - const: lcdif
> > +            - const: isi
> > +            - const: csi
>
> No, look at other bindings how they share clock lists.

Sorry, this method is what I suggested. becuase there are pxp between cam
and lcdif, can't use simple minItems/maxItems to limit list.

If put two lists at top, clock-names list have to dupliate at both top and
if-else branch.

If there are better solution, please point me which file have good method
to share two totally difference list.

Frank


>
> Best regards,
> Krzysztof
>
Re: [PATCH v6 2/9] dt-bindings: soc: imx-blk-ctrl: add i.MX91 blk-ctrl compatible
Posted by Krzysztof Kozlowski 3 months, 2 weeks ago
On 24/06/2025 16:51, Frank Li wrote:
>>
>> Why imx91 now has 10 clocks?
>>
>> v6 and this has basic issues. The quality of NXP patches decreases :/
>>
>>> +        clock-names:
>>> +          items:
>>> +            - const: apb
>>> +            - const: axi
>>> +            - const: nic
>>> +            - const: disp
>>> +            - const: cam
>>> +            - const: lcdif
>>> +            - const: isi
>>> +            - const: csi
>>
>> No, look at other bindings how they share clock lists.
> 
> Sorry, this method is what I suggested. becuase there are pxp between cam
> and lcdif, can't use simple minItems/maxItems to limit list.

The point is to put new items, so pxp, at the end.

> 
> If put two lists at top, clock-names list have to dupliate at both top and
> if-else branch.
> 
> If there are better solution, please point me which file have good method
> to share two totally difference list.
> 
Best regards,
Krzysztof
Re: [PATCH v6 2/9] dt-bindings: soc: imx-blk-ctrl: add i.MX91 blk-ctrl compatible
Posted by Frank Li 3 months, 2 weeks ago
On Tue, Jun 24, 2025 at 05:39:43PM +0200, Krzysztof Kozlowski wrote:
> On 24/06/2025 16:51, Frank Li wrote:
> >>
> >> Why imx91 now has 10 clocks?
> >>
> >> v6 and this has basic issues. The quality of NXP patches decreases :/
> >>
> >>> +        clock-names:
> >>> +          items:
> >>> +            - const: apb
> >>> +            - const: axi
> >>> +            - const: nic
> >>> +            - const: disp
> >>> +            - const: cam
> >>> +            - const: lcdif
> >>> +            - const: isi
> >>> +            - const: csi
> >>
> >> No, look at other bindings how they share clock lists.
> >
> > Sorry, this method is what I suggested. becuase there are pxp between cam
> > and lcdif, can't use simple minItems/maxItems to limit list.
>
> The point is to put new items, so pxp, at the end.

There are already a list for imx93. If change list order, it will break
ABI. This was rejected at other binding doc review.

Frank

>
> >
> > If put two lists at top, clock-names list have to dupliate at both top and
> > if-else branch.
> >
> > If there are better solution, please point me which file have good method
> > to share two totally difference list.
> >
> Best regards,
> Krzysztof
Re: [PATCH v6 2/9] dt-bindings: soc: imx-blk-ctrl: add i.MX91 blk-ctrl compatible
Posted by Krzysztof Kozlowski 3 months, 2 weeks ago
On 24/06/2025 21:08, Frank Li wrote:
>>>>> +        clock-names:
>>>>> +          items:
>>>>> +            - const: apb
>>>>> +            - const: axi
>>>>> +            - const: nic
>>>>> +            - const: disp
>>>>> +            - const: cam
>>>>> +            - const: lcdif
>>>>> +            - const: isi
>>>>> +            - const: csi
>>>>
>>>> No, look at other bindings how they share clock lists.
>>>
>>> Sorry, this method is what I suggested. becuase there are pxp between cam
>>> and lcdif, can't use simple minItems/maxItems to limit list.
>>
>> The point is to put new items, so pxp, at the end.
> 
> There are already a list for imx93. If change list order, it will break
> ABI. This was rejected at other binding doc review.
I see, I mixed the SoCs. It is a pity you upstream that way and do not
try to make the list common. Anyway names indeed need to be constrained
per variant, but the rest of the comments stay.

Best regards,
Krzysztof
Re: [PATCH v6 2/9] dt-bindings: soc: imx-blk-ctrl: add i.MX91 blk-ctrl compatible
Posted by Frank Li 3 months, 2 weeks ago
On Mon, Jun 23, 2025 at 05:57:25PM +0800, Joy Zou wrote:
> Add new compatible string "fsl,imx91-media-blk-ctrl" for i.MX91,
> which has different input clocks compared to i.MX93. Update the
> clock-names list and handle it in the if-else branch accordingly.
>
> Keep the same restriction for the existed compatible strings.
>
> Signed-off-by: Joy Zou <joy.zou@nxp.com>

Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
> Changes for v5:
> 1. modify the imx93-blk-ctrl binding for imx91 support.
> ---
>  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 55 +++++++++++++++----
>  1 file changed, 43 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> index b3554e7f9e76..db5ee65f8eb8 100644
> --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> @@ -18,7 +18,9 @@ description:
>  properties:
>    compatible:
>      items:
> -      - const: fsl,imx93-media-blk-ctrl
> +      - enum:
> +          - fsl,imx91-media-blk-ctrl
> +          - fsl,imx93-media-blk-ctrl
>        - const: syscon
>
>    reg:
> @@ -31,21 +33,50 @@ properties:
>      maxItems: 1
>
>    clocks:
> +    minItems: 8
>      maxItems: 10
>
>    clock-names:
> -    items:
> -      - const: apb
> -      - const: axi
> -      - const: nic
> -      - const: disp
> -      - const: cam
> -      - const: pxp
> -      - const: lcdif
> -      - const: isi
> -      - const: csi
> -      - const: dsi
> +    minItems: 8
> +    maxItems: 10
>
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: fsl,imx93-media-blk-ctrl
> +    then:
> +      properties:
> +        clock-names:
> +          items:
> +            - const: apb
> +            - const: axi
> +            - const: nic
> +            - const: disp
> +            - const: cam
> +            - const: pxp
> +            - const: lcdif
> +            - const: isi
> +            - const: csi
> +            - const: dsi
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: fsl,imx91-media-blk-ctrl
> +    then:
> +      properties:
> +        clock-names:
> +          items:
> +            - const: apb
> +            - const: axi
> +            - const: nic
> +            - const: disp
> +            - const: cam
> +            - const: lcdif
> +            - const: isi
> +            - const: csi
>  required:
>    - compatible
>    - reg
> --
> 2.37.1
>