[PATCH v2 5/6] media: dt-bindings: add NXP i.MX93 compatible string

Frank Li posted 6 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH v2 5/6] media: dt-bindings: add NXP i.MX93 compatible string
Posted by Frank Li 1 month, 2 weeks ago
The i.MX93 uses the DW CSI-2 RX controller, which is similar to the
Rockchip RK3568 implementation.

The i.MX93 variant provides one IRQ, two clocks, and no resets. Add the
"fsl,imx93-mipi-csi2" compatible string and keep the same constraints for
rk3568.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 .../bindings/media/rockchip,rk3568-mipi-csi2.yaml  | 47 +++++++++++++++++++++-
 1 file changed, 45 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
index 2c2bd87582eb8bfdd13720edd62a5f00dda958ba..4ac4a3b6f406408b9524c795e6cdeb117d3353da 100644
--- a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
@@ -17,6 +17,7 @@ description:
 properties:
   compatible:
     enum:
+      - fsl,imx93-mipi-csi2
       - rockchip,rk3568-mipi-csi2
 
   reg:
@@ -26,14 +27,23 @@ properties:
     items:
       - description: Interrupt that signals changes in CSI2HOST_ERR1.
       - description: Interrupt that signals changes in CSI2HOST_ERR2.
+    minItems: 1
 
   interrupt-names:
     items:
       - const: err1
       - const: err2
+    minItems: 1
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: per
+      - const: pixel
+    minItems: 1
 
   phys:
     maxItems: 1
@@ -88,10 +98,43 @@ required:
   - phys
   - ports
   - power-domains
-  - resets
 
 additionalProperties: false
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3568-mipi-csi2
+    then:
+      properties:
+        interrupts:
+          minItems: 2
+        interrupt-names:
+          minItems: 2
+        clocks:
+          maxItems: 1
+        clock-names:
+          maxItems: 1
+      required:
+        - resets
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx93-mipi-csi2
+    then:
+      properties:
+        interrupts:
+          maxItems: 1
+        interrupt-names: false
+        clocks:
+          minItems: 2
+        clock-names:
+          minItems: 2
+
 examples:
   - |
     #include <dt-bindings/clock/rk3568-cru.h>

-- 
2.43.0
Re: [PATCH v2 5/6] media: dt-bindings: add NXP i.MX93 compatible string
Posted by Michael Riesch 1 month, 2 weeks ago
Hi Frank,

On 2/13/26 21:25, Frank Li wrote:
> The i.MX93 uses the DW CSI-2 RX controller, which is similar to the
> Rockchip RK3568 implementation.
> 
> The i.MX93 variant provides one IRQ, two clocks, and no resets. Add the
> "fsl,imx93-mipi-csi2" compatible string and keep the same constraints for
> rk3568.

RK3568.

> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

With that cosmetic fix,

Acked-by: Michael Riesch <michael.riesch@collabora.com>

Best regards,
Michael


> ---
>  .../bindings/media/rockchip,rk3568-mipi-csi2.yaml  | 47 +++++++++++++++++++++-
>  1 file changed, 45 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
> index 2c2bd87582eb8bfdd13720edd62a5f00dda958ba..4ac4a3b6f406408b9524c795e6cdeb117d3353da 100644
> --- a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
> +++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
> @@ -17,6 +17,7 @@ description:
>  properties:
>    compatible:
>      enum:
> +      - fsl,imx93-mipi-csi2
>        - rockchip,rk3568-mipi-csi2
>  
>    reg:
> @@ -26,14 +27,23 @@ properties:
>      items:
>        - description: Interrupt that signals changes in CSI2HOST_ERR1.
>        - description: Interrupt that signals changes in CSI2HOST_ERR2.
> +    minItems: 1
>  
>    interrupt-names:
>      items:
>        - const: err1
>        - const: err2
> +    minItems: 1
>  
>    clocks:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2
> +
> +  clock-names:
> +    items:
> +      - const: per
> +      - const: pixel
> +    minItems: 1
>  
>    phys:
>      maxItems: 1
> @@ -88,10 +98,43 @@ required:
>    - phys
>    - ports
>    - power-domains
> -  - resets
>  
>  additionalProperties: false
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: rockchip,rk3568-mipi-csi2
> +    then:
> +      properties:
> +        interrupts:
> +          minItems: 2
> +        interrupt-names:
> +          minItems: 2
> +        clocks:
> +          maxItems: 1
> +        clock-names:
> +          maxItems: 1
> +      required:
> +        - resets
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: fsl,imx93-mipi-csi2
> +    then:
> +      properties:
> +        interrupts:
> +          maxItems: 1
> +        interrupt-names: false
> +        clocks:
> +          minItems: 2
> +        clock-names:
> +          minItems: 2
> +
>  examples:
>    - |
>      #include <dt-bindings/clock/rk3568-cru.h>
>
Re: [PATCH v2 5/6] media: dt-bindings: add NXP i.MX93 compatible string
Posted by Michael Riesch 1 month, 2 weeks ago
Hi Frank,

