Re: [PATCH] [media] Add common binding documentation for video interfaces
On 12/15/2012 03:13 PM, Sylwester Nawrocki wrote: > From: Guennadi Liakhovetski > > This patch adds a document describing common OF bindings for video > capture, output and video processing devices. It is currently mainly > focused on video capture devices, with data interfaces defined in > standards like ITU-R BT.656 or MIPI CSI-2. > It also documents a method of describing data links between devices. > > Signed-off-by: Guennadi Liakhovetski > Signed-off-by: Sylwester Nawrocki Looks reasonable. You can merge this with the rest of the series. Acked-by: Rob Herring > --- > Hi, > > This is an updated version of patch [1]. My changes include resolving > issues pointed out during review, i.e.: > - renaming 'link' node to 'endpoint, > - renaming 'remote' phandle to 'remote-endpoint', > - file v4l2.txt renamed to video-interfaces.txt, > - removed references to V4L2, > - added short description of the example DT snippet > > and additionally: > - added "Required properties' paragraph, > - updated description of 'data-lanes' property, > - renamed all erroneous occurrences of 'data-width' to 'bus-width', > - added 'bus-width' property description, > - modified description of hsync-active, vsync-active properties, > - added a little paragraph further explaining that each endpoint >node has properties determining configuration of its corresponding >device. > > [1] https://patchwork.kernel.org/patch/1514381/ > > I'm still unsure about the first sentence, as these bindings can be > used for describing SoC internal connections between modules as well. > > I was considering adding something like: > > "This document describes common bindings for video capture, processing > and output devices using data buses defined in standards like ITU-R > BT.656, MIPI CSI-2,..." > > before the "General concept" paragraph. > > And maybe Documentation/devicetree/bindings/video/ would a better place > for this video-interfaces.txt file ? > > Thanks, > Sylwester > --- > .../devicetree/bindings/media/video-interfaces.txt | 198 > > 1 files changed, 198 insertions(+), 0 deletions(-) > create mode 100644 > Documentation/devicetree/bindings/media/video-interfaces.txt > > diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt > b/Documentation/devicetree/bindings/media/video-interfaces.txt > new file mode 100644 > index 000..10ebbc4 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt > @@ -0,0 +1,198 @@ > +Common bindings for video data receiver and transmitter interfaces > + > +General concept > +--- > + > +Video data pipelines usually 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 their child 'port' > nodes. > +Configuration of a port depends on other devices participating in the data > +transfer and is described by 'endpoint' subnodes. > + > +dev { > + #address-cells = <1>; > + #size-cells = <0>; > + port@0 { > + endpoint@0 { ... }; > + endpoint@1 { ... }; > + }; > + port@1 { ... }; > +}; > + > +If a port can be configured to work with more than one other device on the > same > +bus, an 'endpoint' child node must be provided for each of them. If more > than > +one port is present in a device node or there is more than one endpoint at a > +port, a common scheme, using '#address-cells', '#size-cells' and 'reg' > properties > +is used. > + > +Two 'endpoint' nodes are linked with each other through their > 'remote-endpoint' > +phandles. An endpoint subnode of a device contains all properties needed for > +configuration of this device for data exchange with the other device. In > most > +cases properties at the peer 'endpoint' nodes will be identical, however > +they might need to be different when there are any signal modifications on > the > +bus between two devices, e.g. there are logic signal inverters on the lines. > + > +Required properties > +--- > + > +If there is more that one 'port' or more than one 'endpoint' node following > +properties are required in relevant parent node: > + > +- #address-cells : number of cells required to define port number, should be > 1. > +- #size-cells: should be zero. > + > +Optional endpoint properties > + > + > +- remote-endpoint : phandle to an 'endpoint' subnode of the other device > node. > +- slave-mode : a boolean property, run the link in slave mode. Default is > master > + mode. > +- bus-width : the number of data lines, valid for parallel buses. > +- data-shift: on parallel
Re: [PATCH] [media] Add common binding documentation for video interfaces
On 12/18/2012 06:14 PM, Stephen Warren wrote: On 12/15/2012 02:13 PM, Sylwester Nawrocki wrote: From: Guennadi Liakhovetski This patch adds a document describing common OF bindings for video capture, output and video processing devices. It is currently mainly focused on video capture devices, with data interfaces defined in standards like ITU-R BT.656 or MIPI CSI-2. It also documents a method of describing data links between devices. (quickly/briefly) Reviewed-by: Stephen Warren Thank you for the review. I'm just wondering if it is OK to merge this patch through the media tree, together with the remainder of this series. Or should it go through the device tree maintainer's tree ? -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] Add common binding documentation for video interfaces
On 12/15/2012 02:13 PM, Sylwester Nawrocki wrote: > From: Guennadi Liakhovetski > > This patch adds a document describing common OF bindings for video > capture, output and video processing devices. It is currently mainly > focused on video capture devices, with data interfaces defined in > standards like ITU-R BT.656 or MIPI CSI-2. > It also documents a method of describing data links between devices. (quickly/briefly) Reviewed-by: Stephen Warren -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] Add common binding documentation for video interfaces
From: Guennadi Liakhovetski This patch adds a document describing common OF bindings for video capture, output and video processing devices. It is currently mainly focused on video capture devices, with data interfaces defined in standards like ITU-R BT.656 or MIPI CSI-2. It also documents a method of describing data links between devices. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Sylwester Nawrocki --- Hi, This is an updated version of patch [1]. My changes include resolving issues pointed out during review, i.e.: - renaming 'link' node to 'endpoint, - renaming 'remote' phandle to 'remote-endpoint', - file v4l2.txt renamed to video-interfaces.txt, - removed references to V4L2, - added short description of the example DT snippet and additionally: - added "Required properties' paragraph, - updated description of 'data-lanes' property, - renamed all erroneous occurrences of 'data-width' to 'bus-width', - added 'bus-width' property description, - modified description of hsync-active, vsync-active properties, - added a little paragraph further explaining that each endpoint node has properties determining configuration of its corresponding device. [1] https://patchwork.kernel.org/patch/1514381/ I'm still unsure about the first sentence, as these bindings can be used for describing SoC internal connections between modules as well. I was considering adding something like: "This document describes common bindings for video capture, processing and output devices using data buses defined in standards like ITU-R BT.656, MIPI CSI-2,..." before the "General concept" paragraph. And maybe Documentation/devicetree/bindings/video/ would a better place for this video-interfaces.txt file ? Thanks, Sylwester --- .../devicetree/bindings/media/video-interfaces.txt | 198 1 files changed, 198 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/video-interfaces.txt diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt new file mode 100644 index 000..10ebbc4 --- /dev/null +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt @@ -0,0 +1,198 @@ +Common bindings for video data receiver and transmitter interfaces + +General concept +--- + +Video data pipelines usually 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 their child 'port' nodes. +Configuration of a port depends on other devices participating in the data +transfer and is described by 'endpoint' subnodes. + +dev { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + endpoint@0 { ... }; + endpoint@1 { ... }; + }; + port@1 { ... }; +}; + +If a port can be configured to work with more than one other device on the same +bus, an 'endpoint' child node must be provided for each of them. If more than +one port is present in a device node or there is more than one endpoint at a +port, a common scheme, using '#address-cells', '#size-cells' and 'reg' properties +is used. + +Two 'endpoint' nodes are linked with each other through their 'remote-endpoint' +phandles. An endpoint subnode of a device contains all properties needed for +configuration of this device for data exchange with the other device. In most +cases properties at the peer 'endpoint' nodes will be identical, however +they might need to be different when there are any signal modifications on the +bus between two devices, e.g. there are logic signal inverters on the lines. + +Required properties +--- + +If there is more that one 'port' or more than one 'endpoint' node following +properties are required in relevant parent node: + +- #address-cells : number of cells required to define port number, should be 1. +- #size-cells: should be zero. + +Optional endpoint properties + + +- remote-endpoint : phandle to an 'endpoint' subnode of the other device node. +- slave-mode : a boolean property, run the link in slave mode. Default is master + mode. +- bus-width : the number of data lines, valid for parallel buses. +- data-shift: on parallel data busses, if bus-width is used to specify the + number of data lines, data-shift can be used to specify which data lines are + used, e.g. "bus-width=<10>; data-shift=<2>;" means, that lines 9:2 are used. +- hsync-active : active state of HSYNC signal, 0/1 for LOW/HIGH respectively. +- vsync-active : active state of VSYNC signal, 0/1 for LOW/HIGH respectively. + Note, that if HSYNC and VSYNC pol