From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Guennadi Liakhovetski <g.liakhovetski-Mmb7MZpHnFY@public.gmane.org>
Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Mark Brown
<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>,
Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
Sylwester Nawrocki
<sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 04/14] media: add V4L2 DT binding documentation
Date: Fri, 5 Oct 2012 17:10:57 +0200 [thread overview]
Message-ID: <20121005151057.GA5125@pengutronix.de> (raw)
In-Reply-To: <1348754853-28619-5-git-send-email-g.liakhovetski-Mmb7MZpHnFY@public.gmane.org>
Hi Guennadi,
Some comments inline.
On Thu, Sep 27, 2012 at 04:07:23PM +0200, Guennadi Liakhovetski wrote:
> This patch adds a document, describing common V4L2 device tree bindings.
>
> Co-authored-by: Sylwester Nawrocki <s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski-Mmb7MZpHnFY@public.gmane.org>
> ---
> Documentation/devicetree/bindings/media/v4l2.txt | 162 ++++++++++++++++++++++
> 1 files changed, 162 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/media/v4l2.txt
>
> diff --git a/Documentation/devicetree/bindings/media/v4l2.txt b/Documentation/devicetree/bindings/media/v4l2.txt
> new file mode 100644
> index 0000000..b8b3f41
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/v4l2.txt
> @@ -0,0 +1,162 @@
> +Video4Linux Version 2 (V4L2)
> +
> +General concept
> +---------------
> +
> +Video pipelines consist of external devices, e.g. camera sensors, controlled
> +over an I2C, SPI or UART bus, and SoC internal IP blocks, including video DMA
> +engines and video data processors.
> +
> +SoC internal blocks are described by DT nodes, placed similarly to other SoC
> +blocks. External devices are represented as child nodes of their respective bus
> +controller nodes, e.g. I2C.
> +
> +Data interfaces on all video devices are described by "port" child DT nodes.
> +Configuration of a port depends on other devices participating in the data
> +transfer and is described by "link" DT nodes, specified as children of the
> +"port" nodes:
> +
> +/foo {
> + port@0 {
> + link@0 { ... };
> + link@1 { ... };
> + };
> + port@1 { ... };
> +};
> +
> +If a port can be configured to work with more than one other device on the same
> +bus, a "link" child DT node must be provided for each of them. If more than one
> +port is present on a device or more than one link is connected to a port, a
> +common scheme, using "#address-cells," "#size-cells" and "reg" properties is
> +used.
> +
> +Optional link properties:
> +- remote: phandle to the other endpoint link DT node.
> +- slave-mode: a boolean property, run the link in slave mode. Default is master
> + mode.
> +- data-shift: on parallel data busses, if data-width is used to specify the
> + number of data lines, data-shift can be used to specify which data lines are
> + used, e.g. "data-width=<10>; data-shift=<2>;" means, that lines 9:2 are used.
> +- hsync-active: 1 or 0 for active-high or -low HSYNC signal polarity
> + respectively.
> +- vsync-active: ditto for VSYNC. Note, that if HSYNC and VSYNC polarities are
> + not specified, embedded synchronisation may be required, where supported.
> +- data-active: similar to HSYNC and VSYNC specifies data line polarity.
> +- field-even-active: field signal level during the even field data transmission.
> +- pclk-sample: rising (1) or falling (0) edge to sample the pixel clock pin.
> +- data-lanes: array of serial, e.g. MIPI CSI-2, data hardware lane numbers in
> + the ascending order, beginning with logical lane 0.
> +- clock-lanes: hardware lane number, used for the clock lane.
> +- clock-noncontinuous: a boolean property to allow MIPI CSI-2 non-continuous
> + clock mode.
> +
> +Example:
> +
> + ceu0: ceu@0xfe910000 {
> + compatible = "renesas,sh-mobile-ceu";
> + reg = <0xfe910000 0xa0>;
> + interrupts = <0x880>;
> +
> + mclk: master_clock {
> + compatible = "renesas,ceu-clock";
> + #clock-cells = <1>;
> + clock-frequency = <50000000>; /* max clock frequency */
> + clock-output-names = "mclk";
> + };
> +
> + port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ceu0_1: link@1 {
> + reg = <1>; /* local link # */
> + remote = <&ov772x_1_1>; /* remote phandle */
> + bus-width = <8>; /* used data lines */
> + data-shift = <0>; /* lines 7:0 are used */
> +
> + /* If [hv]sync-active are missing, embedded bt.605 sync is used */
> + hsync-active = <1>; /* active high */
> + vsync-active = <1>; /* active high */
> + data-active = <1>; /* active high */
> + pclk-sample = <1>; /* rising */
> + };
> +
> + ceu0_0: link@0 {
> + reg = <0>;
> + remote = <&csi2_2>;
> + immutable;
> + };
> + };
> + };
> +
> + i2c0: i2c@0xfff20000 {
> + ...
> + ov772x_1: camera@0x21 {
> + compatible = "omnivision,ov772x";
> + reg = <0x21>;
> + vddio-supply = <®ulator1>;
> + vddcore-supply = <®ulator2>;
> +
> + clock-frequency = <20000000>;
> + clocks = <&mclk 0>;
> + clock-names = "xclk";
> +
> + port {
> + /* With 1 link per port no need in addresses */
> + ov772x_1_1: link {
> + bus-width = <8>;
> + remote = <&ceu0_1>;
> + hsync-active = <1>;
> + vsync-active = <0>; /* who came up with an inverter here?... */
> + data-active = <1>;
> + pclk-sample = <1>;
> + };
I currently do not understand why these properties are both in the sensor
and in the link. What happens if they conflict? Are inverters assumed
like suggested above? I think the bus can only have a single bus-width,
why allow multiple bus widths here?
> + reg = <0xffc90000 0x1000>;
> + interrupts = <0x17a0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@1 {
> + compatible = "renesas,csi2c"; /* one of CSI2I and CSI2C */
> + reg = <1>; /* CSI-2 PHY #1 of 2: PHY_S, PHY_M has port address 0, is unused */
> +
> + csi2_1: link {
> + clock-lanes = <0>;
> + data-lanes = <2>, <1>;
> + remote = <&imx074_1>;
> + };
> + };
> + port@2 {
> + reg = <2>; /* port 2: link to the CEU */
> +
> + csi2_2: link {
> + immutable;
> + remote = <&ceu0_0>;
> + };
> + };
Maybe the example would be clearer if you split it up in two, one simple
case with the csi2_1 <-> imx074_1 and a more advanced with the link in
between. It took me some time until I figured out that these are two
separate camera/sensor pairs. Somehow I was looking for a multiplexer
between them.
I am not sure we really want to have these circular phandles here. I
think phandles in the direction of data flow should be enough. I mean
the devices probe in arbitrary order anyway and the SoC camera core must
keep track of the possible sensor/csi combinations anyway, so it should
be enough to make the connections in a single direction.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2012-10-05 15:10 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 14:07 [PATCH 00/14] V4L2 DT support Guennadi Liakhovetski
2012-09-27 14:07 ` [PATCH 01/14] i2c: add dummy inline functions for when CONFIG_OF_I2C(_MODULE) isn't defined Guennadi Liakhovetski
2012-09-27 14:07 ` [PATCH 02/14] of: add a dummy inline function for when CONFIG_OF is not defined Guennadi Liakhovetski
2012-09-28 11:05 ` [PATCH 15/14] OF: define of_*_cmp() macros also if CONFIG_OF isn't set Guennadi Liakhovetski
2012-09-27 14:07 ` [PATCH 04/14] media: add V4L2 DT binding documentation Guennadi Liakhovetski
2012-10-01 20:45 ` Sylwester Nawrocki
[not found] ` <1348754853-28619-5-git-send-email-g.liakhovetski-Mmb7MZpHnFY@public.gmane.org>
2012-10-02 14:15 ` Rob Herring
2012-10-02 14:33 ` Guennadi Liakhovetski
2012-10-03 20:54 ` Rob Herring
2012-10-05 9:43 ` Guennadi Liakhovetski
2012-10-05 11:31 ` Hans Verkuil
2012-10-05 11:37 ` Guennadi Liakhovetski
2012-10-08 20:00 ` Stephen Warren
2012-10-08 21:00 ` Laurent Pinchart
2012-10-08 21:14 ` Guennadi Liakhovetski
2012-10-09 9:21 ` Hans Verkuil
2012-10-09 9:29 ` Guennadi Liakhovetski
2012-10-05 15:10 ` Sascha Hauer [this message]
2012-10-05 15:41 ` Guennadi Liakhovetski
2012-10-05 16:02 ` Sascha Hauer
2012-10-08 7:58 ` Guennadi Liakhovetski
2012-10-10 8:40 ` Sascha Hauer
2012-10-10 8:51 ` Mark Brown
2012-10-10 9:21 ` Sascha Hauer
2012-10-10 10:46 ` Mark Brown
2012-10-08 20:12 ` Stephen Warren
2012-09-27 14:07 ` [PATCH 05/14] media: add a V4L2 OF parser Guennadi Liakhovetski
2012-10-01 21:37 ` Sylwester Nawrocki
2012-10-02 9:49 ` Guennadi Liakhovetski
[not found] ` <Pine.LNX.4.64.1210021142210.15778-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2012-10-02 10:13 ` Sylwester Nawrocki
2012-10-02 11:04 ` Guennadi Liakhovetski
2012-10-05 10:41 ` Hans Verkuil
2012-10-05 10:58 ` Guennadi Liakhovetski
2012-10-05 11:23 ` Hans Verkuil
2012-10-05 11:35 ` Guennadi Liakhovetski
2012-10-08 12:23 ` Guennadi Liakhovetski
2012-10-08 13:48 ` Hans Verkuil
2012-10-08 14:30 ` Guennadi Liakhovetski
2012-10-08 14:53 ` Hans Verkuil
2012-10-08 15:15 ` Guennadi Liakhovetski
2012-10-08 15:41 ` Hans Verkuil
2012-10-08 15:53 ` Guennadi Liakhovetski
[not found] ` <Pine.LNX.4.64.1210081748390.14454-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2012-10-08 16:00 ` Guennadi Liakhovetski
2012-10-10 13:22 ` Laurent Pinchart
2012-10-10 13:18 ` Laurent Pinchart
2012-10-10 16:50 ` Stephen Warren
2012-10-10 22:51 ` Laurent Pinchart
2012-10-11 16:15 ` Stephen Warren
2012-10-10 13:12 ` Laurent Pinchart
2012-10-10 12:54 ` Laurent Pinchart
2012-10-10 13:45 ` Mauro Carvalho Chehab
2012-10-10 14:48 ` Laurent Pinchart
2012-10-10 14:57 ` Mauro Carvalho Chehab
2012-10-10 15:15 ` Laurent Pinchart
2012-10-11 19:48 ` Sakari Ailus
2012-10-13 0:16 ` Guennadi Liakhovetski
2012-10-05 18:30 ` Sylwester Nawrocki
2012-10-05 18:45 ` Mark Brown
2012-10-08 9:40 ` Guennadi Liakhovetski
2012-10-09 10:34 ` Sylwester Nawrocki
2012-10-09 11:00 ` Hans Verkuil
2012-10-10 13:25 ` Laurent Pinchart
2012-10-10 20:23 ` Sylwester Nawrocki
2012-10-10 20:32 ` Guennadi Liakhovetski
2012-10-10 21:12 ` Sylwester Nawrocki
2012-10-10 23:05 ` Laurent Pinchart
[not found] ` <5075D947.3080903-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-10 22:58 ` Laurent Pinchart
2012-10-08 21:30 ` Laurent Pinchart
2012-10-08 10:03 ` Sylwester Nawrocki
2012-09-27 14:07 ` [PATCH 06/14] media: soc-camera: prepare for asynchronous client probing Guennadi Liakhovetski
2012-09-27 14:07 ` [PATCH 07/14] media: soc-camera: support deferred probing of clients Guennadi Liakhovetski
2013-04-10 10:38 ` Barry Song
[not found] ` <CAGsJ_4yUY6PE0NWZ9yaOLFmRb3O-HL55=w7Y6muwL0YbkJtP0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-10 12:06 ` Guennadi Liakhovetski
2013-04-10 13:53 ` Barry Song
2013-04-10 13:56 ` Mark Brown
2013-04-10 14:00 ` Barry Song
2013-04-10 14:03 ` Guennadi Liakhovetski
2013-04-10 14:30 ` Barry Song
2013-04-10 14:43 ` Guennadi Liakhovetski
2013-04-10 15:02 ` Barry Song
2012-09-27 14:07 ` [PATCH 08/14] media: soc-camera: use managed devm_regulator_bulk_get() Guennadi Liakhovetski
2012-09-27 17:38 ` Sachin Kamat
2012-09-27 14:07 ` [PATCH 09/14] media: mt9t112: support deferred probing Guennadi Liakhovetski
[not found] ` <1348754853-28619-1-git-send-email-g.liakhovetski-Mmb7MZpHnFY@public.gmane.org>
2012-09-27 14:07 ` [PATCH 03/14] OF: make a function pointer argument const Guennadi Liakhovetski
2012-09-27 14:07 ` [PATCH 10/14] media: soc-camera: support OF cameras Guennadi Liakhovetski
2012-10-05 19:11 ` Sylwester Nawrocki
2012-10-08 8:37 ` Guennadi Liakhovetski
2012-10-08 9:28 ` Sylwester Nawrocki
2013-04-08 9:19 ` Barry Song
[not found] ` <CAGsJ_4zYvF-U0_ETs9EP8i+bOJiJLkXWrJdMNnW_sXU-QwnXQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-08 11:21 ` Guennadi Liakhovetski
2013-04-08 11:49 ` Barry Song
2012-09-27 14:07 ` [PATCH 11/14] media: sh-mobile-ceu-camera: runtime PM suspending doesn't have to be synchronous Guennadi Liakhovetski
2012-09-27 14:07 ` [PATCH 12/14] media: sh-mobile-ceu-camera: add primitive OF support Guennadi Liakhovetski
2012-09-27 14:07 ` [PATCH 13/14] media: sh-mobile-ceu-driver: support max width and height in DT Guennadi Liakhovetski
2012-09-27 14:07 ` [PATCH 14/14] media: sh_mobile_ceu_camera: support all standard V4L2 DT properties Guennadi Liakhovetski
2012-10-05 12:32 ` [PATCH 00/14] V4L2 DT support Sylwester Nawrocki
2012-10-05 14:41 ` Guennadi Liakhovetski
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=20121005151057.GA5125@pengutronix.de \
--to=s.hauer-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=g.liakhovetski-Mmb7MZpHnFY@public.gmane.org \
--cc=hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org \
--cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
--cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 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).