On 2/16/26 09:31, Michael Riesch wrote:
> Hi Frank,
> 
> On 2/13/26 21:25, Frank Li wrote:
>> The i.MX93 uses the DW CSI-2 RX controller, which is similar to the
>> Rockchip RK3568 implementation.
>>
>> The i.MX93 variant provides one IRQ, two clocks, and no resets. Add the
>> "fsl,imx93-mipi-csi2" compatible string and keep the same constraints for
>> rk3568.
> 
> RK3568.
> 
>>
>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
>> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> 
> With that cosmetic fix,
> 
> Acked-by: Michael Riesch <michael.riesch@collabora.com>

I just recalled a conversation with Heiko we had off-list a while ago,
and back then we kind of decided against a snps binding document and
compatible, since the integration in the respective SoC (family) varies.
Thus, we went for a Rockchip document (which shall be extended with the
RK3588 variant of this block, for example) and thought that any other
variant (e.g., the one of the imx93) could be documented in a separate
document fsl,somethingsomething.

Seeing that interrupts, clocks, and resets are different, I would
recommend that you add a new fsl,... document.

What do you think?

Best regards,
Michael


> 
> Best regards,
> Michael
> 
> 
>> ---
>>  .../bindings/media/rockchip,rk3568-mipi-csi2.yaml  | 47 +++++++++++++++++++++-
>>  1 file changed, 45 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
>> index 2c2bd87582eb8bfdd13720edd62a5f00dda958ba..4ac4a3b6f406408b9524c795e6cdeb117d3353da 100644
>> --- a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
>> +++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
>> @@ -17,6 +17,7 @@ description:
>>  properties:
>>    compatible:
>>      enum:
>> +      - fsl,imx93-mipi-csi2
>>        - rockchip,rk3568-mipi-csi2
>>  
>>    reg:
>> @@ -26,14 +27,23 @@ properties:
>>      items:
>>        - description: Interrupt that signals changes in CSI2HOST_ERR1.
>>        - description: Interrupt that signals changes in CSI2HOST_ERR2.
>> +    minItems: 1
>>  
>>    interrupt-names:
>>      items:
>>        - const: err1
>>        - const: err2
>> +    minItems: 1
>>  
>>    clocks:
>> -    maxItems: 1
>> +    minItems: 1
>> +    maxItems: 2
>> +
>> +  clock-names:
>> +    items:
>> +      - const: per
>> +      - const: pixel
>> +    minItems: 1
>>  
>>    phys:
>>      maxItems: 1
>> @@ -88,10 +98,43 @@ required:
>>    - phys
>>    - ports
>>    - power-domains
>> -  - resets
>>  
>>  additionalProperties: false
>>  
>> +allOf:
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            const: rockchip,rk3568-mipi-csi2
>> +    then:
>> +      properties:
>> +        interrupts:
>> +          minItems: 2
>> +        interrupt-names:
>> +          minItems: 2
>> +        clocks:
>> +          maxItems: 1
>> +        clock-names:
>> +          maxItems: 1
>> +      required:
>> +        - resets
>> +
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            const: fsl,imx93-mipi-csi2
>> +    then:
>> +      properties:
>> +        interrupts:
>> +          maxItems: 1
>> +        interrupt-names: false
>> +        clocks:
>> +          minItems: 2
>> +        clock-names:
>> +          minItems: 2
>> +
>>  examples:
>>    - |
>>      #include <dt-bindings/clock/rk3568-cru.h>
>>
>
Re: [PATCH v2 5/6] media: dt-bindings: add NXP i.MX93 compatible string
Posted by Frank Li 1 month, 2 weeks ago
On Mon, Feb 16, 2026 at 04:22:13PM +0100, Michael Riesch wrote:
> Hi Frank,
>
> On 2/16/26 09:31, Michael Riesch wrote:
> > Hi Frank,
> >
> > On 2/13/26 21:25, Frank Li wrote:
> >> The i.MX93 uses the DW CSI-2 RX controller, which is similar to the
> >> Rockchip RK3568 implementation.
> >>
> >> The i.MX93 variant provides one IRQ, two clocks, and no resets. Add the
> >> "fsl,imx93-mipi-csi2" compatible string and keep the same constraints for
> >> rk3568.
> >
> > RK3568.
> >
> >>
> >> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> >> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> >
> > With that cosmetic fix,
> >
> > Acked-by: Michael Riesch <michael.riesch@collabora.com>
>
> I just recalled a conversation with Heiko we had off-list a while ago,
> and back then we kind of decided against a snps binding document and
> compatible, since the integration in the respective SoC (family) varies.
> Thus, we went for a Rockchip document (which shall be extended with the
> RK3588 variant of this block, for example) and thought that any other
> variant (e.g., the one of the imx93) could be documented in a separate
> document fsl,somethingsomething.
>
> Seeing that interrupts, clocks, and resets are different, I would
> recommend that you add a new fsl,... document.
>
> What do you think?

