From patchwork Fri May 29 13:04:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 11578523 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAE2A92A for ; Fri, 29 May 2020 13:04:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB6C92100A for ; Fri, 29 May 2020 13:04:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BDUVb3v4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB6C92100A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=h5L5WKqBGINIQIaf+DL2K6jPgQREC9yJyK4ojJldZbo=; b=BDUVb3v4owSHIR LirYhuforz3/At8srg7pLS6JoGfgnadwLLSgVgeImQtJAz3KzLJEOjGmH+nl53VjTIsigi/Eqoa91 peVaro6T8sLvN3YgHa+T4+/CtGVb5Zx1UjQSlve97kZrPbto/Udnd4Rom87a1o3kQI/zW5GF5IxCG eyOUxp7CqFBLLMMng7IjMJAsqH00vtra5K+39tnRo3x1aFKHO1cz+NSmdEHaMtNcZVGuPp7TR3h6H r3ngwAu0BPWDfzZptBoWgT+Sd8zez522oY7rs80u9FIaW+1r8yKM0WR5akwmNssSnzzfbIqyqBTD7 0WgWxJGCly6CV+g/p80w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeegU-0007h7-I6; Fri, 29 May 2020 13:04:26 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeegR-0007eq-7z; Fri, 29 May 2020 13:04:24 +0000 X-Originating-IP: 86.250.147.67 Received: from pc-10.home (lfbn-tou-1-695-67.w86-250.abo.wanadoo.fr [86.250.147.67]) (Authenticated sender: maxime.chevallier@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 0A213C000C; Fri, 29 May 2020 13:04:14 +0000 (UTC) From: Maxime Chevallier To: Mauro Carvalho Chehab , Robin Murphy , Rob Herring , Mark Rutland , Heiko Stuebner , Hans Verkuil Subject: [PATCH v2 0/3] media: rockchip: Introduce driver for the camera interface on PX30 Date: Fri, 29 May 2020 15:04:02 +0200 Message-Id: <20200529130405.929429-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200529_060423_418191_F2AA903F X-CRM114-Status: GOOD ( 15.51 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.198 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.183.198 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Chevallier , Paul Kocialkowski , linux-rockchip@lists.infradead.org, Thomas Petazzoni , Miquel Raynal , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hello everyone, Here's a V2 of the series adding very basic support for the camera interface on the Rockchip PX30 SoC. Thanks to everyone that commented on the first series, your reviews were very helpful :) This Camera Interface is also supported on other Rockchip SoC such as the RK1808, RK3128, RK3288 and RK3288, but for now I've only been able to test it on the PX30, using a PAL format. This driver is mostly based on the driver found in Rockchip's BSP, that has been trimmed down to support the set of features that I was able to test, that is pretty much a very basic one-frame capture and video streaming with GStreamer. This first draft only supports the Parallel interface, although the controller has support for BT656 and CSI2. Finally, this controller has an iommu that could be used in this driver, but as of today I've not been able to get it to work. Any review is welcome. Thanks, Maxime --- Changes since V1 --- - Took reviews from Rob, Hans, Robin and Heiko into account : - Renamed the clocks in the binding - Fixed the DT schema compiling - Fixed a few typos - Used the clk bulk API - Used the reset array API - Changed a few helpers for more suitable ones - Rebased on 5.7-rc7 Maxime Chevallier (3): media: dt-bindings: media: Document Rockchip CIF bindings media: rockchip: Introduce driver for Rockhip's camera interface arm64: dts: rockchip: Add the camera interface description of the PX30 .../bindings/media/rockchip-cif.yaml | 100 ++ arch/arm64/boot/dts/rockchip/px30.dtsi | 12 + drivers/media/platform/Kconfig | 13 + drivers/media/platform/Makefile | 1 + drivers/media/platform/rockchip/cif/Makefile | 3 + drivers/media/platform/rockchip/cif/capture.c | 1170 +++++++++++++++++ drivers/media/platform/rockchip/cif/dev.c | 358 +++++ drivers/media/platform/rockchip/cif/dev.h | 213 +++ drivers/media/platform/rockchip/cif/regs.h | 256 ++++ 9 files changed, 2126 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip-cif.yaml create mode 100644 drivers/media/platform/rockchip/cif/Makefile create mode 100644 drivers/media/platform/rockchip/cif/capture.c create mode 100644 drivers/media/platform/rockchip/cif/dev.c create mode 100644 drivers/media/platform/rockchip/cif/dev.h create mode 100644 drivers/media/platform/rockchip/cif/regs.h