From patchwork Wed Feb 6 10:25:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 157599 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6240745jaa; Wed, 6 Feb 2019 02:26:15 -0800 (PST) X-Google-Smtp-Source: AHgI3IalgVPtEptb0YPWPxi8uSMs+5N203bCSFLFG/df7T/q6WpqHKyPGqu7kdpL9bL2CF8+Rh9R X-Received: by 2002:aa7:8759:: with SMTP id g25mr726006pfo.248.1549448775366; Wed, 06 Feb 2019 02:26:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549448775; cv=none; d=google.com; s=arc-20160816; b=S/LoScKtzVt+4JG8yOV+Abzj09VcpnfOf4sy2yEoypfuNw7crscLHOsv2nOCKpX6/B VrzF/uU5ocFalOxc4w3aY+H/+xuR/C4SukkHp5Bf1UnA5exmhvV3vh8YewVG/7wWSDcv 3SGcjbP2BVPnYzF9uhCiryqpzjd1M+kYICULodJUoo+jHZwFyJjVYterg87pL7wbkqAW FMp0lYs1lHOZhp/ylWii4VEMd4id9sAatVEvHJCoxjvN1mWGn9Vrt7Z4Lohna4mnY/k6 qcDyPF0gc60DoPnNzyqY4xsrUNX+fEZdZVE2XRhcuD2y775Zd9WwFj2YOY5B8SYnXtOa QHEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aThCrwrFteI0wzip9ugvjHUOdfJZCazMyUiwd8Wh9g0=; b=OlD7QN9WABuEMXS69ezgRZayI66gxaKE0lw/jhkT/T5d5aKQw9OhHlfw4JrSteRXbU U6jR0N92zHMXQA1h2F/zqojuizj0lKwgUPUmmIw/nFGX+8Q2AuB0vTAAT2rqfYJS/Ikk X72qeP692uEW0Gy9hWy5AclY2g1YqM2X6x/HLQTOudxX8hL937Ormm627IgdVXxjvu7s 4l4ePyrEn5Uw/3iE8+vQFGgRmbrRC2uyn4jQscTgczr6ia6XjYD+8orxhoPJWxFHp+it zd2jfakDI14AUUlZsynLWrYoB1FJ4dk29del5mq6uk9kbC2pHy9rs45ugLWrR+jtkK+F quyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LoL1gIrH; 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=pass (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 90si776785plf.62.2019.02.06.02.26.15; Wed, 06 Feb 2019 02:26:15 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=LoL1gIrH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727120AbfBFK0O (ORCPT + 7 others); Wed, 6 Feb 2019 05:26:14 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55774 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729393AbfBFK0N (ORCPT ); Wed, 6 Feb 2019 05:26:13 -0500 Received: by mail-wm1-f65.google.com with SMTP id y139so1844870wmc.5 for ; Wed, 06 Feb 2019 02:26:11 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=aThCrwrFteI0wzip9ugvjHUOdfJZCazMyUiwd8Wh9g0=; b=LoL1gIrHfZWCjqNarlfvxFsUpBzjCRto2TElfuchiZ5Hdq+Nds6l/qtVcRP+EVvZtV QODO60LuGb7wvgnesplbwIigT7SON9mOjZrMM3z6wnJXmpLCL8kmRKODKn9eIsQFZ+is zZwWaPWeeFBOFJ28PYn8e6PvrY4/jv+OnUiDTFH35PlRGYtPmZQnsLYVj/baWJ3HsaIU 2EKkVODRExPIakl3SE434rGMy453/W+vO/n/QTOt8E6fuqy77dusFWw26dzXy+SzNpP2 9Y5/7b2c72H5ZJ8GbgbksxM2KU/mTrMtKHxMMJOvtRkiE4459ZM3h12T31pERepTcL+T z2Zw== 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:mime-version:content-transfer-encoding; bh=aThCrwrFteI0wzip9ugvjHUOdfJZCazMyUiwd8Wh9g0=; b=As3urHXXOFUjDKkzkMgKugg+WlytewZqVI5M9BCndMta+uCKuXMqV6lqcU3ipcR5KV 8DcZ9bZHZD9blP3lRN1XDnhEZGI+XTgrZV4MQvTjobBJ1VZV1TF4MXvPzTxUfR3R73CC kiclqDcBkAKzJt6xnpL4I0uLcEavdN0dYMCqS3LsvymQpwvWagVrBXa9AZh0QyNoLDwr zPuPna9PHa3e6TV9d3Mkwnf4X4H+6NiY4z/AJSm7e6mBWzgxS51syUW6zgWtqlLVuGZN wz5bzlNdadV+xGrhnJ0m+YPA+VLnX1S7893C+x6iskzVkc2iW3kWNz9ZzuUMHzBFve4g enjA== X-Gm-Message-State: AHQUAua2kZK2+gTS0vTlSdAHeA+8UuPmuuDOkIBVDRhk/EhuVQvHoUaL Dm5NM9V0ay/Emj7FDDh8d8HuKg== X-Received: by 2002:a7b:c30b:: with SMTP id k11mr1118346wmj.65.1549448771071; Wed, 06 Feb 2019 02:26:11 -0800 (PST) Received: from arch-late.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id i192sm18149631wmg.7.2019.02.06.02.26.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Feb 2019 02:26:10 -0800 (PST) From: Rui Miguel Silva To: sakari.ailus@linux.intel.com, Steve Longerbeam , Hans Verkuil , Philipp Zabel Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, Greg Kroah-Hartman , Rui Miguel Silva Subject: [PATCH v13 10/13] media: imx7.rst: add documentation for i.MX7 media driver Date: Wed, 6 Feb 2019 10:25:19 +0000 Message-Id: <20190206102522.29212-11-rui.silva@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206102522.29212-1-rui.silva@linaro.org> References: <20190206102522.29212-1-rui.silva@linaro.org> MIME-Version: 1.0 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 Acked-by: Sakari Ailus --- 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.20.1 diff --git a/Documentation/media/v4l-drivers/imx7.rst b/Documentation/media/v4l-drivers/imx7.rst new file mode 100644 index 000000000000..cd1195d391c5 --- /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 are less feature rich. + +For image capture the i.MX7 has 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 receiver 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 supports two D-PHY Rx Data lanes. + +csi_mux +------- + +This is the video multiplexer. It has two sink pads to select from either camera +sensor 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 interface 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 receives from the csi_mux entity and a single +source pad that routes 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 f28570ec9e42..dfd4b205937c 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 ipu3 ivtv max2175