Re: [RFC/PATCH 12/13] media: s5p-fimc: Add device tree based sensors registration
On Fri, 25 May 2012, Sylwester Nawrocki wrote: > Add parsing of 'sensor' nodes specified as 'camera' child nodes. > Each 'sensor' node should contain a phandle indicating sensor I2C > client device. Sensors with SPI control bus are not yet supported. > > Additionally it is required that the I2C client node (child node > of I2C bus controller node) contains 'clock-frequency' and > 'video-bus-type' properties. These properties allow the host > controller to switch to proper video bus and set proper master > clock frequency for a sensor. > > Signed-off-by: Sylwester Nawrocki > Signed-off-by: Kyungmin Park > --- > > We might need something like this as a V4L2 core function. > But I wanted to have something settled first until proposing > any addtions to the V4L2 core modules. > --- > .../bindings/camera/soc/samsung-fimc.txt | 22 > drivers/media/video/s5p-fimc/fimc-mdevice.c| 114 > +++- > 2 files changed, 133 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/camera/soc/samsung-fimc.txt > b/Documentation/devicetree/bindings/camera/soc/samsung-fimc.txt > index b459da2..ffe09ac 100644 > --- a/Documentation/devicetree/bindings/camera/soc/samsung-fimc.txt > +++ b/Documentation/devicetree/bindings/camera/soc/samsung-fimc.txt > @@ -54,6 +54,28 @@ Required properties: > - cell-index : FIMC-LITE IP instance index; > > > +The 'sensor' nodes > +-- > + > +Required properties: > + > + - i2c-client : a phandle to an image sensor I2C client device; > + > +Optional properties: > + > +- samsung,camif-mux-id : FIMC video multiplexer input index; for camera > + port A, B, C the indexes are 0, 1, 0 respectively. > + If this property is not specified a default 0 > + value will be used by driver. Isn't it possible to have several clients connected to different mux inputs and switch between them at run-time? Even if only one of them can be active at any time? That's why I've introduced link nodes in my RFC to specify exactly which pads are connected. > + > +- samsung,fimc-camclk-id : the SoC CAM_MCLK clock output index. These clocks > +are master clocks for external image processors. > +If this property is not specified a default 0 value > +will be used by driver. > + > + "video-bus-type" and "clock-frequency" properties must be specified at the > + node referenced by 'i2c-client' phandle. > + > Example: > > fimc0: fimc@1180 { Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- 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: [RFC/PATCH 12/13] media: s5p-fimc: Add device tree based sensors registration
On 07/16/2012 11:51 AM, Guennadi Liakhovetski wrote: [...] diff --git a/Documentation/devicetree/bindings/camera/soc/samsung-fimc.txt b/Documentation/devicetree/bindings/camera/soc/samsung-fimc.txt index b459da2..ffe09ac 100644 --- a/Documentation/devicetree/bindings/camera/soc/samsung-fimc.txt +++ b/Documentation/devicetree/bindings/camera/soc/samsung-fimc.txt @@ -54,6 +54,28 @@ Required properties: - cell-index : FIMC-LITE IP instance index; +The 'sensor' nodes +-- + +Required properties: + + - i2c-client : a phandle to an image sensor I2C client device; + +Optional properties: + +- samsung,camif-mux-id : FIMC video multiplexer input index; for camera +port A, B, C the indexes are 0, 1, 0 respectively. +If this property is not specified a default 0 +value will be used by driver. Isn't it possible to have several clients connected to different mux inputs and switch between them at run-time? Even if only one of them can be active at any time? That's why I've introduced link nodes in my RFC to specify exactly which pads are connected. Yes, of course it is. For such a configuration there would be multiple 'sensor' nodes and each of them would contain a 'samsung,camif-mux-id' determining camera port the corresponding sensor/encoder is wired to. Then switching between the sensors would be possible by setting up a proper media link (or just through VIDIOC_S_INPUT ioctl, if that's feasible) and then writing the mux input index and the camera port type values to the control registers (in this specific case ports A,B (index 0, 1) are parallel and port C (index 0) is a serial port). Thus using only input index wouldn't be sufficient to do the sensors switch over. -- Thanks, Sylwester -- 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