Re: [PATCH v7 01/13] [media] exynos5-is: Adding media device driver for exynos5
Hi Sylwester, On Wed, Sep 18, 2013 at 2:20 AM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: Hi Arun, On 09/17/2013 01:29 PM, Arun Kumar K wrote: Wont this make fimc-is to be enabled to use fimc-lite? Hmm, it would be runtime PM active, yes. But it doesn't mean the Cortex-A5's firmware would need to be running. As such there is no dependency like that in hardware and we can use fimc-lite alone in DMA out mode without fimc-is. If you are sure about it, then fimc-lite nodes could stay at root level. Still, it would be more appropriate IMO to have the FIMC-IS sub-/peripheral devices, like I2C or SPI bus controllers, instantiated by the FIMC-IS driver. Yes I2C and SPI bus controllers are part of FIMC-IS and it can be instantiated within the FIMC-IS driver. And what about glue logic linking FIMC-LITEs with the rest of the imaging subsystem ? Are you sure the is no some weird inter-dependencies ? Note that there is no board files any more, where we could hack some details. There is no dependency like that which I am aware of and we have tested here mipi fimc-lite without fimc-is and it worked well. If its modified as per your suggestion, how will the scenario of sensor - mipi-csis - fimc-lite - memory look like without fimc-is? The exynos5-fimc-is module would need to be loaded for that. If you're sure the hardware can work independently, we could leave out the fimc-lite nodes at root level. Yes sensor- mipi - fimc-lite - memory without fimc-is is very well possible in Exynos5 and its tested. So I will make the remaining changes you suggested and send new patchset. Regards Arun -- 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 v7 01/13] [media] exynos5-is: Adding media device driver for exynos5
Hi Sylwester, I'd like to propose a little re-design of this binding. The reason is that I've noticed issues related to the power domain and FIMC-LITE, FIMC-IS clocks handling sequences. This lead to a failure to disable the ISP power domain and to complete the system suspend/resume cycle. Not sure if this happens on Exynos5 SoCs, nevertheless IMHO it would be more reasonable to make FIMC-LITE device nodes child nodes of FIMC-IS. FIMC-LITE seems to be an integral part of the FIMC-IS subsystem. Then fimc-is node would be placed at root level, with fimc-lite nodes as its subnodes: fimc-is { compatible = exynos5250-fimc-is; reg = ...; ... #address-cells = 1; #size-cells = 1; ranges; fimc_lite_0: fimc-lite@1239 { compatible = samsung,exynos4212-fimc-lite; ... }; fimc_lite_1: fimc-lite@123A { compatible = samsung,exynos4212-fimc-lite; ... }; fimc_lite_2: fimc-lite@123B { compatible = samsung,exynos4212-fimc-lite; ... }; i2c0_isp: i2c-isp@1213 { ... }; ... }; Wont this make fimc-is to be enabled to use fimc-lite? As such there is no dependency like that in hardware and we can use fimc-lite alone in DMA out mode without fimc-is. If its modified as per your suggestion, how will the scenario of sensor - mipi-csis - fimc-lite - memory look like without fimc-is? Regards Arun -- 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 v7 01/13] [media] exynos5-is: Adding media device driver for exynos5
Hi Arun, On 09/17/2013 01:29 PM, Arun Kumar K wrote: Wont this make fimc-is to be enabled to use fimc-lite? Hmm, it would be runtime PM active, yes. But it doesn't mean the Cortex-A5's firmware would need to be running. As such there is no dependency like that in hardware and we can use fimc-lite alone in DMA out mode without fimc-is. If you are sure about it, then fimc-lite nodes could stay at root level. Still, it would be more appropriate IMO to have the FIMC-IS sub-/peripheral devices, like I2C or SPI bus controllers, instantiated by the FIMC-IS driver. And what about glue logic linking FIMC-LITEs with the rest of the imaging subsystem ? Are you sure the is no some weird inter-dependencies ? Note that there is no board files any more, where we could hack some details. If its modified as per your suggestion, how will the scenario of sensor - mipi-csis - fimc-lite - memory look like without fimc-is? The exynos5-fimc-is module would need to be loaded for that. If you're sure the hardware can work independently, we could leave out the fimc-lite nodes at root level. Regards, 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
Re: [PATCH v7 01/13] [media] exynos5-is: Adding media device driver for exynos5
Hi, On 08/21/2013 08:34 AM, Arun Kumar K wrote: +++ b/Documentation/devicetree/bindings/media/exynos5250-camera.txt @@ -0,0 +1,126 @@ +Samsung EXYNOS5 SoC Camera Subsystem + + +The Exynos5 SoC Camera subsystem comprises of multiple sub-devices +represented by separate device tree nodes. Currently this includes: FIMC-LITE, +MIPI CSIS and FIMC-IS. + +The sub-device nodes are referenced using phandles in the common 'camera' node +which also includes common properties of the whole subsystem not really +specific to any single sub-device, like common camera port pins or the common +camera bus clocks. + +Common 'camera' node + + +Required properties: + +- compatible : must be samsung,exynos5250-fimc +- clocks : list of clock specifiers, corresponding to entries in + the clock-names property +- clock-names : must contain sclk_bayer entry +- samsung,csis : list of phandles to the mipi-csis device nodes +- samsung,fimc-lite: list of phandles to the fimc-lite device nodes +- samsung,fimc-is : phandle to the fimc-is device node + +The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used +to define a required pinctrl state named default. + +'parallel-ports' node +- + +This node should contain child 'port' nodes specifying active parallel video +input ports. It includes camera A, camera B and RGB bay inputs. +'reg' property in the port nodes specifies the input type: + 1 - parallel camport A + 2 - parallel camport B + 5 - RGB camera bay + +3, 4 are for MIPI CSI-2 bus and are already described in samsung-mipi-csis.txt + +Image sensor nodes +-- + +The sensor device nodes should be added to their control bus controller (e.g. +I2C0) nodes and linked to a port node in the csis or the parallel-ports node, +using the common video interfaces bindings, defined in video-interfaces.txt. + +Example: [...] + /* MIPI CSI-2 bus IF sensor */ + s5c73m3: sensor@1a { ... + port { + s5c73m3_1: endpoint { + data-lanes =1 2 3 4; + remote-endpoint =csis0_ep; + }; + }; + }; + + camera { + compatible = samsung,exynos5250-fimc; + #address-cells =1; + #size-cells =1; + status = okay; + + pinctrl-names = default; + pinctrl-0 =cam_port_a_clk_active; + + samsung,csis =csis_0,csis_1; + samsung,fimc-lite =fimc_lite_0,fimc_lite_1,fimc_lite_2; + samsung,fimc-is =fimc_is; + + /* parallel camera ports */ + parallel-ports { + /* camera A input */ + port@1 { + reg =1; + camport_a_ep: endpoint { + remote-endpoint =s5k6aa_ep; + bus-width =8; + hsync-active =0; + vsync-active =1; + pclk-sample =1; + }; + }; + }; + }; I'd like to propose a little re-design of this binding. The reason is that I've noticed issues related to the power domain and FIMC-LITE, FIMC-IS clocks handling sequences. This lead to a failure to disable the ISP power domain and to complete the system suspend/resume cycle. Not sure if this happens on Exynos5 SoCs, nevertheless IMHO it would be more reasonable to make FIMC-LITE device nodes child nodes of FIMC-IS. FIMC-LITE seems to be an integral part of the FIMC-IS subsystem. Then fimc-is node would be placed at root level, with fimc-lite nodes as its subnodes: fimc-is { compatible = exynos5250-fimc-is; reg = ...; ... #address-cells = 1; #size-cells = 1; ranges; fimc_lite_0: fimc-lite@1239 { compatible = samsung,exynos4212-fimc-lite; ... }; fimc_lite_1: fimc-lite@123A { compatible = samsung,exynos4212-fimc-lite; ... }; fimc_lite_2: fimc-lite@123B { compatible = samsung,exynos4212-fimc-lite; ... }; i2c0_isp: i2c-isp@1213 { ... }; ... }; Once FIMC-IS driver has probed it would call of_platform_populate() and would instantiate all FIMC-IS subsystem sub-devices, including FIMC-LITEs. I think it's more correct from the hardware structure point of view and it would allow us to have the required control on the initialization and power/ clock sequences. Especially that you might not be able to control the order of registration of
Re: [PATCH v7 01/13] [media] exynos5-is: Adding media device driver for exynos5
On 08/21/2013 08:34 AM, Arun Kumar K wrote: From: Shaik Ameer Bashashaik.am...@samsung.com This patch adds support for media device for EXYNOS5 SoCs. The current media device supports the following ips to connect through the media controller framework. * MIPI-CSIS Support interconnection(subdev interface) between devices * FIMC-LITE Support capture interface from device(Sensor, MIPI-CSIS) to memory Support interconnection(subdev interface) between devices * FIMC-IS Camera post-processing IP having multiple sub-nodes. G-Scaler will be added later to the current media device. The media device creates two kinds of pipelines for connecting the above mentioned IPs. The pipeline0 is uses Sensor, MIPI-CSIS and FIMC-LITE which captures image data and dumps to memory. Pipeline1 uses FIMC-IS components for doing post-processing operations on the captured image and give scaled YUV output. Pipeline0 ++ +---+ +---+ ++ | Sensor | -- | MIPI-CSIS | -- | FIMC-LITE | -- | Memory | ++ +---+ +---+ ++ Pipeline1 ++ ++ +---+ +---+ | Memory | -- | ISP | -- |SCC| -- |SCP| ++ ++ +---+ +---+ Signed-off-by: Shaik Ameer Bashashaik.am...@samsung.com Signed-off-by: Arun Kumar Karun...@samsung.com --- .../bindings/media/exynos5250-camera.txt | 126 ++ drivers/media/platform/exynos5-is/exynos5-mdev.c | 1210 drivers/media/platform/exynos5-is/exynos5-mdev.h | 126 ++ 3 files changed, 1462 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/exynos5250-camera.txt create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.c create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.h diff --git a/Documentation/devicetree/bindings/media/exynos5250-camera.txt b/Documentation/devicetree/bindings/media/exynos5250-camera.txt new file mode 100644 index 000..09420ba --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos5250-camera.txt @@ -0,0 +1,126 @@ +Samsung EXYNOS5 SoC Camera Subsystem + + +The Exynos5 SoC Camera subsystem comprises of multiple sub-devices +represented by separate device tree nodes. Currently this includes: FIMC-LITE, +MIPI CSIS and FIMC-IS. + +The sub-device nodes are referenced using phandles in the common 'camera' node +which also includes common properties of the whole subsystem not really +specific to any single sub-device, like common camera port pins or the common +camera bus clocks. + +Common 'camera' node + + +Required properties: + +- compatible : must be samsung,exynos5250-fimc +- clocks : list of clock specifiers, corresponding to entries in + the clock-names property +- clock-names : must contain sclk_bayer entry +- samsung,csis : list of phandles to the mipi-csis device nodes +- samsung,fimc-lite: list of phandles to the fimc-lite device nodes +- samsung,fimc-is : phandle to the fimc-is device node + +The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used +to define a required pinctrl state named default. + +'parallel-ports' node +- + +This node should contain child 'port' nodes specifying active parallel video +input ports. It includes camera A, camera B and RGB bay inputs. +'reg' property in the port nodes specifies the input type: + 1 - parallel camport A + 2 - parallel camport B + 5 - RGB camera bay + +3, 4 are for MIPI CSI-2 bus and are already described in samsung-mipi-csis.txt + +Image sensor nodes +-- + +The sensor device nodes should be added to their control bus controller (e.g. +I2C0) nodes and linked to a port node in the csis or the parallel-ports node, +using the common video interfaces bindings, defined in video-interfaces.txt. + +Example: + + aliases { + fimc-lite0 =fimc_lite_0 + }; + + /* Parallel bus IF sensor */ + i2c_0: i2c@1386 { + s5k6aa: sensor@3c { + compatible = samsung,s5k6aafx; + reg =0x3c; + vddio-supply =...; + + clock-frequency =2400; + clocks =...; + clock-names = mclk; + + port { + s5k6aa_ep: endpoint { + remote-endpoint =fimc0_ep; + bus-width =8; + hsync-active =0; + vsync-active =1; + pclk-sample =1; + }; + }; + }; + }; + + /* MIPI CSI-2 bus IF sensor */ +