From patchwork Mon Aug 6 17:45:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10557627 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 8D47413BB for ; Mon, 6 Aug 2018 17:45:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 776DA299B9 for ; Mon, 6 Aug 2018 17:45:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BD1F299C7; Mon, 6 Aug 2018 17:45: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=-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 10C63299B9 for ; Mon, 6 Aug 2018 17:45:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733026AbeHFTzP (ORCPT ); Mon, 6 Aug 2018 15:55:15 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:40243 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732934AbeHFTzO (ORCPT ); Mon, 6 Aug 2018 15:55:14 -0400 Received: by mail-lf1-f68.google.com with SMTP id y200-v6so9669323lfd.7 for ; Mon, 06 Aug 2018 10:45:04 -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=uS1dZEE+9xYIzPVN7qBTRDtX5LdYmONajvXKzdYbLSA=; b=Qc26MAsc0s+P4rly13PQPJXdyPK+dnKICUOyIT57v/0qdIgDw5ZlHHum/YhyxvUNPj Jm9/+9WJR1CcF3iImBCylSYsgemYbF9ON3/woQ4Xgqy2GmAHlU7alXgYmnUJ9CehM7J7 uzZ+J7z2oWDYfhEIcIwAwHlGPJ7/1aK7qCkoc2S+QB4XwUurydYk5knvSAJ3jseIMI09 gEOj4RGG2AqBdC5m66sfRs5Vhum689m/ucg05b4MmVGKij8dW5NyKB6hm7Ssl9hXouOm 9Nu1Gz/ucYJbB/pK0KzXK+JZbigUOx9uSA6PnGYIKoEk7UnXZUBOH81928RRf5i3QGvb v++g== 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=uS1dZEE+9xYIzPVN7qBTRDtX5LdYmONajvXKzdYbLSA=; b=JxugB4oF/0hbDY1515slCBFJL5fsizW1Msq4kffmo+GqvnnG2xEquT9RbHQGZOgDgM DSw4J1skNVfUXjNlp/YyhlguU5PKct9LtYckQS+ReN5tsgq7HjG4JuKG6gkAKRGJU3gh FbrMMqSOKbuukJwIar2G0SZUPhzbKn4MgQFyMRqPKhXXHbxL3yz6a4CpGN3Oz7bt+1vg zbmjUSyPxtz/O2wndjl9MUeWrcEm3EbEFHrK+QhH/ovb73cvsiFcTrxk3Vb0xyd1mdIR hKudN+cGKGL0MTH4AAmrVPBfhb6SlkCp7uD1ogpoc7vBIW0ZIJ8jWFdT6rjkSG3+8NLc KwWg== X-Gm-Message-State: AOUpUlHdAm8ZjUFiB7QbDSH/wU8xfd+tWnMrbODr2yDG/SK00Q0O73r6 tRuW0fzTYddovmEQVXrY6fqt7Q== X-Google-Smtp-Source: AAOMgpcRLrel6kG5RWsdmdk5vuYo4QUo+yBwNX0OMj+csBRPhUoqzkGFtEtM22sm2Ym5KFpYSme9fA== X-Received: by 2002:a19:7d84:: with SMTP id y126-v6mr12585727lfc.94.1533577503833; Mon, 06 Aug 2018 10:45:03 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.86.81]) by smtp.gmail.com with ESMTPSA id w14-v6sm2395751ljh.71.2018.08.06.10.45.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 10:45:02 -0700 (PDT) From: Sergei Shtylyov Subject: [PATCH] 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 20:45:01 +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. 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 @@ -1097,6 +1097,34 @@ static const struct rvin_info rcar_info_ .routes = rcar_info_r8a77995_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 of_device_id rvin_of_id_table[] = { { .compatible = "renesas,vin-r8a7778", @@ -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, },