From patchwork Mon May 7 16:21:38 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: 135104 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp3355601lji; Mon, 7 May 2018 09:22:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq40AO8sypGlk4jB90QTDQ1OySlyvb7jj14lHUOKHqTa9t9XyNs8w2ucTT6Eph2PCm5IYqP X-Received: by 2002:a24:e56:: with SMTP id 83-v6mr1917960ite.16.1525710137350; Mon, 07 May 2018 09:22:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525710137; cv=none; d=google.com; s=arc-20160816; b=Zs+FgwOsjidR9Ue0GGOO8b9fFHzjCbrRmfhwvJ97oVWsOpi+Dii73BbXCPbxjkpKvc UOm6y802eq8feVQ3AnXkVn6fDTmNSpgqv83n1krfHGTZi9N3+BoPpWFzv/ybvbLUeqkL vknwnagar9IE94udXRj6hMAEEZTDEqABd/x4TBlnev2WoMcWGuYOTmvj4EsUxK/VkDg+ y9of04l0TEUnlx2nPcaOk78cO/aSMcto4fDIJzk0rDmqHf6rY0qcsbtMQd82fd2RTjeq 33bkAaJTQIQHPdoB2KdXb+G3Ew6HcIyAMo7CDsd8ZVkEEsh+Fi1TLdp3D6X0yga2fcZ0 Uz8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=w+84xGCOcDH1f3Ri9S/CFHZsp3FxNwJktcMrK45T5vI=; b=hghkTp4uGqStjqHmDX/Pqk4NinriPGNDDprWSsFNFt380UzLZNXdEQGbyjoFdujSA5 ZvsYkHn5OJc/0dbz0pbs5rCtQRIGbUeBLrKpyIKbfvj/8l6Lh2yKz9LiSJS41WNUJhaL mLjKdgM23lPK+GBWfd3dzllk7/pRjx3uWtRURApYWg2omhY4ly8rNr3YgM9HBaK7OYSZ 8t/KkurqyNgCRPBUb6SPymEGHTdUoCJ/hdC6hRx5nQDRv3euuRtiGHbSkWs2EUdXEzRZ Mu0T3T2hFDXJmz063SFBzP0JJ2g2E6ruYNjotxkOpmS6gMPwmeX8Z2/vKpNweSRaSv8T cuSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gjVNtLho; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 y197-v6si7652419itc.69.2018.05.07.09.22.16; Mon, 07 May 2018 09:22:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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=gjVNtLho; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 S1752133AbeEGQWP (ORCPT + 5 others); Mon, 7 May 2018 12:22:15 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:51078 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752035AbeEGQWO (ORCPT ); Mon, 7 May 2018 12:22:14 -0400 Received: by mail-wm0-f52.google.com with SMTP id t11so14389095wmt.0 for ; Mon, 07 May 2018 09:22:13 -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; bh=w+84xGCOcDH1f3Ri9S/CFHZsp3FxNwJktcMrK45T5vI=; b=gjVNtLhowQX69mskLKl7JZIXW1Sl1fja34iohFUp/4KcV6kpD/iqQJJu38+fF1wxxn eOkaiflsQqCY2BVYbYoo1CA6O8jx7nznAzxfY9BRBzdDZtN6RhSXA35NMq4MyanTqqfo w8AvxNKJDUgaN0uazsmqu1oGyo9jczbcTUTH4= 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; bh=w+84xGCOcDH1f3Ri9S/CFHZsp3FxNwJktcMrK45T5vI=; b=hZIK+T2P4wlZiplbfp4YkQtsGGnzWps4elScZcsr+dPgyFBzKZdsvvXzauC8LMZPhc MnEH4hOdERegP+YR2MkzeTzISGobIvwVfK/frBTtJqSFH2QWz18R9iNz39OrykMTvzpY 20mReGqdTOI4FsIfHEa1Q8yBVZkzkGVSFp+6QbXHnGsNAnYYH2MEQMkmZ0NzGo6bKt6L xQW/c0LcM/wzG2QgFgyuUiHH0jWFJosQuZQEXmMaNLxziB2n7j18pOGmF8v5pC9Bl9H5 34Lryzx9zY6UApizjXSnC+FYY3xZrtCJS2zqmeizUGCyu/S+9VaejTjD0yxmwpJcNotM N8GQ== X-Gm-Message-State: ALKqPwcu++V4ZZYPyj+PBPODyA7DBeg2Qwln33f2jz268irZbeJtazMh ZmbPLny2g/pbx33oymiFCSW96Q== X-Received: by 10.28.59.212 with SMTP id i203mr1290343wma.41.1525710132438; Mon, 07 May 2018 09:22:12 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 May 2018 09:22:11 -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 00/14] media: staging/imx7: add i.MX7 media driver Date: Mon, 7 May 2018 17:21:38 +0100 Message-Id: <20180507162152.2545-1-rui.silva@linaro.org> X-Mailer: git-send-email 2.17.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi, This series introduces the Media driver to work with the i.MX7 SoC. it uses the already existing imx media core drivers but since the i.MX7, contrary to i.MX5/6, do not have an IPU and because of that some changes in the imx media core are made along this series to make it support that case. This patches adds CSI and MIPI-CSI2 drivers for i.MX7, along with several configurations changes for this to work as a capture subsystem. Some bugs are also fixed along the line. And necessary documentation. For a more detailed view of the capture paths, pads links in the i.MX7 please take a look at the documentation in PATCH 14. The system used to test and develop this was the Warp7 board with an OV2680 sensor, which output format is 10-bit bayer. So, only MIPI interface was tested, a scenario with an parallel input would nice to have. *Important note*, this code depends on Steve Longerbeam series [0]: [PATCH v3 00/13] media: imx: Switch to subdev notifiers which the merging status is not clear to me, but the changes in there make senses to this series Bellow goes an example of the output of the pads and links and the output of v4l2-compliance testing. The v4l-utils version used is: v4l2-compliance SHA : 47d43b130dc6e9e0edc900759fb37649208371e4 from Apr 4th. The Media Driver fail some tests but this failures are coming from code out of scope of this series (video-mux, imx-capture), and some from the sensor OV2680 but that I think not related with the sensor driver but with the testing and core. The csi and mipi-csi entities pass all compliance tests. Cheers, Rui [0]: https://www.mail-archive.com/linux-media@vger.kernel.org/msg128015.html v2->v3: Philipp Zabel: - use of_match_device in imx-media-dev instead of of_device_match - fix number of data lanes from 4 to 2 - change the clock definitions and use of mipi - move hs-settle from endpoint Rob Herring: - fix phy-supply description - add vendor properties - fix examples indentations Stephen Boyd: patch 3/14 - fix double sign-off - add fixes tag Dong Aisheng: patch 3/14 - fix double sign-off - add Acked-by tag Shawn Guo: patch 4/14 - remove line breakage in parent redifiniton - added Acked-by tag - dropped CMA area increase and add more verbose information in case of dma allocation failure patch 9/14 - remove extra line between cells and reg masks Myself: - rework on frame end in csi - add rxcount in csi driver - add power supplies to ov2680 node and fix gpio polarity v1->v2: Dan Carpenter: - fix return paths and codes; - fix clk_frequency validation and return code; - handle the csi remove (release resources that was missing) - revert the logic arround the ipu_present flag Philipp Zabel: - drop patch that changed the rgb formats and address the pixel/bus format in mipi_csis code. MySelf: - add patch that add ov2680 node to the warp7 dts, so the all data path is complete. - add linux-clk mailing list to the clock patches cc: 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:SBGGR10_1X10/800x600 field:none] <- "imx7-mipi-csis.0":1 [ENABLED] pad2: Source [fmt:SBGGR10_1X10/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] compliance tests: v4l2-compliance SHA : 47d43b130dc6e9e0edc900759fb37649208371e4 Compliance test for device /dev/media0: Media Driver Info: Driver name : imx-media Model : imx-media Serial : Bus info : Media version : 4.17.0 Hardware revision: 0x00000000 (0) Driver version : 4.17.0 Required ioctls: test MEDIA_IOC_DEVICE_INFO: OK Allow for multiple opens: test second /dev/media0 open: OK test MEDIA_IOC_DEVICE_INFO: OK test for unlimited opens: OK Media Controller ioctls: Entity: 0x00000001 (Name: 'csi', Function: 0x00005002) Entity: 0x00000004 (Name: 'csi capture', Function: 0x00010001) Entity: 0x0000000a (Name: 'csi_mux', Function: 0x00005001) Entity: 0x0000000e (Name: 'imx7-mipi-csis.0', Function: 0x00005002) Entity: 0x00000011 (Name: 'ov2680 1-0036', Function: 0x00020001) Interface: 0x03000005 (Type: 0x00000200) Interface: 0x03000019 (Type: 0x00000203) Interface: 0x0300001b (Type: 0x00000203) Interface: 0x0300001d (Type: 0x00000203) Interface: 0x0300001f (Type: 0x00000203) Pad: 0x01000002 Pad: 0x01000003 Pad: 0x01000007 Pad: 0x0100000b Pad: 0x0100000c Pad: 0x0100000d Pad: 0x0100000f Pad: 0x01000010 Pad: 0x01000012 Link: 0x02000006 Link: 0x02000008 Link: 0x02000013 Link: 0x02000015 Link: 0x02000017 Link: 0x0200001a Link: 0x0200001c Link: 0x0200001e Link: 0x02000020 test MEDIA_IOC_G_TOPOLOGY: OK Entities: 5 Interfaces: 5 Pads: 9 Links: 9 Entity: 0x00000001 (Name: 'csi', Type: 0x00020000 Entity: 0x00000004 (Name: 'csi capture', Type: 0x00010001 Entity: 0x0000000a (Name: 'csi_mux', Type: 0x00020000 Entity: 0x0000000e (Name: 'imx7-mipi-csis.0', Type: 0x00020000 Entity: 0x00000011 (Name: 'ov2680 1-0036', Type: 0x00020001 Entity Links: 0x00000001 (Name: 'csi') Entity Links: 0x00000004 (Name: 'csi capture') Entity Links: 0x0000000a (Name: 'csi_mux') Entity Links: 0x0000000e (Name: 'imx7-mipi-csis.0') Entity Links: 0x00000011 (Name: 'ov2680 1-0036') test MEDIA_IOC_ENUM_ENTITIES/LINKS: OK test MEDIA_IOC_SETUP_LINK: OK -------------------------------------------------------------------------------- Compliance test for device /dev/video0: Driver Info: Driver name : imx-media-captu Card type : imx-media-capture Bus info : platform:csi Driver version : 4.17.0 Capabilities : 0x84200001 Video Capture Streaming Extended Pix Format Device Capabilities Device Caps : 0x04200001 Video Capture Streaming Extended Pix Format Media Driver Info: Driver name : imx-media Model : imx-media Serial : Bus info : Media version : 4.17.0 Hardware revision: 0x00000000 (0) Driver version : 4.17.0 Interface Info: ID : 0x03000005 Type : V4L Video Entity Info: ID : 0x00000004 (4) Name : csi capture Function : V4L2 I/O Pad 0x01000007 : Sink Link 0x02000008: from remote pad 0x1000003 of entity 'csi': Data, Enabled Required ioctls: test MC information (see 'Media Driver Info' above): OK test VIDIOC_QUERYCAP: OK Allow for multiple opens: test second /dev/video0 open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK test for unlimited opens: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported) Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) fail: v4l2-test-input-output.cpp(420): G_INPUT not supported for a capture device test VIDIOC_G/S/ENUMINPUT: FAIL test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Control ioctls: info: checking v4l2_queryctrl of control 'User Controls' (0x00980001) info: checking v4l2_queryctrl of control 'Exposure' (0x00980911) info: checking v4l2_queryctrl of control 'Gain, Automatic' (0x00980912) info: checking v4l2_queryctrl of control 'Gain' (0x00980913) info: checking v4l2_queryctrl of control 'Horizontal Flip' (0x00980914) info: checking v4l2_queryctrl of control 'Vertical Flip' (0x00980915) info: checking v4l2_queryctrl of control 'Camera Controls' (0x009a0001) info: checking v4l2_queryctrl of control 'Auto Exposure' (0x009a0901) info: checking v4l2_queryctrl of control 'Image Processing Controls' (0x009f0001) info: checking v4l2_queryctrl of control 'Test Pattern' (0x009f0903) info: checking v4l2_queryctrl of control 'Exposure' (0x00980911) info: checking v4l2_queryctrl of control 'Gain, Automatic' (0x00980912) info: checking v4l2_queryctrl of control 'Gain' (0x00980913) info: checking v4l2_queryctrl of control 'Horizontal Flip' (0x00980914) info: checking v4l2_queryctrl of control 'Vertical Flip' (0x00980915) test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK info: checking control 'User Controls' (0x00980001) info: checking control 'Exposure' (0x00980911) info: checking control 'Gain, Automatic' (0x00980912) info: checking control 'Gain' (0x00980913) info: checking control 'Horizontal Flip' (0x00980914) info: checking control 'Vertical Flip' (0x00980915) info: checking control 'Camera Controls' (0x009a0001) info: checking control 'Auto Exposure' (0x009a0901) info: checking control 'Image Processing Controls' (0x009f0001) info: checking control 'Test Pattern' (0x009f0903) test VIDIOC_G/S_CTRL: OK info: checking extended control 'User Controls' (0x00980001) info: checking extended control 'Exposure' (0x00980911) info: checking extended control 'Gain, Automatic' (0x00980912) info: checking extended control 'Gain' (0x00980913) info: checking extended control 'Horizontal Flip' (0x00980914) info: checking extended control 'Vertical Flip' (0x00980915) info: checking extended control 'Camera Controls' (0x009a0001) info: checking extended control 'Auto Exposure' (0x009a0901) info: checking extended control 'Image Processing Controls' (0x009f0001) info: checking extended control 'Test Pattern' (0x009f0903) test VIDIOC_G/S/TRY_EXT_CTRLS: OK info: checking control event 'User Controls' (0x00980001) fail: v4l2-test-controls.cpp(796): subscribe event for control 'User Controls' failed test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 10 Private Controls: 0 Format ioctls: info: found 1 formats for buftype 1 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK test VIDIOC_TRY_FMT: OK test VIDIOC_S_FMT: OK test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported) test Composing: OK (Not Supported) test Scaling: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: info: test buftype Video Capture test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK -------------------------------------------------------------------------------- Compliance test for device /dev/v4l-subdev0: Media Driver Info: Driver name : imx-media Model : imx-media Serial : Bus info : Media version : 4.17.0 Hardware revision: 0x00000000 (0) Driver version : 4.17.0 Interface Info: ID : 0x03000019 Type : V4L Sub-Device Entity Info: ID : 0x00000001 (1) Name : csi Function : Video Interface Bridge Pad 0x01000002 : Sink Link 0x02000015: from remote pad 0x100000d of entity 'csi_mux': Data, Enabled Pad 0x01000003 : Source Link 0x02000008: to remote pad 0x1000007 of entity 'csi capture': Data, Enabled Required ioctls: test MC information (see 'Media Driver Info' above): OK Allow for multiple opens: test second /dev/v4l-subdev0 open: OK test for unlimited opens: OK Debug ioctls: test VIDIOC_LOG_STATUS: OK (Not Supported) Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Sub-Device ioctls (Sink Pad 0): test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK test Try VIDIOC_SUBDEV_G/S_FMT: OK test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK test Active VIDIOC_SUBDEV_G/S_FMT: OK test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported) Sub-Device ioctls (Source Pad 1): test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK test Try VIDIOC_SUBDEV_G/S_FMT: OK test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK test Active VIDIOC_SUBDEV_G/S_FMT: OK test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported) Control ioctls: test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK test VIDIOC_G/S_CTRL: OK test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported) test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 0 Private Controls: 0 Format ioctls: test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported) test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK (Not Supported) test VIDIOC_TRY_FMT: OK (Not Supported) test VIDIOC_S_FMT: OK (Not Supported) test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported) test Composing: OK (Not Supported) test Scaling: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported) test VIDIOC_EXPBUF: OK (Not Supported) -------------------------------------------------------------------------------- Compliance test for device /dev/v4l-subdev1: Media Driver Info: Driver name : imx-media Model : imx-media Serial : Bus info : Media version : 4.17.0 Hardware revision: 0x00000000 (0) Driver version : 4.17.0 Interface Info: ID : 0x0300001b Type : V4L Sub-Device Entity Info: ID : 0x0000000a (10) Name : csi_mux Function : Video Muxer Pad 0x0100000b : Sink Pad 0x0100000c : Sink Link 0x02000013: from remote pad 0x1000010 of entity 'imx7-mipi-csis.0': Data, Enabled Pad 0x0100000d : Source Link 0x02000015: to remote pad 0x1000002 of entity 'csi': Data, Enabled Required ioctls: test MC information (see 'Media Driver Info' above): OK Allow for multiple opens: test second /dev/v4l-subdev1 open: OK test for unlimited opens: OK Debug ioctls: test VIDIOC_LOG_STATUS: OK (Not Supported) Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Sub-Device ioctls (Sink Pad 0): test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) fail: v4l2-test-subdevs.cpp(311): fmt.width == 0 || fmt.width == ~0U fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format) test Try VIDIOC_SUBDEV_G/S_FMT: FAIL test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) fail: v4l2-test-subdevs.cpp(311): fmt.width == 0 || fmt.width == ~0U fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format) test Active VIDIOC_SUBDEV_G/S_FMT: FAIL test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported) Sub-Device ioctls (Sink Pad 1): test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) fail: v4l2-test-subdevs.cpp(311): fmt.width == 0 || fmt.width == ~0U fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format) test Try VIDIOC_SUBDEV_G/S_FMT: FAIL test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U test Active VIDIOC_SUBDEV_G/S_FMT: FAIL test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported) Sub-Device ioctls (Source Pad 2): test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) fail: v4l2-test-subdevs.cpp(311): fmt.width == 0 || fmt.width == ~0U fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format) test Try VIDIOC_SUBDEV_G/S_FMT: FAIL test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U fail: v4l2-test-subdevs.cpp(369): checkMBusFrameFmt(node, s_fmt.format) test Active VIDIOC_SUBDEV_G/S_FMT: FAIL test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported) Control ioctls: test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported) test VIDIOC_QUERYCTRL: OK (Not Supported) test VIDIOC_G/S_CTRL: OK (Not Supported) test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported) test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported) test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 0 Private Controls: 0 Format ioctls: test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported) test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK (Not Supported) test VIDIOC_TRY_FMT: OK (Not Supported) test VIDIOC_S_FMT: OK (Not Supported) test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported) test Composing: OK (Not Supported) test Scaling: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported) test VIDIOC_EXPBUF: OK (Not Supported) -------------------------------------------------------------------------------- Compliance test for device /dev/v4l-subdev2: Media Driver Info: Driver name : imx-media Model : imx-media Serial : Bus info : Media version : 4.17.0 Hardware revision: 0x00000000 (0) Driver version : 4.17.0 Interface Info: ID : 0x0300001d Type : V4L Sub-Device Entity Info: ID : 0x0000000e (14) Name : imx7-mipi-csis.0 Function : Video Interface Bridge Pad 0x0100000f : Sink Link 0x02000017: from remote pad 0x1000012 of entity 'ov2680 1-0036': Data, Enabled Pad 0x01000010 : Source Link 0x02000013: to remote pad 0x100000c of entity 'csi_mux': Data, Enabled Required ioctls: test MC information (see 'Media Driver Info' above): OK Allow for multiple opens: test second /dev/v4l-subdev2 open: OK test for unlimited opens: OK Debug ioctls: test VIDIOC_LOG_STATUS: OK Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Sub-Device ioctls (Sink Pad 0): test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) test Try VIDIOC_SUBDEV_G/S_FMT: OK test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) test Active VIDIOC_SUBDEV_G/S_FMT: OK test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported) Sub-Device ioctls (Source Pad 1): test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) test Try VIDIOC_SUBDEV_G/S_FMT: OK test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported) test Active VIDIOC_SUBDEV_G/S_FMT: OK test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported) Control ioctls: test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported) test VIDIOC_QUERYCTRL: OK (Not Supported) test VIDIOC_G/S_CTRL: OK (Not Supported) test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported) test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported) test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 0 Private Controls: 0 Format ioctls: test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported) test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK (Not Supported) test VIDIOC_TRY_FMT: OK (Not Supported) test VIDIOC_S_FMT: OK (Not Supported) test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported) test Composing: OK (Not Supported) test Scaling: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported) test VIDIOC_EXPBUF: OK (Not Supported) -------------------------------------------------------------------------------- Compliance test for device /dev/v4l-subdev3: Media Driver Info: Driver name : imx-media Model : imx-media Serial : Bus info : Media version : 4.17.0 Hardware revision: 0x00000000 (0) Driver version : 4.17.0 Interface Info: ID : 0x0300001f Type : V4L Sub-Device Entity Info: ID : 0x00000011 (17) Name : ov2680 1-0036 Function : Camera Sensor Pad 0x01000012 : Source Link 0x02000017: to remote pad 0x100000f of entity 'imx7-mipi-csis.0': Data, Enabled Required ioctls: test MC information (see 'Media Driver Info' above): OK Allow for multiple opens: test second /dev/v4l-subdev3 open: OK test for unlimited opens: OK Debug ioctls: test VIDIOC_LOG_STATUS: OK (Not Supported) Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Sub-Device ioctls (Source Pad 0): fail: v4l2-test-subdevs.cpp(57): node->enum_frame_interval_pad >= 0 fail: v4l2-test-subdevs.cpp(183): ret && ret != ENOTTY fail: v4l2-test-subdevs.cpp(248): ret && ret != ENOTTY test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: FAIL test Try VIDIOC_SUBDEV_G/S_FMT: OK test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK test Active VIDIOC_SUBDEV_G/S_FMT: OK test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported) test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK Control ioctls: info: checking v4l2_queryctrl of control 'User Controls' (0x00980001) info: checking v4l2_queryctrl of control 'Exposure' (0x00980911) info: checking v4l2_queryctrl of control 'Gain, Automatic' (0x00980912) info: checking v4l2_queryctrl of control 'Gain' (0x00980913) info: checking v4l2_queryctrl of control 'Horizontal Flip' (0x00980914) info: checking v4l2_queryctrl of control 'Vertical Flip' (0x00980915) info: checking v4l2_queryctrl of control 'Camera Controls' (0x009a0001) info: checking v4l2_queryctrl of control 'Auto Exposure' (0x009a0901) info: checking v4l2_queryctrl of control 'Image Processing Controls' (0x009f0001) info: checking v4l2_queryctrl of control 'Test Pattern' (0x009f0903) info: checking v4l2_queryctrl of control 'Exposure' (0x00980911) info: checking v4l2_queryctrl of control 'Gain, Automatic' (0x00980912) info: checking v4l2_queryctrl of control 'Gain' (0x00980913) info: checking v4l2_queryctrl of control 'Horizontal Flip' (0x00980914) info: checking v4l2_queryctrl of control 'Vertical Flip' (0x00980915) test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK info: checking control 'User Controls' (0x00980001) info: checking control 'Exposure' (0x00980911) info: checking control 'Gain, Automatic' (0x00980912) info: checking control 'Gain' (0x00980913) info: checking control 'Horizontal Flip' (0x00980914) info: checking control 'Vertical Flip' (0x00980915) info: checking control 'Camera Controls' (0x009a0001) info: checking control 'Auto Exposure' (0x009a0901) info: checking control 'Image Processing Controls' (0x009f0001) info: checking control 'Test Pattern' (0x009f0903) test VIDIOC_G/S_CTRL: OK info: checking extended control 'User Controls' (0x00980001) info: checking extended control 'Exposure' (0x00980911) info: checking extended control 'Gain, Automatic' (0x00980912) info: checking extended control 'Gain' (0x00980913) info: checking extended control 'Horizontal Flip' (0x00980914) info: checking extended control 'Vertical Flip' (0x00980915) info: checking extended control 'Camera Controls' (0x009a0001) info: checking extended control 'Auto Exposure' (0x009a0901) info: checking extended control 'Image Processing Controls' (0x009f0001) info: checking extended control 'Test Pattern' (0x009f0903) test VIDIOC_G/S/TRY_EXT_CTRLS: OK info: checking control event 'User Controls' (0x00980001) fail: v4l2-test-controls.cpp(796): subscribe event for control 'User Controls' failed test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 10 Private Controls: 0 Format ioctls: test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported) test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK (Not Supported) test VIDIOC_TRY_FMT: OK (Not Supported) test VIDIOC_S_FMT: OK (Not Supported) test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported) test Composing: OK (Not Supported) test Scaling: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported) test VIDIOC_EXPBUF: OK (Not Supported) Total: 267, Succeeded: 257, Failed: 10, Warnings: 0 Rui Miguel Silva (14): media: staging/imx: add support to media dev for no IPU systems media: staging/imx7: add imx7 CSI subdev driver clk: imx7d: fix mipi dphy div parent clk: imx7d: reset parent for mipi csi root media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7 media: staging/imx: add imx7 capture subsystem media: dt-bindings: add bindings for i.MX7 media driver ARM: dts: imx7s: add mipi phy power domain ARM: dts: imx7s: add multiplexer controls ARM: dts: imx7: Add video mux, csi and mipi_csi and connections ARM: dts: imx7s: add capture subsystem ARM: dts: imx7s-warp: add ov2680 sensor node media: imx7.rst: add documentation for i.MX7 media driver media: staging/imx: add i.MX7 entries to TODO file .../devicetree/bindings/media/imx7.txt | 152 ++ Documentation/media/v4l-drivers/imx7.rst | 157 ++ Documentation/media/v4l-drivers/index.rst | 1 + arch/arm/boot/dts/imx7s-warp.dts | 105 ++ arch/arm/boot/dts/imx7s.dtsi | 47 +- drivers/clk/imx/clk-imx7d.c | 4 +- drivers/staging/media/imx/Kconfig | 9 +- drivers/staging/media/imx/Makefile | 3 + drivers/staging/media/imx/TODO | 9 + drivers/staging/media/imx/imx-media-dev.c | 43 +- .../staging/media/imx/imx-media-internal-sd.c | 3 + drivers/staging/media/imx/imx-media.h | 3 + drivers/staging/media/imx/imx7-media-csi.c | 1332 +++++++++++++++++ drivers/staging/media/imx/imx7-mipi-csis.c | 1154 ++++++++++++++ 14 files changed, 3014 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/imx7.txt create mode 100644 Documentation/media/v4l-drivers/imx7.rst create mode 100644 drivers/staging/media/imx/imx7-media-csi.c create mode 100644 drivers/staging/media/imx/imx7-mipi-csis.c -- 2.17.0 Reviewed-by: Philipp Zabel