All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Benoit Parrot <bparrot@ti.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Rob Herring <robh+dt@kernel.org>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [Patch 19/19] dt-bindings: media: cal: convert binding to yaml
Date: Thu, 24 Oct 2019 09:13:34 +0300	[thread overview]
Message-ID: <20191024061334.GA2867@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <20191023161844.hgrxeo244krq26lz@ti.com>

Hi Benoit,

On Wed, Oct 23, 2019 at 11:18:45AM -0500, Benoit Parrot wrote:
> Sakari Ailus <sakari.ailus@iki.fi> wrote on Tue [2019-Oct-22 10:46:23 +0300]:
> > Hi Benoit,
> > 
> > Thanks for the patch.
> > 
> > On Fri, Oct 18, 2019 at 10:34:37AM -0500, Benoit Parrot wrote:
> > > Convert ti-cal.txt to ti,cal.yaml.
> > > 
> > > Signed-off-by: Benoit Parrot <bparrot@ti.com>
> > > ---
> > >  .../devicetree/bindings/media/ti,cal.yaml     | 186 ++++++++++++++++++
> > >  .../devicetree/bindings/media/ti-cal.txt      |  82 --------
> > >  2 files changed, 186 insertions(+), 82 deletions(-)
> > >  create mode 100644 Documentation/devicetree/bindings/media/ti,cal.yaml
> > >  delete mode 100644 Documentation/devicetree/bindings/media/ti-cal.txt
> > > 
> > > diff --git a/Documentation/devicetree/bindings/media/ti,cal.yaml b/Documentation/devicetree/bindings/media/ti,cal.yaml
> > > new file mode 100644
> > > index 000000000000..c3fbb22b4571
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/media/ti,cal.yaml
> > > @@ -0,0 +1,186 @@
> > > +# SPDX-License-Identifier: (GPL-2.0)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/media/ti,cal.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Texas Instruments DRA72x CAMERA ADAPTATION LAYER (CAL) Device Tree Bindings
> > > +
> > > +maintainers:
> > > +  - Benoit Parrot <bparrot@ti.com>
> > > +
> > > +description: |-
> > > +  The Camera Adaptation Layer (CAL) is a key component for image capture
> > > +  applications. The capture module provides the system interface and the
> > > +  processing capability to connect CSI2 image-sensor modules to the
> > > +  DRA72x device.
> > > +
> > > +  CAL supports 2 camera port nodes on MIPI bus. Each CSI2 camera port nodes
> > > +  should contain a 'port' child node with child 'endpoint' node. Please
> > > +  refer to the bindings defined in
> > > +  Documentation/devicetree/bindings/media/video-interfaces.txt.
> > > +
> > > +  compatible should be
> > > +     "ti,dra72-cal", for DRA72 controllers
> > > +     "ti,dra72-pre-es2-cal", for DRA72 controllers pre ES2.0
> > > +     "ti,dra76-cal", for DRA76 controllers
> > > +     "ti,am654-cal", for AM654 controllers
> > > +
> > > +properties:
> > > +  compatible:
> > > +      items:
> > > +        - enum:
> > > +            - ti,dra72-cal
> > > +            - ti,dra72-pre-es2-cal
> > > +            - ti,dra76-cal
> > > +            - ti,am654-cal
> > > +
> > > +  reg:
> > > +    minItems: 2
> > > +    items:
> > > +      - description: The CAL main register region
> > > +      - description: The RX Core0 (DPHY0) register region
> > > +      - description: The RX Core1 (DPHY1) register region
> > > +
> > > +  reg-names:
> > > +    minItems: 2
> > > +    items:
> > > +      - const: cal_top
> > > +      - const: cal_rx_core0
> > > +      - const: cal_rx_core1
> > > +
> > > +  interrupts:
> > > +    maxItems: 1
> > > +
> > > +  syscon-camerrx:
> > > +    maxItems: 1
> > > +    items:
> > > +      - description:
> > > +           phandle to the device control module and offset to the
> > > +           control_camerarx_core register
> > > +
> > > +  clocks:
> > > +    maxItems: 1
> > > +    description: functional clock
> > > +
> > > +  clock-names:
> > > +    items:
> > > +      - const: fck
> > > +
> > > +  power-domains:
> > > +    description:
> > > +      List of phandle and PM domain specifier as documented in
> > > +      Documentation/devicetree/bindings/power/power_domain.txt
> > > +    maxItems: 1
> > > +
> > > +  # See ./video-interfaces.txt for details
> > > +  ports:
> > > +    maxItems: 1
> > > +    type: object
> > > +    additionalProperties: false
> > > +
> > > +    properties:
> > > +      "#address-cells":
> > > +        const: 1
> > > +
> > > +      "#size-cells":
> > > +        const: 0
> > > +
> > > +    patternProperties:
> > > +      '^port@[0-9a-fA-F]+$':
> > > +        minItems: 1
> > > +        maxItems: 2
> > 
> > Obviously you need a port node to connect a sensor. But can the device do
> > something useful without one? I guess it may be a matter of taste whether
> > you require one.
> 
> In an ideal world all of these would be covered by a video-interfaces.yaml
> file I would just need to include... :)
> 
> But I'll try and add some more "required" and see how much trouble it gets
> me.
> > 
> > > +        type: object
> > > +        additionalProperties: false
> > > +
> > > +        properties:
> > > +          reg:
> > > +            minItems: 1
> > > +            items:
> > > +              - description: The port id
> > > +
> > > +        patternProperties:
> > > +          '^endpoint@[0-9a-fA-F]+$':
> > > +            minItems: 1
> > 
> > The graph bindings allows for no endpoints.
> 
> Maybe but then it is not much use.

