[PATCH v4 1/2] dt-bindings: media: cdns,csi2rx.yaml: Add optional interrupts for cdns-csi2rx

Yemike Abhilash Chandra posted 2 patches 9 months, 3 weeks ago
There is a newer version of this series
[PATCH v4 1/2] dt-bindings: media: cdns,csi2rx.yaml: Add optional interrupts for cdns-csi2rx
Posted by Yemike Abhilash Chandra 9 months, 3 weeks ago
The Cadence CSI2RX IP exposes 2 interrupts [0] 12.7 camera subsystem.
So, add support for optional interrupts and interrupt-names properties.
Keep the second interrupt optional, as it may be unconnected across
different vendors.

[0]: http://www.ti.com/lit/pdf/spruil1

Signed-off-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
---

Changes in v4:
- Add flexibility in DT bindings
- Drop the ACK from Krzysztof, since there is change in bindings
- Make some minor changes in the commit messages.

 .../devicetree/bindings/media/cdns,csi2rx.yaml         | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml b/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
index 2008a47c0580..054ed4b94312 100644
--- a/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
+++ b/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
@@ -24,6 +24,16 @@ properties:
   reg:
     maxItems: 1
 
+  interrupts:
+    minItems: 1
+    maxItems: 2
+
+  interrupt-names:
+    minItems: 1
+    items:
+      - const: error_irq
+      - const: irq
+
   clocks:
     items:
       - description: CSI2Rx system clock
-- 
2.34.1
Re: [PATCH v4 1/2] dt-bindings: media: cdns,csi2rx.yaml: Add optional interrupts for cdns-csi2rx
Posted by Krzysztof Kozlowski 9 months, 3 weeks ago
On Thu, Feb 27, 2025 at 01:59:19PM +0530, Yemike Abhilash Chandra wrote:
> diff --git a/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml b/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
> index 2008a47c0580..054ed4b94312 100644
> --- a/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
> +++ b/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
> @@ -24,6 +24,16 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  interrupts:
> +    minItems: 1
> +    maxItems: 2
> +
> +  interrupt-names:
> +    minItems: 1
> +    items:
> +      - const: error_irq
> +      - const: irq

And how is this second interrupt in existing integrations?

This is supposed to be constrained per variant... which probably will
tell you that these are not optional now.

Best regards,
Krzysztof
Re: [PATCH v4 1/2] dt-bindings: media: cdns,csi2rx.yaml: Add optional interrupts for cdns-csi2rx
Posted by Jai Luthra 9 months, 3 weeks ago
Hi Krzysztof,

On Fri, Feb 28, 2025 at 08:34:22AM +0100, Krzysztof Kozlowski wrote:
> On Thu, Feb 27, 2025 at 01:59:19PM +0530, Yemike Abhilash Chandra wrote:
> > diff --git a/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml b/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
> > index 2008a47c0580..054ed4b94312 100644
> > --- a/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
> > +++ b/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
> > @@ -24,6 +24,16 @@ properties:
> >    reg:
> >      maxItems: 1
> >  
> > +  interrupts:
> > +    minItems: 1
> > +    maxItems: 2
> > +
> > +  interrupt-names:
> > +    minItems: 1
> > +    items:
> > +      - const: error_irq
> > +      - const: irq
> 
> And how is this second interrupt in existing integrations?
> 

TI SoCs integrate both of these if I understood the TRM correctly.

Not sure about StarFive, maybe Changhuang can confirm that both irq and 
error_irq are integrated.

> This is supposed to be constrained per variant... which probably will
> tell you that these are not optional now.
> 

To make sure I understand, we mark them both as non-optional in the bindings 
by default. And if some particular SoC chooses to not integrate the second irq 
they may add a constraint based on compatible?

That seems perfectly reasonable. With that change,

Reviewed-by: Jai Luthra <jai.luthra@linux.dev>

> Best regards,
> Krzysztof
>