From patchwork Mon May 7 16:21:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 135117 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp3356509lji; Mon, 7 May 2018 09:23:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo8UskuLI4pG6jaGuiMaVK59QRF1pvDAO92epsCToaejfUrD0hVIk4IQuntn9lk4DGPNCBt X-Received: by 2002:a6b:dcd:: with SMTP id 196-v6mr39313329ion.92.1525710186174; Mon, 07 May 2018 09:23:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525710186; cv=none; d=google.com; s=arc-20160816; b=TUH7enMIQxjbPbaArJsnawdnzpt4llfbg71fop2zPRR+Xf8DZPC30rInGKCHTZJVEU I5Hau2TRZ9JXJ86FoGojxqQoFtwoyD8y1dLMiKLaQnLS1b3yOCzoCiDdWaBAqXDmAGwG GZucaC/gEif6/24qXatZxkA2Uorof0diTLZdoAY6uw5JuZku1xl5BGvZPQT+XcIS05rb G/Znle98U9wJSKZ0Bc/leL1KJNPqCZSO099L28HY9kZxcOLr5inTW1ScmiL8YrLTAnTC 9ztAGrjhc1/CphIjQN0qqp64JzkNP6c3aIDgPNA6VOuQqALsIN2Jt0oL3uSa6yH/e5XA KRfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=IZlL1izQ1PXTsYfR1ata6cZ5afDafsRaFs14jeyhV1I=; b=A+c4ol+zutt4Q12661Wk6p3gnRMTgZwF6hYTLbgf4YzjcEWK/AytDytOKvzK9BsgYF TPVf1XghyOA4SLK5oGddVkWw/M8eaNGmNdJ9CfiE4Q6Y5kZWjPZARpMhiuWVQEwm5FiH qCQhKo+trmBWFKmSCThTA3Q3npJMIH/1pGyINRiPiJk8+PB+3jMIihkLp1Be/AAhNHft 5tAsWc7CFxV5/6ZZ1udqYJKW3DRVMvPL+SZKncjrfG5cXI+zN2IrE7jF4i/JiKZHmHbr 14HD1qAC/yF6D/DMpQ34ItkMpWb5Ibbnxfun1iOYhAXx0ir+yjuh0JJUyYIZkdS0NzQy QvBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=khdcUs2e; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v125-v6si7612679ith.144.2018.05.07.09.23.05; Mon, 07 May 2018 09:23:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=khdcUs2e; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752603AbeEGQXE (ORCPT + 6 others); Mon, 7 May 2018 12:23:04 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:55851 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbeEGQXC (ORCPT ); Mon, 7 May 2018 12:23:02 -0400 Received: by mail-wm0-f67.google.com with SMTP id a8so14334586wmg.5 for ; Mon, 07 May 2018 09:23:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xqDB+wJgdnken53wSy9TUWUI1dKxrBpe4AGVjuPv7bo=; b=khdcUs2e1Ai4D5/e+oMrPiXScj08wcbulLrv3Ey9726EdX44eI4e+nFLJUnp+ahmsn QnAsOXIHV5J3tADG1oM5TDNqdsi7F8ViKKlMCiItQZwi2dnmFn95yD3hBBA50O3Ef+Gs +C+hX3U1SrlYJCyT1JhAFbKAPR0L0J0JQtgPc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xqDB+wJgdnken53wSy9TUWUI1dKxrBpe4AGVjuPv7bo=; b=KCDk8Eabt9oEg2bEaDPdVjvbO08h0IsHQcliRpo/i86s5UiBoxPZcy7zx8mcx1iwzN VcqvD4umEVlg2e7CCOeZio81UGY7nwlpTnnPunz0DDOapn04CHnWZ+EPmr2+g2tjhINa IT/LVfv3A4YgUlEtu719Qa2owX6TYe8u4FH2o9bYX6xBuCFF198CSl8NtDXJcQpNdJca bR877SUaA5SQ1el1uXBrJ2Ex/DW2rX++3c0x6T5+xeWCHNVXuMDdz+QeNW0fraY4jZCk f0CsupWesvPQCW+sUaXhj6HaA2LzUZpZRGI49DmzOV40PgXEuFwNaXh+jJLyuZRPVcb3 Ejhg== X-Gm-Message-State: ALKqPwesuKUBUDvhvktvi2F5bbKNc5plkT4baGwPUSPEfUkTpM/RhXKh V3FJpayH2PGtpiD94aWnxiCC2g== X-Received: by 2002:a1c:16ca:: with SMTP id 193-v6mr1155962wmw.37.1525710180950; Mon, 07 May 2018 09:23:00 -0700 (PDT) Received: from arch-late.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id b11-v6sm26410251wrf.50.2018.05.07.09.22.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 May 2018 09:23:00 -0700 (PDT) From: Rui Miguel Silva To: mchehab@kernel.org, sakari.ailus@linux.intel.com, Steve Longerbeam , Philipp Zabel , Rob Herring Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, Shawn Guo , Fabio Estevam , devicetree@vger.kernel.org, Greg Kroah-Hartman , Ryan Harkin , Rui Miguel Silva Subject: [PATCH v3 13/14] media: imx7.rst: add documentation for i.MX7 media driver Date: Mon, 7 May 2018 17:21:51 +0100 Message-Id: <20180507162152.2545-14-rui.silva@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180507162152.2545-1-rui.silva@linaro.org> References: <20180507162152.2545-1-rui.silva@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add rst document to describe the i.MX7 media driver and also a working example from the Warp7 board usage with a OV2680 sensor. Signed-off-by: Rui Miguel Silva --- Documentation/media/v4l-drivers/imx7.rst | 157 ++++++++++++++++++++++ Documentation/media/v4l-drivers/index.rst | 1 + 2 files changed, 158 insertions(+) create mode 100644 Documentation/media/v4l-drivers/imx7.rst -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/media/v4l-drivers/imx7.rst b/Documentation/media/v4l-drivers/imx7.rst new file mode 100644 index 000000000000..64b97b442277 --- /dev/null +++ b/Documentation/media/v4l-drivers/imx7.rst @@ -0,0 +1,157 @@ +i.MX7 Video Capture Driver +========================== + +Introduction +------------ + +The i.MX7 contrary to the i.MX5/6 family does not contain an Image Processing +Unit (IPU), because of that the capabilities to perform operations or +manipulation of the capture frames is less feature rich. + +For image capture the i.MX7 have three units: +- CMOS Sensor Interface (CSI) +- Video Multiplexer +- MIPI CSI-2 Receiver + +:: + |\ + MIPI Camera Input ---> MIPI CSI-2 --- > | \ + | \ + | M | + | U | ------> CSI ---> Capture + | X | + | / + Parallel Camera Input ----------------> | / + |/ + +For additional information, please refer to the latest versions of the i.MX7 +reference manual [#f1]_. + +Entities +-------- + +imx7-mipi-csi2 +-------------- + +This is the MIPI CSI-2 recevier entity. It has one sink pad to receive the pixel +data from MIPI CSI-2 camera sensor. It has one source pad, corresponding to the +virtual channel 0. This module is compliant to previous version of Samsung +D-phy, and support two D-PHY Rx Data lanes. + +csi_mux +------- + +This is the video multiplexer. It has two sink pads to select from either camera +sensors with a parallel interface or from MIPI CSI-2 virtual channel 0. It has +a single source pad that routes to the CSI. + +csi +--- + +The CSI enables the chip to connect directly to external CMOS image sensor. CSI +can interfaces directly with Parallel and MIPI CSI-2 buses. It has 256 x 64 FIFO +to store received image pixel data and embedded DMA controllers to transfer data +from the FIFO through AHB bus. + +This entity has one sink pad that receive from the csi_mux entity and a single +source pad that route video frames directly to memory buffers, this pad is +routed to a capture device node. + +Usage Notes +----------- + +To aid in configuration and for backward compatibility with V4L2 applications +that access controls only from video device nodes, the capture device interfaces +inherit controls from the active entities in the current pipeline, so controls +can be accessed either directly from the subdev or from the active capture +device interface. For example, the sensor controls are available either from the +sensor subdevs or from the active capture device. + +Warp7 with OV2680 +----------------- + +On this platform an OV2680 MIPI CSI-2 module is connected to the internal MIPI +CSI-2 receiver. The following example configures a video capture pipeline with +an output of 800x600, and BGGR 10 bit bayer format: + +.. code-block:: none + # Setup links + media-ctl -l "'ov2680 1-0036':0 -> 'imx7-mipi-csis.0':0[1]" + media-ctl -l "'imx7-mipi-csis.0':1 -> 'csi_mux':1[1]" + media-ctl -l "'csi_mux':2 -> 'csi':0[1]" + media-ctl -l "'csi':1 -> 'csi capture':0[1]" + + # Configure pads for pipeline + media-ctl -V "'ov2680 1-0036':0 [fmt:SBGGR10_1X10/800x600 field:none]" + media-ctl -V "'csi_mux':1 [fmt:SBGGR10_1X10/800x600 field:none]" + media-ctl -V "'csi_mux':2 [fmt:SBGGR10_1X10/800x600 field:none]" + media-ctl -V "'imx7-mipi-csis.0':0 [fmt:SBGGR10_1X10/800x600 field:none]" + media-ctl -V "'csi':0 [fmt:SBGGR10_1X10/800x600 field:none]" + +After this streaming can start, the v4l2-ctl tool can be used to select any of +the resolutions supported by the sensor. + +.. code-block:: none + root@imx7s-warp:~# media-ctl -p + Media controller API version 4.17.0 + + Media device information + ------------------------ + driver imx-media + model imx-media + serial + bus info + hw revision 0x0 + driver version 4.17.0 + + Device topology + - entity 1: csi (2 pads, 2 links) + type V4L2 subdev subtype Unknown flags 0 + device node name /dev/v4l-subdev0 + pad0: Sink + [fmt:SBGGR10_1X10/800x600 field:none] + <- "csi_mux":2 [ENABLED] + pad1: Source + [fmt:SBGGR10_1X10/800x600 field:none] + -> "csi capture":0 [ENABLED] + + - entity 4: csi capture (1 pad, 1 link) + type Node subtype V4L flags 0 + device node name /dev/video0 + pad0: Sink + <- "csi":1 [ENABLED] + + - entity 10: csi_mux (3 pads, 2 links) + type V4L2 subdev subtype Unknown flags 0 + device node name /dev/v4l-subdev1 + pad0: Sink + [fmt:unknown/0x0] + pad1: Sink + [fmt:unknown/800x600 field:none] + <- "imx7-mipi-csis.0":1 [ENABLED] + pad2: Source + [fmt:unknown/800x600 field:none] + -> "csi":0 [ENABLED] + + - entity 14: imx7-mipi-csis.0 (2 pads, 2 links) + type V4L2 subdev subtype Unknown flags 0 + device node name /dev/v4l-subdev2 + pad0: Sink + [fmt:SBGGR10_1X10/800x600 field:none] + <- "ov2680 1-0036":0 [ENABLED] + pad1: Source + [fmt:SBGGR10_1X10/800x600 field:none] + -> "csi_mux":1 [ENABLED] + + - entity 17: ov2680 1-0036 (1 pad, 1 link) + type V4L2 subdev subtype Sensor flags 0 + device node name /dev/v4l-subdev3 + pad0: Source + [fmt:SBGGR10_1X10/800x600 field:none] + -> "imx7-mipi-csis.0":0 [ENABLED] + + +References +---------- + +.. [#f1] https://www.nxp.com/docs/en/reference-manual/IMX7SRM.pdf diff --git a/Documentation/media/v4l-drivers/index.rst b/Documentation/media/v4l-drivers/index.rst index 679238e786a7..693295bbc53f 100644 --- a/Documentation/media/v4l-drivers/index.rst +++ b/Documentation/media/v4l-drivers/index.rst @@ -44,6 +44,7 @@ For more details see the file COPYING in the source distribution of Linux. davinci-vpbe fimc imx + imx7 ivtv max2175 meye