I guess you can require the endpoint in device bindings still. But the
question is: do you need to?

> > 
> > > +            type: object
> > > +            additionalProperties: false
> > > +
> > > +            properties:
> > > +              clock-lanes:
> > > +                maxItems: 1
> > 
> > Does the device support lane reordering? If not, you could omit the
> > clock-lanes property. It wasn't documented earlier either albeit the
> > example had it for some reason.
> 
> Not sure what you mean by lane re-ordering here, but this IP needs to know
> which lanes are used for data and which lane is the clock lane.
> 
> I cannot just assume that clock lane is always lane 0, I have a sensor
> where the clock lane is #2 for instance and the data lanes are 0, 1, 3, 4.
> 
> But at any rate before it was not specifically documented because I thought
> it was covered by the "see
> Documentation/devicetree/bindings/media/video-interfaces.txt" or de we need
> to duplicate that in every binding?

Then you should indeed have clock-lanes here as you need to know the
position of the clock lane. Most devices either just can make use of the
number of lanes or the order of the lanes is freely configurable (e.g. OMAP
3 ISP). The former group just needs data-lanes.

-- 
Regards,

Sakari Ailus

  reply	other threads:[~2019-10-24  6:13 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 15:34 [Patch 00/19] media: ti-vpe: cal: maintenance Benoit Parrot
2019-10-18 15:34 ` [Patch 01/19] dt-bindings: media: cal: update binding to use syscon Benoit Parrot
2019-10-29 13:20   ` Rob Herring
2019-10-30 13:39     ` Benoit Parrot
2019-10-18 15:34 ` [Patch 02/19] dt-bindings: media: cal: update binding example Benoit Parrot
2019-10-29 13:21   ` Rob Herring
2019-10-30 13:41     ` Benoit Parrot
2019-10-18 15:34 ` [Patch 03/19] media: ti-vpe: cal: Add per platform data support Benoit Parrot
2019-10-29 13:18   ` Rob Herring
2019-10-30 13:34     ` Benoit Parrot
2019-10-18 15:34 ` [Patch 04/19] media: ti-vpe: cal: Enable DMABUF export Benoit Parrot
2019-10-18 15:34 ` [Patch 05/19] media: ti-vpe: cal: Restrict DMA to avoid memory corruption Benoit Parrot
2019-10-18 15:34 ` [Patch 06/19] dt-bindings: media: cal: update binding to add PHY LDO errata support Benoit Parrot
2019-10-29 13:23   ` Rob Herring
2019-10-18 15:34 ` [Patch 07/19] media: ti-vpe: cal: add CSI2 " Benoit Parrot
2019-10-21 10:38   ` Hans Verkuil
2019-10-23 16:03     ` Benoit Parrot
2019-10-18 15:34 ` [Patch 08/19] media: ti-vpe: cal: Fix ths_term/ths_settle parameters Benoit Parrot
2019-10-18 15:34 ` [Patch 09/19] media: ti-vpe: cal: Fix pixel processing parameters Benoit Parrot
2019-10-18 15:34 ` [Patch 10/19] media: ti-vpe: cal: Align DPHY init sequence with docs Benoit Parrot
2019-10-18 15:34 ` [Patch 11/19] dt-bindings: media: cal: update binding to add DRA76x support Benoit Parrot
2019-10-29 13:24   ` Rob Herring
2019-10-18 15:34 ` [Patch 12/19] media: ti-vpe: cal: Add " Benoit Parrot
2019-10-18 15:34 ` [Patch 13/19] dt-bindings: media: cal: update binding to add AM654 support Benoit Parrot
2019-10-29 13:24   ` Rob Herring
2019-10-18 15:34 ` [Patch 14/19] media: ti-vpe: cal: Add " Benoit Parrot
2019-10-18 15:34 ` [Patch 15/19] media: ti-vpe: cal: Add subdev s_power hooks Benoit Parrot
2019-10-18 15:34 ` [Patch 16/19] media: ti-vpe: cal: Properly calculate max resolution boundary Benoit Parrot
2019-10-18 15:34 ` [Patch 17/19] media: ti-vpe: cal: Fix a WARN issued when start streaming fails Benoit Parrot
2019-10-18 15:34 ` [Patch 18/19] media: ti-vpe: cal: fix enum_mbus_code/frame_size subdev arguments Benoit Parrot
2019-10-18 15:34 ` [Patch 19/19] dt-bindings: media: cal: convert binding to yaml Benoit Parrot
2019-10-21 10:49   ` Hans Verkuil
2019-10-23 16:06     ` Benoit Parrot
2019-10-22  7:46   ` Sakari Ailus
2019-10-23 16:18     ` Benoit Parrot
2019-10-24  6:13       ` Sakari Ailus [this message]
2019-10-29 14:22   ` Rob Herring
2019-10-30 13:54     ` Benoit Parrot
2019-10-21 10:50 ` [Patch 00/19] media: ti-vpe: cal: maintenance Hans Verkuil
2019-10-23 16:05   ` Benoit Parrot

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=20191024061334.GA2867@valkosipuli.retiisi.org.uk \
    --to=sakari.ailus@iki.fi \
    --cc=bparrot@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.