Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9911321pxu; Tue, 29 Dec 2020 08:19:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzh9HghepUEcoeOkSdiCx+s1PXPfBP1ms3kCqKF+bQSNEr8fJAXNEr9MsrKozvWFkM1z1s X-Received: by 2002:a17:906:d28f:: with SMTP id ay15mr44573317ejb.327.1609258742316; Tue, 29 Dec 2020 08:19:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609258742; cv=none; d=google.com; s=arc-20160816; b=y+kWFHGmtaNtIedJmVMxjbkB9WrASVVsUQWAlXTpezLAxfEG+9AnRbk/MFv+dDnHgk dBb/DszmtIHfOKdeeQrKa3GDE/ETFf6C8oZX1xiShnbhzEg+RI6k2y3P2I+XMauMEZ5P TPGzd3cV4rnSZwGcgci51kX72fkQ5vFeyp5xdcVBbEh3FHy3t1Ie1VegSBZjl6J3+L2C BRrVkFkOpcN/T1n1mvXSy6MXssbhkbXWx+zZ6hG+mai930QF5fvCVAE+teZkdLlXlRBc mObcV6N5HOkchX00K/kCwh5p1tsrZZMRHxQ2VMjM6Taykay2SnwiU7U+Oce2pvkHVrCQ xNIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Rt6TmGUoNSAExxH+GiiIwlo/7az0g/baXp+U2Zf1KL0=; b=egT90civaNY8acc7FumROH+uWK4t6y+aIuYOSF3MkDcci5T9cXRXYCPu2DJ5A4oP5W 4d2WpHLEZlNNRFyzvUUexHTIa/cy3bjZl7nWhF7UA0vzTP2UKxxxT6vpw3EIp3ZQ30dX 6/decrcm5H6dM5V9dQ4/i/3exkYhVloNqJJXXazSWOMbO11K7II8ev2PhPHp0eF5/J6P vTDSB3lzfgLY8fN80cbyRUvGFIN6hBzxLJddSz3cvBVehlRpmPHXRyS160ED5atT+Lad lvGs8W/oSBE2X7NE1MpwiQAGJO6WVhWam0T+bEoxZ4N86DWuZMTtSxSvsjBgBUlLQnfk KWYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si22904319edf.510.2020.12.29.08.18.39; Tue, 29 Dec 2020 08:19:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726198AbgL2QSL (ORCPT + 99 others); Tue, 29 Dec 2020 11:18:11 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60595 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgL2QSK (ORCPT ); Tue, 29 Dec 2020 11:18:10 -0500 X-Originating-IP: 90.55.97.122 Received: from pc-2.home (apoitiers-259-1-26-122.w90-55.abo.wanadoo.fr [90.55.97.122]) (Authenticated sender: maxime.chevallier@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id AC240E0007; Tue, 29 Dec 2020 16:17:25 +0000 (UTC) From: Maxime Chevallier To: Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Heiko Stuebner , Hans Verkuil , Ezequiel Garcia Cc: Maxime Chevallier , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Miquel Raynal , Paul Kocialkowski Subject: [PATCH v5 0/3] media: rockchip: Introduce driver for Rockchip's camera interface Date: Tue, 29 Dec 2020 17:17:21 +0100 Message-Id: <20201229161724.511102-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi everyone, This is the fifth iteration of the series introducing a driver for the PX30 camera interface. This was previously known as the "cif" driver in other iterations, but was renamed to "vip" following Ezequiel's advices to match the datasheet name. This is based on a BSP driver, and I'm not fully familiar with the media and V4L2 frameworks, so I guess some review is still needed. On top of the previous series, this series addresses most of the reviews by Ezequiel (Thanks again), and was tested on a PX30 chip. This Fifth iteration addresses some issues uncovered by the kbuild bot and Rob's binding_check bot. The output of v4l2-compliance for this driver is the following : # v4l2-compliance v4l2-compliance SHA: not available, 64 bits Compliance test for rk_vip device /dev/video0: Driver Info: Driver name : rk_vip Card type : rk_vip Bus info : platform:ff490000.vip Driver version : 5.11.0 Capabilities : 0x84201000 Video Capture Multiplanar Streaming Extended Pix Format Device Capabilities Device Caps : 0x04201000 Video Capture Multiplanar Streaming Extended Pix Format Media Driver Info: Driver name : rk_vip Model : rk_vip Serial : Bus info : Media version : 5.11.0 Hardware revision: 0x00000000 (0) Driver version : 5.11.0 Interface Info: ID : 0x03000002 Type : V4L Video Entity Info: ID : 0x00000001 (1) Name : video_rkvip Function : V4L2 I/O Pad 0x01000004 : 0: Sink Link 0x02000009: from remote pad 0x1000006 of entity 'tw9900 2-0044': 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) test VIDIOC_G/S/ENUMINPUT: OK test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 1 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 (Input 0): 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 (Input 0): 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 (Input 0): 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 (Input 0): test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK test Requests: OK (Not Supported) Total for rk_vip device /dev/video0: 45, Succeeded: 45, Failed: 0, Warnings: 0 Once again, any review is welcome :) Thanks a lot, Maxime Maxime Chevallier (3): media: dt-bindings: media: Document Rockchip VIP bindings media: rockchip: Introduce driver for Rockhip's camera interface arm64: dts: rockchip: Add the camera interface description of the PX30 .../bindings/media/rockchip-vip.yaml | 101 ++ arch/arm64/boot/dts/rockchip/px30.dtsi | 12 + drivers/media/platform/Kconfig | 15 + drivers/media/platform/Makefile | 1 + drivers/media/platform/rockchip/vip/Makefile | 3 + drivers/media/platform/rockchip/vip/capture.c | 1146 +++++++++++++++++ drivers/media/platform/rockchip/vip/dev.c | 331 +++++ drivers/media/platform/rockchip/vip/dev.h | 203 +++ drivers/media/platform/rockchip/vip/regs.h | 260 ++++ 9 files changed, 2072 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip-vip.yaml create mode 100644 drivers/media/platform/rockchip/vip/Makefile create mode 100644 drivers/media/platform/rockchip/vip/capture.c create mode 100644 drivers/media/platform/rockchip/vip/dev.c create mode 100644 drivers/media/platform/rockchip/vip/dev.h create mode 100644 drivers/media/platform/rockchip/vip/regs.h -- 2.25.4