devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Jacopo Mondi <jacopo@jmondi.org>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v3 2/2] dt-bindings: media: Use graph and video-interfaces schemas
Date: Wed, 16 Dec 2020 11:38:41 -0600	[thread overview]
Message-ID: <20201216173841.GC651087@robh.at.kernel.org> (raw)
In-Reply-To: <X9olm4dVwY8HRC3j@pendragon.ideasonboard.com>

On Wed, Dec 16, 2020 at 05:19:55PM +0200, Laurent Pinchart wrote:
> Hi Rob,
> 
> Thank you for the patch.
> 
> On Thu, Dec 10, 2020 at 03:16:25PM -0600, Rob Herring wrote:
> > Now that we have graph and video-interfaces schemas, rework the media
> > related schemas to use them.
> > 
> > Cc: Maxime Ripard <mripard@kernel.org>
> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > Cc: Jacopo Mondi <jacopo@jmondi.org>
> > Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > Cc: linux-media@vger.kernel.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---


> > diff --git a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
> > index d94bd67ccea1..3657f2f41098 100644
> > --- a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
> > +++ b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
> > @@ -73,19 +73,16 @@ properties:
> >      enum: [ 0, 180 ]
> > 
> >    port:
> > -    type: object
> > +    $ref: /schemas/graph.yaml#/$defs/port-base
> > +    additionalProperties: false
> > +
> >      properties:
> >        endpoint:
> > -        type: object
> > +        $ref: /schemas/media/video-interfaces.yaml#
> > +        unevaluatedProperties: false
> > +
> >          properties:
> > -          link-frequencies:
> > -            $ref: /schemas/types.yaml#/definitions/uint64-array
> > -            description: List of allowed data link frequencies.
> > -          data-lanes:
> > -            minItems: 1
> > -            maxItems: 8
> 
> Don't we need
> 
>           link-frequencies: true
>           data-lanes: true
> 
> to convey the fact that those properties are applicable for this device
> ? This applies to a few locations below too.

Adding them would convey that to the reader, but wouldn't change the 
schema validation. We'd have to use 'additionalProperties' instead and 
also add 'remote-endpoint' everywhere (and 'reg' sometimes). I prefer 
not doing all that, but if we want it just for purposes of documenting 
the usage, that's fine.

> >            bus-type:
> > -            description: The type of the data bus.
> >              oneOf:
> >                - const: 1 # CSI-2 C-PHY
> >                - const: 3 # CCP2
> > diff --git a/Documentation/devicetree/bindings/media/i2c/ov5647.yaml b/Documentation/devicetree/bindings/media/i2c/ov5647.yaml
> > index 280c62afae13..3b1ea9da437a 100644
> > --- a/Documentation/devicetree/bindings/media/i2c/ov5647.yaml
> > +++ b/Documentation/devicetree/bindings/media/i2c/ov5647.yaml
> > @@ -31,27 +31,15 @@ properties:
> >      maxItems: 1
> > 
> >    port:
> > -    type: object
> > -    description: |-
> > -      Should contain one endpoint sub-node used to model connection to the
> > -      video receiver according to the specification defined in
> > -      Documentation/devicetree/bindings/media/video-interfaces.txt.
> > +    $ref: /schemas/graph.yaml#/$defs/port-base
> > 
> >      properties:
> >        endpoint:
> > -        type: object
> > +        $ref: /schemas/media/video-interfaces.yaml#
> > +        unevaluatedProperties: false
> > 
> >          properties:
> > -          remote-endpoint:
> > -            description: |-
> > -              phandle to the video receiver input port.
> > -
> > -          clock-noncontinuous:
> > -            type: boolean
> > -            description: |-
> > -              Set to true to allow MIPI CSI-2 non-continuous clock operations.
> > -
> > -        additionalProperties: false
> > +          clock-noncontinuous: true
> > 
> >      additionalProperties: false
> > 
> > diff --git a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> > index cde85553fd01..c29b057ae922 100644
> > --- a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> > +++ b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> > @@ -57,16 +57,13 @@ properties:
> >        active low.
> > 
> >    port:
> > -    type: object
> > +    $ref: /schemas/graph.yaml#/$defs/port-base
> >      additionalProperties: false
> > -    description:
> > -      A node containing an output port node with an endpoint definition
> > -      as documented in
> > -      Documentation/devicetree/bindings/media/video-interfaces.txt
> > 
> >      properties:
> >        endpoint:
> > -        type: object
> > +        $ref: /schemas/media/video-interfaces.yaml#
> > +        unevaluatedProperties: false
> > 
> >          properties:
> >            data-lanes:
> > @@ -79,18 +76,13 @@ properties:
> >                - const: 4
> > 
> >            link-frequencies:
> > -            $ref: /schemas/types.yaml#/definitions/uint64-array
> > -            description:
> > -              Allowed data bus frequencies. 360000000, 180000000 Hz or both
> > -              are supported by the driver.
> > -
> > +            maxItems: 2
> > +            items:
> > +              enum: [ 360000000, 180000000 ]
> 
> This is a limitation of the driver, not the device. Should we keep this
> information in a comment, to eventually get it fixed and drop the
> limitation from the bindings ?

If your dts has anything else, then it won't work. Warning on that seems 
valuable to me, so I think we should keep it. If someone with a better 
driver complains, we can drop it.

I can keep the description with 'Frequencies listed are driver, not h/w 
limitations'.

Rob

  reply	other threads:[~2020-12-16 17:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 21:16 [PATCH v2 0/2] dt-bindings: media: Convert video-interfaces.txt to schemas Rob Herring
2020-12-10 21:16 ` [PATCH v2 1/2] media: dt-bindings: Convert video-interfaces.txt properties " Rob Herring
2020-12-16 10:18   ` Guennadi Liakhovetski
2020-12-16 14:12     ` Rob Herring
2020-12-16 14:24       ` Laurent Pinchart
2020-12-16 15:03         ` Sakari Ailus
2020-12-16 15:06       ` Guennadi Liakhovetski
2020-12-10 21:16 ` [PATCH v2 2/2] dt-bindings: media: Use graph and video-interfaces schemas Rob Herring
2020-12-10 21:16 ` [PATCH v3 0/2] dt-bindings: media: Convert video-interfaces.txt to schemas Rob Herring
2020-12-16 14:22   ` Hans Verkuil
2020-12-10 21:16 ` [PATCH v3 1/2] media: dt-bindings: Convert video-interfaces.txt properties " Rob Herring
2020-12-16 14:52   ` Laurent Pinchart
2020-12-16 21:58     ` Sakari Ailus
2020-12-18 18:19     ` Rob Herring
2020-12-19 17:10       ` Laurent Pinchart
2020-12-10 21:16 ` [PATCH v3 2/2] dt-bindings: media: Use graph and video-interfaces schemas Rob Herring
2020-12-16 15:19   ` Laurent Pinchart
2020-12-16 17:38     ` Rob Herring [this message]
2020-12-16 17:43       ` Laurent Pinchart
2020-12-16 21:59         ` Sakari Ailus
2020-12-10 22:39 ` [PATCH v2 0/2] dt-bindings: media: Convert video-interfaces.txt to schemas Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201216173841.GC651087@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=jacopo@jmondi.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).