From patchwork Sat Nov 12 13:12:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 9424145 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C390F60484 for ; Sat, 12 Nov 2016 13:14:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7DBC296DC for ; Sat, 12 Nov 2016 13:14:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC155298C9; Sat, 12 Nov 2016 13:14:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47216296DC for ; Sat, 12 Nov 2016 13:14:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965719AbcKLNOE (ORCPT ); Sat, 12 Nov 2016 08:14:04 -0500 Received: from smtp-4.sys.kth.se ([130.237.48.193]:33641 "EHLO smtp-4.sys.kth.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966113AbcKLNNz (ORCPT ); Sat, 12 Nov 2016 08:13:55 -0500 Received: from smtp-4.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-4.sys.kth.se (Postfix) with ESMTP id 605B032CC; Sat, 12 Nov 2016 14:13:53 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-4.sys.kth.se ([127.0.0.1]) by smtp-4.sys.kth.se (smtp-4.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zq2to_OtW3VD; Sat, 12 Nov 2016 14:13:52 +0100 (CET) X-KTH-Auth: niso [89.233.230.99] X-KTH-mail-from: niklas.soderlund+renesas@ragnatech.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by smtp-4.sys.kth.se (Postfix) with ESMTPSA id 4AC512A5B; Sat, 12 Nov 2016 14:13:52 +0100 (CET) From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Laurent Pinchart , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, tomoharu.fukawa.eb@renesas.com, Sakari Ailus , Geert Uytterhoeven , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCHv2 31/32] media: rcar-vin: enable support for r8a7795 Date: Sat, 12 Nov 2016 14:12:15 +0100 Message-Id: <20161112131216.22635-32-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161112131216.22635-1-niklas.soderlund+renesas@ragnatech.se> References: <20161112131216.22635-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the SoC specific information for Renesas r8a7795. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/Kconfig | 2 +- drivers/media/platform/rcar-vin/rcar-core.c | 71 +++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/rcar-vin/Kconfig b/drivers/media/platform/rcar-vin/Kconfig index 111d2a1..e0e981c 100644 --- a/drivers/media/platform/rcar-vin/Kconfig +++ b/drivers/media/platform/rcar-vin/Kconfig @@ -5,7 +5,7 @@ config VIDEO_RCAR_VIN select VIDEOBUF2_DMA_CONTIG ---help--- Support for Renesas R-Car Video Input (VIN) driver. - Supports R-Car Gen2 SoCs. + Supports R-Car Gen2 and Gen3 SoCs. To compile this driver as a module, choose M here: the module will be called rcar-vin. diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c index 1efbb0a..1a86c72 100644 --- a/drivers/media/platform/rcar-vin/rcar-core.c +++ b/drivers/media/platform/rcar-vin/rcar-core.c @@ -1134,6 +1134,73 @@ static const struct rvin_info rcar_info_m1 = { .max_height = 2048, }; +static const struct rvin_info rcar_info_r8a7795 = { + .chip = RCAR_GEN3, + .max_width = 4096, + .max_height = 4096, + + .num_chsels = 6, + .chsels = { + { + { .csi = RVIN_CSI40, .chan = 0 }, + { .csi = RVIN_CSI20, .chan = 0 }, + { .csi = RVIN_CSI21, .chan = 0 }, + { .csi = RVIN_CSI40, .chan = 0 }, + { .csi = RVIN_CSI20, .chan = 0 }, + { .csi = RVIN_CSI21, .chan = 0 }, + }, { + { .csi = RVIN_CSI20, .chan = 0 }, + { .csi = RVIN_CSI21, .chan = 0 }, + { .csi = RVIN_CSI40, .chan = 0 }, + { .csi = RVIN_CSI40, .chan = 1 }, + { .csi = RVIN_CSI20, .chan = 1 }, + { .csi = RVIN_CSI21, .chan = 1 }, + }, { + { .csi = RVIN_CSI21, .chan = 0 }, + { .csi = RVIN_CSI40, .chan = 0 }, + { .csi = RVIN_CSI20, .chan = 0 }, + { .csi = RVIN_CSI40, .chan = 2 }, + { .csi = RVIN_CSI20, .chan = 2 }, + { .csi = RVIN_CSI21, .chan = 2 }, + }, { + { .csi = RVIN_CSI40, .chan = 1 }, + { .csi = RVIN_CSI20, .chan = 1 }, + { .csi = RVIN_CSI21, .chan = 1 }, + { .csi = RVIN_CSI40, .chan = 3 }, + { .csi = RVIN_CSI20, .chan = 3 }, + { .csi = RVIN_CSI21, .chan = 3 }, + }, { + { .csi = RVIN_CSI41, .chan = 0 }, + { .csi = RVIN_CSI20, .chan = 0 }, + { .csi = RVIN_CSI21, .chan = 0 }, + { .csi = RVIN_CSI41, .chan = 0 }, + { .csi = RVIN_CSI20, .chan = 0 }, + { .csi = RVIN_CSI21, .chan = 0 }, + }, { + { .csi = RVIN_CSI20, .chan = 0 }, + { .csi = RVIN_CSI21, .chan = 0 }, + { .csi = RVIN_CSI41, .chan = 0 }, + { .csi = RVIN_CSI41, .chan = 1 }, + { .csi = RVIN_CSI20, .chan = 1 }, + { .csi = RVIN_CSI21, .chan = 1 }, + }, { + { .csi = RVIN_CSI21, .chan = 0 }, + { .csi = RVIN_CSI41, .chan = 0 }, + { .csi = RVIN_CSI20, .chan = 0 }, + { .csi = RVIN_CSI41, .chan = 2 }, + { .csi = RVIN_CSI20, .chan = 2 }, + { .csi = RVIN_CSI21, .chan = 2 }, + }, { + { .csi = RVIN_CSI41, .chan = 1 }, + { .csi = RVIN_CSI20, .chan = 1 }, + { .csi = RVIN_CSI21, .chan = 1 }, + { .csi = RVIN_CSI41, .chan = 3 }, + { .csi = RVIN_CSI20, .chan = 3 }, + { .csi = RVIN_CSI21, .chan = 3 }, + }, + }, +}; + static const struct rvin_info rcar_info_gen2 = { .chip = RCAR_GEN2, .max_width = 2048, @@ -1142,6 +1209,10 @@ static const struct rvin_info rcar_info_gen2 = { static const struct of_device_id rvin_of_id_table[] = { { + .compatible = "renesas,vin-r8a7795", + .data = &rcar_info_r8a7795, + }, + { .compatible = "renesas,vin-r8a7794", .data = &rcar_info_gen2, },