Message ID | 20210413155346.2471776-1-niklas.soderlund+renesas@ragnatech.se (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1lWLMb-0075sg-WB; Tue, 13 Apr 2021 15:54:06 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbhDMPyX (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Tue, 13 Apr 2021 11:54:23 -0400 Received: from bin-mail-out-05.binero.net ([195.74.38.228]:45510 "EHLO bin-mail-out-05.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346601AbhDMPyN (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 13 Apr 2021 11:54:13 -0400 X-Halon-ID: 6f4132fd-9c70-11eb-b966-005056917a89 Authorized-sender: niklas.soderlund@fsdn.se Received: from bismarck.berto.se (p54ac5521.dip0.t-ipconnect.de [84.172.85.33]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 6f4132fd-9c70-11eb-b966-005056917a89; Tue, 13 Apr 2021 17:53:52 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund+renesas@ragnatech.se> To: Rob Herring <robh+dt@kernel.org>, devicetree@vger.kernel.org, linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund+renesas@ragnatech.se> Subject: [PATCH] media: dt-bindings: media: renesas,csi2: Node port@0 is not mandatory Date: Tue, 13 Apr 2021 17:53:46 +0200 Message-Id: <20210413155346.2471776-1-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
media: dt-bindings: media: renesas,csi2: Node port@0 is not mandatory
|
|
Commit Message
Niklas Söderlund
April 13, 2021, 3:53 p.m. UTC
When converting the binding to use the video-interfaces schemas the node
port@0 was incorrectly made a mandatory property.
The port@0 node describes which CSI-2 transmitter the R-Car CSI-2
receiver is connected too. Not all boards connects all CSI-2 receivers
to an CSI-2 transmitter.
Fixes: 066a94e28a23e04c ("media: dt-bindings: media: Use graph and video-interfaces schemas")
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
Documentation/devicetree/bindings/media/renesas,csi2.yaml | 1 -
1 file changed, 1 deletion(-)
Comments
Hi Niklas, Thank you for the patch. On Tue, Apr 13, 2021 at 05:53:46PM +0200, Niklas Söderlund wrote: > When converting the binding to use the video-interfaces schemas the node > port@0 was incorrectly made a mandatory property. > > The port@0 node describes which CSI-2 transmitter the R-Car CSI-2 > receiver is connected too. Not all boards connects all CSI-2 receivers > to an CSI-2 transmitter. Ports are properties of the device, they should always be there, regardless of connections. It's the endpoints that describe connections. > Fixes: 066a94e28a23e04c ("media: dt-bindings: media: Use graph and video-interfaces schemas") > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > --- > Documentation/devicetree/bindings/media/renesas,csi2.yaml | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/media/renesas,csi2.yaml b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > index 20396f1be9993461..395484807dd5ed47 100644 > --- a/Documentation/devicetree/bindings/media/renesas,csi2.yaml > +++ b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > @@ -78,7 +78,6 @@ properties: > modules connected the CSI-2 receiver. > > required: > - - port@0 > - port@1 > > required:
Hi Laurent, Thanks for your comments. On 2021-04-15 22:09:12 +0300, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Tue, Apr 13, 2021 at 05:53:46PM +0200, Niklas Söderlund wrote: > > When converting the binding to use the video-interfaces schemas the node > > port@0 was incorrectly made a mandatory property. > > > > The port@0 node describes which CSI-2 transmitter the R-Car CSI-2 > > receiver is connected too. Not all boards connects all CSI-2 receivers > > to an CSI-2 transmitter. > > Ports are properties of the device, they should always be there, > regardless of connections. It's the endpoints that describe connections. I understand what you are saying and if that is the way things are done I'm fine with it. As this was brought to light by a recent change in the bindings I wish to understand if this was always the case the bindings have been wrong all along or not. I only ask as because if we keep the port@0 mandatory there will be board files that needs to add empty port@0 nodes as we know they are not used. And as the media bindings are already quiet large for some Renesas boards I want to understand this before spewing out a lot of patches adding empty nodes ;-) > > > Fixes: 066a94e28a23e04c ("media: dt-bindings: media: Use graph and video-interfaces schemas") > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > > --- > > Documentation/devicetree/bindings/media/renesas,csi2.yaml | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/media/renesas,csi2.yaml b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > index 20396f1be9993461..395484807dd5ed47 100644 > > --- a/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > +++ b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > @@ -78,7 +78,6 @@ properties: > > modules connected the CSI-2 receiver. > > > > required: > > - - port@0 > > - port@1 > > > > required: > > -- > Regards, > > Laurent Pinchart
Hi Niklas, On Fri, Apr 16, 2021 at 10:08 AM Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> wrote: > On 2021-04-15 22:09:12 +0300, Laurent Pinchart wrote: > > On Tue, Apr 13, 2021 at 05:53:46PM +0200, Niklas Söderlund wrote: > > > When converting the binding to use the video-interfaces schemas the node > > > port@0 was incorrectly made a mandatory property. > > > > > > The port@0 node describes which CSI-2 transmitter the R-Car CSI-2 > > > receiver is connected too. Not all boards connects all CSI-2 receivers > > > to an CSI-2 transmitter. > > > > Ports are properties of the device, they should always be there, > > regardless of connections. It's the endpoints that describe connections. > > I understand what you are saying and if that is the way things are done > I'm fine with it. As this was brought to light by a recent change in the > bindings I wish to understand if this was always the case the bindings > have been wrong all along or not. > > I only ask as because if we keep the port@0 mandatory there will be > board files that needs to add empty port@0 nodes as we know they are not s/board/SoC .dtsi/ > used. And as the media bindings are already quiet large for some Renesas > boards I want to understand this before spewing out a lot of patches > adding empty nodes ;-) > > > > > > Fixes: 066a94e28a23e04c ("media: dt-bindings: media: Use graph and video-interfaces schemas") > > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > > > --- > > > Documentation/devicetree/bindings/media/renesas,csi2.yaml | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/media/renesas,csi2.yaml b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > index 20396f1be9993461..395484807dd5ed47 100644 > > > --- a/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > +++ b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > @@ -78,7 +78,6 @@ properties: > > > modules connected the CSI-2 receiver. > > > > > > required: > > > - - port@0 > > > - port@1 > > > > > > required: Gr{oetje,eeting}s, Geert
Hi Niklas, On Fri, Apr 16, 2021 at 10:05:46AM +0200, Niklas Söderlund wrote: > On 2021-04-15 22:09:12 +0300, Laurent Pinchart wrote: > > On Tue, Apr 13, 2021 at 05:53:46PM +0200, Niklas Söderlund wrote: > > > When converting the binding to use the video-interfaces schemas the node > > > port@0 was incorrectly made a mandatory property. > > > > > > The port@0 node describes which CSI-2 transmitter the R-Car CSI-2 > > > receiver is connected too. Not all boards connects all CSI-2 receivers > > > to an CSI-2 transmitter. > > > > Ports are properties of the device, they should always be there, > > regardless of connections. It's the endpoints that describe connections. > > I understand what you are saying and if that is the way things are done > I'm fine with it. As this was brought to light by a recent change in the > bindings I wish to understand if this was always the case the bindings > have been wrong all along or not. > > I only ask as because if we keep the port@0 mandatory there will be > board files that needs to add empty port@0 nodes as we know they are not > used. And as the media bindings are already quiet large for some Renesas > boards I want to understand this before spewing out a lot of patches > adding empty nodes ;-) In my opinion port@0 should be in the SoC .dtsi, not in the board .dts. Individual boards can then add endpoints when the CSI-2 receiver is connected. Would that make sense for you ? > > > Fixes: 066a94e28a23e04c ("media: dt-bindings: media: Use graph and video-interfaces schemas") > > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > > > --- > > > Documentation/devicetree/bindings/media/renesas,csi2.yaml | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/media/renesas,csi2.yaml b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > index 20396f1be9993461..395484807dd5ed47 100644 > > > --- a/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > +++ b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > @@ -78,7 +78,6 @@ properties: > > > modules connected the CSI-2 receiver. > > > > > > required: > > > - - port@0 > > > - port@1 > > > > > > required:
Hi Laurent and Geert, On 2021-04-21 12:43:39 +0300, Laurent Pinchart wrote: > Hi Niklas, > > On Fri, Apr 16, 2021 at 10:05:46AM +0200, Niklas Söderlund wrote: > > On 2021-04-15 22:09:12 +0300, Laurent Pinchart wrote: > > > On Tue, Apr 13, 2021 at 05:53:46PM +0200, Niklas Söderlund wrote: > > > > When converting the binding to use the video-interfaces schemas the node > > > > port@0 was incorrectly made a mandatory property. > > > > > > > > The port@0 node describes which CSI-2 transmitter the R-Car CSI-2 > > > > receiver is connected too. Not all boards connects all CSI-2 receivers > > > > to an CSI-2 transmitter. > > > > > > Ports are properties of the device, they should always be there, > > > regardless of connections. It's the endpoints that describe connections. > > > > I understand what you are saying and if that is the way things are done > > I'm fine with it. As this was brought to light by a recent change in the > > bindings I wish to understand if this was always the case the bindings > > have been wrong all along or not. > > > > I only ask as because if we keep the port@0 mandatory there will be > > board files that needs to add empty port@0 nodes as we know they are not > > used. And as the media bindings are already quiet large for some Renesas > > boards I want to understand this before spewing out a lot of patches > > adding empty nodes ;-) > > In my opinion port@0 should be in the SoC .dtsi, not in the board .dts. > Individual boards can then add endpoints when the CSI-2 receiver is > connected. Would that make sense for you ? I think this is a case of pragmatism vs being technically correct, and of course 'technically correct' being the best kind of correct ;-) Any of the two options works for me as long as we fix the DT validation errors that currently exists. Laurent seems to prefers keeping the port@0 mandatory and adding empty port@0 nodes to dtsi files. @Geert: Does this work for you? > > > > > Fixes: 066a94e28a23e04c ("media: dt-bindings: media: Use graph and video-interfaces schemas") > > > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > > > > --- > > > > Documentation/devicetree/bindings/media/renesas,csi2.yaml | 1 - > > > > 1 file changed, 1 deletion(-) > > > > > > > > diff --git a/Documentation/devicetree/bindings/media/renesas,csi2.yaml b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > > index 20396f1be9993461..395484807dd5ed47 100644 > > > > --- a/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > > +++ b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > > @@ -78,7 +78,6 @@ properties: > > > > modules connected the CSI-2 receiver. > > > > > > > > required: > > > > - - port@0 > > > > - port@1 > > > > > > > > required: > > -- > Regards, > > Laurent Pinchart
Hi Niklas, On Wed, Apr 21, 2021 at 2:31 PM Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> wrote: > On 2021-04-21 12:43:39 +0300, Laurent Pinchart wrote: > > On Fri, Apr 16, 2021 at 10:05:46AM +0200, Niklas Söderlund wrote: > > > On 2021-04-15 22:09:12 +0300, Laurent Pinchart wrote: > > > > On Tue, Apr 13, 2021 at 05:53:46PM +0200, Niklas Söderlund wrote: > > > > > When converting the binding to use the video-interfaces schemas the node > > > > > port@0 was incorrectly made a mandatory property. > > > > > > > > > > The port@0 node describes which CSI-2 transmitter the R-Car CSI-2 > > > > > receiver is connected too. Not all boards connects all CSI-2 receivers > > > > > to an CSI-2 transmitter. > > > > > > > > Ports are properties of the device, they should always be there, > > > > regardless of connections. It's the endpoints that describe connections. > > > > > > I understand what you are saying and if that is the way things are done > > > I'm fine with it. As this was brought to light by a recent change in the > > > bindings I wish to understand if this was always the case the bindings > > > have been wrong all along or not. > > > > > > I only ask as because if we keep the port@0 mandatory there will be > > > board files that needs to add empty port@0 nodes as we know they are not > > > used. And as the media bindings are already quiet large for some Renesas > > > boards I want to understand this before spewing out a lot of patches > > > adding empty nodes ;-) > > > > In my opinion port@0 should be in the SoC .dtsi, not in the board .dts. > > Individual boards can then add endpoints when the CSI-2 receiver is > > connected. Would that make sense for you ? > > I think this is a case of pragmatism vs being technically correct, and > of course 'technically correct' being the best kind of correct ;-) > > Any of the two options works for me as long as we fix the DT validation > errors that currently exists. Laurent seems to prefers keeping the > port@0 mandatory and adding empty port@0 nodes to dtsi files. > > @Geert: Does this work for you? Yes, that's fine for me. Thanks! Gr{oetje,eeting}s, Geert
diff --git a/Documentation/devicetree/bindings/media/renesas,csi2.yaml b/Documentation/devicetree/bindings/media/renesas,csi2.yaml index 20396f1be9993461..395484807dd5ed47 100644 --- a/Documentation/devicetree/bindings/media/renesas,csi2.yaml +++ b/Documentation/devicetree/bindings/media/renesas,csi2.yaml @@ -78,7 +78,6 @@ properties: modules connected the CSI-2 receiver. required: - - port@0 - port@1 required: