From patchwork Mon Aug 6 18:48:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10557785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1399614E2 for ; Mon, 6 Aug 2018 18:48:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05E78294CF for ; Mon, 6 Aug 2018 18:48:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE2E429569; Mon, 6 Aug 2018 18:48:25 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 87AD829535 for ; Mon, 6 Aug 2018 18:48:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732737AbeHFU6s (ORCPT ); Mon, 6 Aug 2018 16:58:48 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35339 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732731AbeHFU6s (ORCPT ); Mon, 6 Aug 2018 16:58:48 -0400 Received: by mail-lj1-f194.google.com with SMTP id p10-v6so11448205ljg.2 for ; Mon, 06 Aug 2018 11:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:organization:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=2wj6Oyo6Np3cig/OXcgMOhEo3T5zjz1GhBkfhwys478=; b=zZbEI69ux6ZRcRK5B6Pgo7PelVcT1JYsW/smdyTZVxXFLkQs8XEKNXInCMiEFfgVjo ESakEEP+/ebokkXIMQMRVxiKk9aCoS32gS8rlRmqxwEoEOj8QABJQJGTByamyKCZaeRJ iW5B6jiO8hST5NKynQtrjFIj0Y3B61ACX362Q+eDfASw+wGDdUq0GPGN4UKxyct3nUq8 HQVMfpY3kVeIlqwgUcwbD/iO0V9H6TkkZGakvMJVzQSzLNunxZuMW7WfaF54OhjBJDwB IsGLLSK79UdikIET/m1QtvO7A68T09SVVHqhMz+3Jv+nbl+c+0WuLriweYa8w1gU7mIZ k0xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:organization:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=2wj6Oyo6Np3cig/OXcgMOhEo3T5zjz1GhBkfhwys478=; b=V67u9LS4+KmKBPwfCUy6OYC2RyvfQJaXRq4T+KL+/OYc2N8DL1NwuMi/mGu9C8Qf51 h3gXJE9Py/Psg1ZE/ECRYw6vAJu/aKT3mfwSYRs599D241jf1zAy8k0zkUJVZszGLThO N04x/tK9wsMWtARkrbdJgky0lNIjyqsIYG3p2yyIdofPdIw7ViuUACMUrEhGOxLxpUo7 ZMvFzFbw1At3CAMFNGEyjm+nhR8pE8+fNnRAkUcO+s87/5QB0QmYoyruXqeH6G5BQdNh Xfb9CgYi0K7TrDtmhW5hkTJ2Ftz23IrISBPcu0fsMk1le53rA3/21Pol8ofZdtPMS/KF Zcwg== X-Gm-Message-State: AOUpUlGEPYOSh/Aw6Z+rf0IS6KaKnb/jYpNVgqLUKsNcx6lDN433R0ks EVFmmN9/YAmfqx1G1ryewVvbMg== X-Google-Smtp-Source: AAOMgpcF2T0pBnotBoA0Ug4MkFmvb/7YTiHmphLXeR2w5hMVL/LRtQoQFU8QFAXnL3BmUBKKDk0MSQ== X-Received: by 2002:a2e:5b4a:: with SMTP id p71-v6mr13073424ljb.91.1533581302444; Mon, 06 Aug 2018 11:48:22 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.86.81]) by smtp.gmail.com with ESMTPSA id z12-v6sm2282011lfj.26.2018.08.06.11.48.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 11:48:21 -0700 (PDT) From: Sergei Shtylyov Subject: [PATCH v2] rcar-vin: add R8A77980 support To: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= , Rob Herring , devicetree@vger.kernel.org Cc: Mark Rutland Organization: Cogent Embedded Message-ID: Date: Mon, 6 Aug 2018 21:48:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Language: en-MW 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 R8A77980 SoC support to the R-Car VIN driver. Signed-off-by: Sergei Shtylyov Acked-by: Niklas Söderlund --- This patch is against the 'media_tree.git' repo's 'master' branch. Changes in version 2: - move the R8A77980 info/routes after R8A77970 ones; - added Niklas' ACK. Documentation/devicetree/bindings/media/rcar_vin.txt | 1 drivers/media/platform/rcar-vin/rcar-core.c | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) Index: media_tree/Documentation/devicetree/bindings/media/rcar_vin.txt =================================================================== --- media_tree.orig/Documentation/devicetree/bindings/media/rcar_vin.txt +++ media_tree/Documentation/devicetree/bindings/media/rcar_vin.txt @@ -23,6 +23,7 @@ on Gen3 platforms to a CSI-2 receiver. - "renesas,vin-r8a7796" for the R8A7796 device - "renesas,vin-r8a77965" for the R8A77965 device - "renesas,vin-r8a77970" for the R8A77970 device + - "renesas,vin-r8a77980" for the R8A77980 device - "renesas,vin-r8a77995" for the R8A77995 device - "renesas,rcar-gen2-vin" for a generic R-Car Gen2 or RZ/G1 compatible device. Index: media_tree/drivers/media/platform/rcar-vin/rcar-core.c =================================================================== --- media_tree.orig/drivers/media/platform/rcar-vin/rcar-core.c +++ media_tree/drivers/media/platform/rcar-vin/rcar-core.c @@ -1085,6 +1085,34 @@ static const struct rvin_info rcar_info_ .routes = rcar_info_r8a77970_routes, }; +static const struct rvin_group_route rcar_info_r8a77980_routes[] = { + { .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) }, + { .csi = RVIN_CSI40, .channel = 1, .vin = 0, .mask = BIT(2) }, + { .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) }, + { .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(1) | BIT(3) }, + { .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) }, + { .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) }, + { .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) }, + { .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) }, + { .csi = RVIN_CSI41, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) }, + { .csi = RVIN_CSI41, .channel = 1, .vin = 4, .mask = BIT(2) }, + { .csi = RVIN_CSI41, .channel = 0, .vin = 5, .mask = BIT(2) }, + { .csi = RVIN_CSI41, .channel = 1, .vin = 5, .mask = BIT(1) | BIT(3) }, + { .csi = RVIN_CSI41, .channel = 0, .vin = 6, .mask = BIT(1) }, + { .csi = RVIN_CSI41, .channel = 2, .vin = 6, .mask = BIT(3) }, + { .csi = RVIN_CSI41, .channel = 1, .vin = 7, .mask = BIT(0) }, + { .csi = RVIN_CSI41, .channel = 3, .vin = 7, .mask = BIT(3) }, + { /* Sentinel */ } +}; + +static const struct rvin_info rcar_info_r8a77980 = { + .model = RCAR_GEN3, + .use_mc = true, + .max_width = 4096, + .max_height = 4096, + .routes = rcar_info_r8a77980_routes, +}; + static const struct rvin_group_route rcar_info_r8a77995_routes[] = { { /* Sentinel */ } }; @@ -1143,6 +1171,10 @@ static const struct of_device_id rvin_of .data = &rcar_info_r8a77970, }, { + .compatible = "renesas,vin-r8a77980", + .data = &rcar_info_r8a77980, + }, + { .compatible = "renesas,vin-r8a77995", .data = &rcar_info_r8a77995, },