[PATCH v8 1/9] dt-bindings: media: sun6i-a31-csi: Add optional interconnect properties

Paul Kocialkowski posted 9 patches 3 months ago
[PATCH v8 1/9] dt-bindings: media: sun6i-a31-csi: Add optional interconnect properties
Posted by Paul Kocialkowski 3 months ago
An interconnect can be attached to the sun6i-a31-csi device, which is
useful to attach the dma memory offset. Add related properties.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
---
 .../devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
index 1aa5775ba2bc..978ef2dc0ae7 100644
--- a/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
+++ b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
@@ -40,6 +40,12 @@ properties:
   resets:
     maxItems: 1
 
+  interconnects:
+    maxItems: 1
+
+  interconnect-names:
+    const: dma-mem
+
   port:
     $ref: /schemas/graph.yaml#/$defs/port-base
     description: Parallel input port, connect to a parallel sensor
-- 
2.49.0
Re: [PATCH v8 1/9] dt-bindings: media: sun6i-a31-csi: Add optional interconnect properties
Posted by Maxime Ripard 3 months ago
Hi,

On Fri, Jul 04, 2025 at 05:46:18PM +0200, Paul Kocialkowski wrote:
> An interconnect can be attached to the sun6i-a31-csi device, which is
> useful to attach the dma memory offset. Add related properties.
> 
> Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
> ---
>  .../devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml  | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
> index 1aa5775ba2bc..978ef2dc0ae7 100644
> --- a/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
> +++ b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
> @@ -40,6 +40,12 @@ properties:
>    resets:
>      maxItems: 1
>  
> +  interconnects:
> +    maxItems: 1
> +
> +  interconnect-names:
> +    const: dma-mem
> +

Is it really optional? My experience (despite being a bit outdated by
now) was that it was required for some SoCs, and missing for others.

Maxime
Re: [PATCH v8 1/9] dt-bindings: media: sun6i-a31-csi: Add optional interconnect properties
Posted by Paul Kocialkowski 2 months, 3 weeks ago
Hi Maxime,

On Wed 09 Jul 25, 09:26, Maxime Ripard wrote:
> On Fri, Jul 04, 2025 at 05:46:18PM +0200, Paul Kocialkowski wrote:
> > An interconnect can be attached to the sun6i-a31-csi device, which is
> > useful to attach the dma memory offset. Add related properties.
> > 
> > Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
> > ---
> >  .../devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml  | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
> > index 1aa5775ba2bc..978ef2dc0ae7 100644
> > --- a/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
> > +++ b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
> > @@ -40,6 +40,12 @@ properties:
> >    resets:
> >      maxItems: 1
> >  
> > +  interconnects:
> > +    maxItems: 1
> > +
> > +  interconnect-names:
> > +    const: dma-mem
> > +
> 
> Is it really optional? My experience (despite being a bit outdated by
> now) was that it was required for some SoCs, and missing for others.

My understanding of the current stituation is that devices with the
interconnects property will get the dma offset from it while others
will have it set via sunxi_mbus' notifier. So in practice the
interconnects property is not required.

Currently the A83T and V3s/V3/S3 have sun6i-a31-csi devices declared in
their device-trees without the property. So I'm not sure if this still
allows us to add a mandatory property that may not always be present.

It should definitely be added (along with a mbus node) to existing users
though.

So all in all I think it makes more sense to not mark it as mandatory.

All the best,

Paul

-- 
Paul Kocialkowski,

Independent contractor - sys-base - https://www.sys-base.io/
Free software developer - https://www.paulk.fr/

Expert in multimedia, graphics and embedded hardware support with Linux.
Re: [PATCH v8 1/9] dt-bindings: media: sun6i-a31-csi: Add optional interconnect properties
Posted by Rob Herring (Arm) 3 months ago
On Fri, 04 Jul 2025 17:46:18 +0200, Paul Kocialkowski wrote:
> An interconnect can be attached to the sun6i-a31-csi device, which is
> useful to attach the dma memory offset. Add related properties.
> 
> Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
> ---
>  .../devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml  | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>