diff mbox series

[v4,2/3] dt-bindings: media: imx8-isi: Use 'port' instead of 'ports' for i.MX8MN

Message ID 20230126170603.11896-3-laurent.pinchart@ideasonboard.com
State New
Headers show
Series media: nxp: i.MX8 ISI driver | expand

Commit Message

Laurent Pinchart Jan. 26, 2023, 5:06 p.m. UTC
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 .../bindings/media/nxp,imx8-isi.yaml          | 39 +++++++++++--------
 1 file changed, 22 insertions(+), 17 deletions(-)

Comments

Adam Ford Jan. 26, 2023, 6:31 p.m. UTC | #1
On Thu, Jan 26, 2023 at 11:06 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  .../bindings/media/nxp,imx8-isi.yaml          | 39 +++++++++++--------
>  1 file changed, 22 insertions(+), 17 deletions(-)
>

Is there a reason not to squash the two bindings into just one patch?


> diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> index 6038b9b5ab36..121594569395 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> @@ -52,11 +52,21 @@ properties:
>    power-domains:
>      maxItems: 1
>
> +  port:
> +    $ref: /schemas/graph.yaml#/properties/port
> +    description: |
> +      The port represents the Pixel Link input to the ISI. It shall have a
> +      single endpoint. This property is only used for ISI instances with a
> +      single port (as in the i.MX8MN). For instances that includes multiple
> +      ports, the 'ports' property shall be used instead.
> +
>    ports:
>      $ref: /schemas/graph.yaml#/properties/ports
>      description: |
>        Ports represent the Pixel Link inputs to the ISI. Their number and
> -      assignment are model-dependent. Each port shall have a single endpoint.
> +      assignment are model-dependent. For ISI instances that have a single
> +      port, the 'port' property should be used instead. Each port shall have a
> +      single endpoint.
>
>  required:
>    - compatible
> @@ -65,7 +75,6 @@ required:
>    - clocks
>    - clock-names
>    - fsl,blk-ctrl
> -  - ports
>
>  allOf:
>    - if:
> @@ -77,12 +86,11 @@ allOf:
>        properties:
>          interrupts:
>            maxItems: 1
> -        ports:
> -          properties:
> -            port@0:
> -              description: MIPI CSI-2 RX
> -          required:
> -            - port@0
> +        port:
> +          description: MIPI CSI-2 RX
> +        ports: false
> +      required:
> +        - port
>
>    - if:
>        properties:
> @@ -93,6 +101,7 @@ allOf:
>        properties:
>          interrupts:
>            maxItems: 2
> +        port: false
>          ports:
>            properties:
>              port@0:
> @@ -102,6 +111,8 @@ allOf:
>            required:
>              - port@0
>              - port@1
> +      required:
> +        - ports
>
>  additionalProperties: false
>
> @@ -122,15 +133,9 @@ examples:
>          fsl,blk-ctrl = <&disp_blk_ctrl>;
>          power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_ISI>;
>
> -        ports {
> -            #address-cells = <1>;
> -            #size-cells = <0>;
> -
> -            port@0 {
> -                reg = <0>;
> -                isi_in: endpoint {
> -                    remote-endpoint = <&mipi_csi_out>;
> -                };
> +        port {
> +            isi_in: endpoint {
> +                remote-endpoint = <&mipi_csi_out>;
>              };
>          };
>      };
> --
> Regards,
>
> Laurent Pinchart
>
Laurent Pinchart Jan. 26, 2023, 6:39 p.m. UTC | #2
Hi Adam,

On Thu, Jan 26, 2023 at 12:31:16PM -0600, Adam Ford wrote:
> On Thu, Jan 26, 2023 at 11:06 AM Laurent Pinchart wrote:
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >  .../bindings/media/nxp,imx8-isi.yaml          | 39 +++++++++++--------
> >  1 file changed, 22 insertions(+), 17 deletions(-)
> 
> Is there a reason not to squash the two bindings into just one patch?

As indicated in the cover letter, I've kept this separate to clearly
show the impact on the bindings. If using a 'port' node is the preferred
option, I can squash this patch, if using a 'ports' unconditionally is
favoured, then I'll just drop it.

> > diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > index 6038b9b5ab36..121594569395 100644
> > --- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > +++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > @@ -52,11 +52,21 @@ properties:
> >    power-domains:
> >      maxItems: 1
> >
> > +  port:
> > +    $ref: /schemas/graph.yaml#/properties/port
> > +    description: |
> > +      The port represents the Pixel Link input to the ISI. It shall have a
> > +      single endpoint. This property is only used for ISI instances with a
> > +      single port (as in the i.MX8MN). For instances that includes multiple
> > +      ports, the 'ports' property shall be used instead.
> > +
> >    ports:
> >      $ref: /schemas/graph.yaml#/properties/ports
> >      description: |
> >        Ports represent the Pixel Link inputs to the ISI. Their number and
> > -      assignment are model-dependent. Each port shall have a single endpoint.
> > +      assignment are model-dependent. For ISI instances that have a single
> > +      port, the 'port' property should be used instead. Each port shall have a
> > +      single endpoint.
> >
> >  required:
> >    - compatible
> > @@ -65,7 +75,6 @@ required:
> >    - clocks
> >    - clock-names
> >    - fsl,blk-ctrl
> > -  - ports
> >
> >  allOf:
> >    - if:
> > @@ -77,12 +86,11 @@ allOf:
> >        properties:
> >          interrupts:
> >            maxItems: 1
> > -        ports:
> > -          properties:
> > -            port@0:
> > -              description: MIPI CSI-2 RX
> > -          required:
> > -            - port@0
> > +        port:
> > +          description: MIPI CSI-2 RX
> > +        ports: false
> > +      required:
> > +        - port
> >
> >    - if:
> >        properties:
> > @@ -93,6 +101,7 @@ allOf:
> >        properties:
> >          interrupts:
> >            maxItems: 2
> > +        port: false
> >          ports:
> >            properties:
> >              port@0:
> > @@ -102,6 +111,8 @@ allOf:
> >            required:
> >              - port@0
> >              - port@1
> > +      required:
> > +        - ports
> >
> >  additionalProperties: false
> >
> > @@ -122,15 +133,9 @@ examples:
> >          fsl,blk-ctrl = <&disp_blk_ctrl>;
> >          power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_ISI>;
> >
> > -        ports {
> > -            #address-cells = <1>;
> > -            #size-cells = <0>;
> > -
> > -            port@0 {
> > -                reg = <0>;
> > -                isi_in: endpoint {
> > -                    remote-endpoint = <&mipi_csi_out>;
> > -                };
> > +        port {
> > +            isi_in: endpoint {
> > +                remote-endpoint = <&mipi_csi_out>;
> >              };
> >          };
> >      };
Rob Herring Jan. 30, 2023, 6:55 p.m. UTC | #3
On Thu, Jan 26, 2023 at 08:39:59PM +0200, Laurent Pinchart wrote:
> Hi Adam,
> 
> On Thu, Jan 26, 2023 at 12:31:16PM -0600, Adam Ford wrote:
> > On Thu, Jan 26, 2023 at 11:06 AM Laurent Pinchart wrote:
> > >
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > ---
> > >  .../bindings/media/nxp,imx8-isi.yaml          | 39 +++++++++++--------
> > >  1 file changed, 22 insertions(+), 17 deletions(-)
> > 
> > Is there a reason not to squash the two bindings into just one patch?
> 
> As indicated in the cover letter, I've kept this separate to clearly
> show the impact on the bindings. If using a 'port' node is the preferred
> option, I can squash this patch, if using a 'ports' unconditionally is
> favoured, then I'll just drop it.

Just always use 'ports'.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
index 6038b9b5ab36..121594569395 100644
--- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
+++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
@@ -52,11 +52,21 @@  properties:
   power-domains:
     maxItems: 1
 
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description: |
+      The port represents the Pixel Link input to the ISI. It shall have a
+      single endpoint. This property is only used for ISI instances with a
+      single port (as in the i.MX8MN). For instances that includes multiple
+      ports, the 'ports' property shall be used instead.
+
   ports:
     $ref: /schemas/graph.yaml#/properties/ports
     description: |
       Ports represent the Pixel Link inputs to the ISI. Their number and
-      assignment are model-dependent. Each port shall have a single endpoint.
+      assignment are model-dependent. For ISI instances that have a single
+      port, the 'port' property should be used instead. Each port shall have a
+      single endpoint.
 
 required:
   - compatible
@@ -65,7 +75,6 @@  required:
   - clocks
   - clock-names
   - fsl,blk-ctrl
-  - ports
 
 allOf:
   - if:
@@ -77,12 +86,11 @@  allOf:
       properties:
         interrupts:
           maxItems: 1
-        ports:
-          properties:
-            port@0:
-              description: MIPI CSI-2 RX
-          required:
-            - port@0
+        port:
+          description: MIPI CSI-2 RX
+        ports: false
+      required:
+        - port
 
   - if:
       properties:
@@ -93,6 +101,7 @@  allOf:
       properties:
         interrupts:
           maxItems: 2
+        port: false
         ports:
           properties:
             port@0:
@@ -102,6 +111,8 @@  allOf:
           required:
             - port@0
             - port@1
+      required:
+        - ports
 
 additionalProperties: false
 
@@ -122,15 +133,9 @@  examples:
         fsl,blk-ctrl = <&disp_blk_ctrl>;
         power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_ISI>;
 
-        ports {
-            #address-cells = <1>;
-            #size-cells = <0>;
-
-            port@0 {
-                reg = <0>;
-                isi_in: endpoint {
-                    remote-endpoint = <&mipi_csi_out>;
-                };
+        port {
+            isi_in: endpoint {
+                remote-endpoint = <&mipi_csi_out>;
             };
         };
     };