It is depend on how much difference. Conside Krzysztof Kozlowski already
acked. we can split it when more soc will be added, if-else branch become
extremly complex and abstract more common property likes dwc usb at that
time.

Frank

>
> Best regards,
> Michael
>
>
> >
> > Best regards,
> > Michael
> >
> >
> >> ---
> >>  .../bindings/media/rockchip,rk3568-mipi-csi2.yaml  | 47 +++++++++++++++++++++-
> >>  1 file changed, 45 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
> >> index 2c2bd87582eb8bfdd13720edd62a5f00dda958ba..4ac4a3b6f406408b9524c795e6cdeb117d3353da 100644
> >> --- a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
> >> +++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
> >> @@ -17,6 +17,7 @@ description:
> >>  properties:
> >>    compatible:
> >>      enum:
> >> +      - fsl,imx93-mipi-csi2
> >>        - rockchip,rk3568-mipi-csi2
> >>
> >>    reg:
> >> @@ -26,14 +27,23 @@ properties:
> >>      items:
> >>        - description: Interrupt that signals changes in CSI2HOST_ERR1.
> >>        - description: Interrupt that signals changes in CSI2HOST_ERR2.
> >> +    minItems: 1
> >>
> >>    interrupt-names:
> >>      items:
> >>        - const: err1
> >>        - const: err2
> >> +    minItems: 1
> >>
> >>    clocks:
> >> -    maxItems: 1
> >> +    minItems: 1
> >> +    maxItems: 2
> >> +
> >> +  clock-names:
> >> +    items:
> >> +      - const: per
> >> +      - const: pixel
> >> +    minItems: 1
> >>
> >>    phys:
> >>      maxItems: 1
> >> @@ -88,10 +98,43 @@ required:
> >>    - phys
> >>    - ports
> >>    - power-domains
> >> -  - resets
> >>
> >>  additionalProperties: false
> >>
> >> +allOf:
> >> +  - if:
> >> +      properties:
> >> +        compatible:
> >> +          contains:
> >> +            const: rockchip,rk3568-mipi-csi2
> >> +    then:
> >> +      properties:
> >> +        interrupts:
> >> +          minItems: 2
> >> +        interrupt-names:
> >> +          minItems: 2
> >> +        clocks:
> >> +          maxItems: 1
> >> +        clock-names:
> >> +          maxItems: 1
> >> +      required:
> >> +        - resets
> >> +
> >> +  - if:
> >> +      properties:
> >> +        compatible:
> >> +          contains:
> >> +            const: fsl,imx93-mipi-csi2
> >> +    then:
> >> +      properties:
> >> +        interrupts:
> >> +          maxItems: 1
> >> +        interrupt-names: false
> >> +        clocks:
> >> +          minItems: 2
> >> +        clock-names:
> >> +          minItems: 2
> >> +
> >>  examples:
> >>    - |
> >>      #include <dt-bindings/clock/rk3568-cru.h>
> >>
> >
>