From patchwork Thu Aug 4 22:01:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 9264671 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 490766048B for ; Fri, 5 Aug 2016 00:39:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AF7527FAC for ; Fri, 5 Aug 2016 00:39:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FAEB28415; Fri, 5 Aug 2016 00:39:01 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CBF127FAC for ; Fri, 5 Aug 2016 00:39:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4CA866EACA; Fri, 5 Aug 2016 00:38:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id C36466EA7D for ; Thu, 4 Aug 2016 22:01:06 +0000 (UTC) Received: by mail-lf0-x232.google.com with SMTP id l69so191145428lfg.1 for ; Thu, 04 Aug 2016 15:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:organization:user-agent :mime-version:content-transfer-encoding; bh=8EJ6eSoLmUTI15KuYEGpRh4KRPaCs4vNNZb1cmh4EYY=; b=iTRu6hZnSlgyYpCwTuBu7uxeM3cVRpjCVuBJNI8Ay/5y2AGQitF6O7t+/wFUw0UuqU 2MYHuAbIHh0b9VE6JbA6sszfgWOqPGdZ40RhDeSJ3ZKEkyPUSKH5M05HuFtfwHpZUPHg w66evzRTH1H+iE4O1buEX8XtKxlLUsZque0FuaNHjphphiG3RhKYDFeF1k1DhK8+PsUi omjJmHTLozV/mQYZipwKTxo5I7Va9PJYwK6peGqbqvIGj/nzUdMyfnTT9N6VFiHs+Y6p y9ue8iTPGJgR33oKcQceICFEiILOoU7VTRs0ZTQ9qKFEZ5TPQsDeidsK1lAcei3+z9Kb bfsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:organization :user-agent:mime-version:content-transfer-encoding; bh=8EJ6eSoLmUTI15KuYEGpRh4KRPaCs4vNNZb1cmh4EYY=; b=OL210BQAATAOMdukem9wlZAmW1yqCchKToq1Ciu9dFH1x4bP/zbMTBXpTAHBrUrigg AC2jcePR3Jz66iXcsoXed+f7zkiumzW56zhfydD0JEn5NSeyVM6TLKzi4crB1dSVtquA KikvQ7YYTWNTPoLsAXu+R3JVlzoSrK/+T+JATXo2JfpHQb/NQd5Ayh8wntR7syVY8QeD mWAiiOFXo2bjx1qh3SSaLQ+ClMCVXkCsv4GSRjcXicT7Li+A0n4/Jr7On15XV/R4eres GwuQ+DFr62BxDi3BWS3YZICtYhjbXu2q6rrTw56FcbVMIQP5cwel62+VwWdALlGG/hLE LIJA== X-Gm-Message-State: AEkoouuhShLMJYsnYwHD5P4nn3unj0RKcLq+yjbrE/89m4BATEMVEgDf/Ix9TEoAjifpTA== X-Received: by 10.25.141.67 with SMTP id p64mr19840188lfd.86.1470348063768; Thu, 04 Aug 2016 15:01:03 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.81.253]) by smtp.gmail.com with ESMTPSA id 26sm2717226lfp.38.2016.08.04.15.01.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 15:01:02 -0700 (PDT) Date: Thu, 04 Aug 2016 15:01:02 -0700 (PDT) X-Google-Original-Date: Fri, 05 Aug 2016 01:01 +0300 From: Sergei Shtylyov To: laurent.pinchart@ideasonboard.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org Subject: [PATCH] rcar-du: add R8A7792 support Message-ID: <1934824.sESTIjSbbp@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.6.4-201.fc23.x86_64; KDE/4.14.20; x86_64; ; ) MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 05 Aug 2016 00:36:43 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add support for the R8A7792 DU; it has 2 DPAD (RGB) outputs. Signed-off-by: Sergei Shtylyov Acked-by: Rob Herring Acked-by: Laurent Pinchart --- This patch is against the 'drm/next/du' branch of Laurent Pinchart's 'media.git' repo... Documentation/devicetree/bindings/display/renesas,du.txt | 4 ++ drivers/gpu/drm/rcar-du/rcar_du_drv.c | 22 +++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) Index: media/Documentation/devicetree/bindings/display/renesas,du.txt =================================================================== --- media.orig/Documentation/devicetree/bindings/display/renesas,du.txt +++ media/Documentation/devicetree/bindings/display/renesas,du.txt @@ -6,6 +6,7 @@ Required Properties: - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU + - "renesas,du-r8a7792" for R8A7792 (R-Car V2H) compatible DU - "renesas,du-r8a7793" for R8A7793 (R-Car M2-N) compatible DU - "renesas,du-r8a7794" for R8A7794 (R-Car E2) compatible DU - "renesas,du-r8a7795" for R8A7795 (R-Car H3) compatible DU @@ -25,7 +26,7 @@ Required Properties: - clock-names: Name of the clocks. This property is model-dependent. - R8A7779 uses a single functional clock. The clock doesn't need to be named. - - R8A779[01345] use one functional clock per channel and one clock per LVDS + - R8A779[012345] use one functional clock per channel and one clock per LVDS encoder (if available). The functional clocks must be named "du.x" with "x" being the channel numerical index. The LVDS clocks must be named "lvds.x" with "x" being the LVDS encoder numerical index. @@ -47,6 +48,7 @@ corresponding to each DU output. R8A7779 (H1) DPAD 0 DPAD 1 - - R8A7790 (H2) DPAD LVDS 0 LVDS 1 - R8A7791 (M2-W) DPAD LVDS 0 - - + R8A7792 (V2H) DPAD 0 DPAD 1 - - R8A7793 (M2-N) DPAD LVDS 0 - - R8A7794 (E2) DPAD 0 DPAD 1 - - R8A7795 (H3) DPAD HDMI 0 HDMI 1 LVDS Index: media/drivers/gpu/drm/rcar-du/rcar_du_drv.c =================================================================== --- media.orig/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ media/drivers/gpu/drm/rcar-du/rcar_du_drv.c @@ -110,6 +110,27 @@ static const struct rcar_du_device_info .num_lvds = 1, }; +static const struct rcar_du_device_info rcar_du_r8a7792_info = { + .gen = 2, + .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK + | RCAR_DU_FEATURE_EXT_CTRL_REGS, + .num_crtcs = 2, + .routes = { + /* R8A7792 has two RGB outputs. */ + [RCAR_DU_OUTPUT_DPAD0] = { + .possible_crtcs = BIT(0), + .encoder_type = DRM_MODE_ENCODER_NONE, + .port = 0, + }, + [RCAR_DU_OUTPUT_DPAD1] = { + .possible_crtcs = BIT(1), + .encoder_type = DRM_MODE_ENCODER_NONE, + .port = 1, + }, + }, + .num_lvds = 0, +}; + static const struct rcar_du_device_info rcar_du_r8a7794_info = { .gen = 2, .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK @@ -161,6 +182,7 @@ static const struct of_device_id rcar_du { .compatible = "renesas,du-r8a7779", .data = &rcar_du_r8a7779_info }, { .compatible = "renesas,du-r8a7790", .data = &rcar_du_r8a7790_info }, { .compatible = "renesas,du-r8a7791", .data = &rcar_du_r8a7791_info }, + { .compatible = "renesas,du-r8a7792", .data = &rcar_du_r8a7792_info }, { .compatible = "renesas,du-r8a7793", .data = &rcar_du_r8a7791_info }, { .compatible = "renesas,du-r8a7794", .data = &rcar_du_r8a7794_info }, { .compatible = "renesas,du-r8a7795", .data = &rcar_du_r8a7795_info },