LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
To: linux-renesas-soc@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v2 05/11] drm: rcar-du: Add R8A77965 support
Date: Fri, 27 Apr 2018 17:57:16 +0100	[thread overview]
Message-ID: <20180427165722.19445-6-kieran.bingham+renesas@ideasonboard.com> (raw)
In-Reply-To: <20180427165722.19445-1-kieran.bingham+renesas@ideasonboard.com>

The R8A77965 (M3-N) SoC provides RGB, HDMI and LVDS output.

This platform is unusual in that the RGB is connected to DU3 leaving DU2
unpopulated. This is reflected by the channels_mask accordingly.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
--
v2:
 - Corrected bit ordering to be LE
---
 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 29 +++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index 0062186d7df8..56f947240375 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -246,6 +246,34 @@ static const struct rcar_du_device_info rcar_du_r8a7796_info = {
 	.dpll_ch =  BIT(1),
 };
 
+static const struct rcar_du_device_info rcar_du_r8a77965_info = {
+	.gen = 3,
+	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
+		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
+		  | RCAR_DU_FEATURE_VSP1_SOURCE,
+	.channels_mask = BIT(3) | BIT(1) | BIT(0),
+	.routes = {
+		/*
+		 * R8A77965 has one RGB output, one LVDS output and one HDMI
+		 * output.
+		 */
+		[RCAR_DU_OUTPUT_DPAD0] = {
+			.possible_crtcs = BIT(2),
+			.port = 0,
+		},
+		[RCAR_DU_OUTPUT_HDMI0] = {
+			.possible_crtcs = BIT(1),
+			.port = 1,
+		},
+		[RCAR_DU_OUTPUT_LVDS0] = {
+			.possible_crtcs = BIT(0),
+			.port = 2,
+		},
+	},
+	.num_lvds = 1,
+	.dpll_ch =  BIT(1),
+};
+
 static const struct rcar_du_device_info rcar_du_r8a77970_info = {
 	.gen = 3,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
@@ -277,6 +305,7 @@ static const struct of_device_id rcar_du_of_table[] = {
 	{ .compatible = "renesas,du-r8a7794", .data = &rcar_du_r8a7794_info },
 	{ .compatible = "renesas,du-r8a7795", .data = &rcar_du_r8a7795_info },
 	{ .compatible = "renesas,du-r8a7796", .data = &rcar_du_r8a7796_info },
+	{ .compatible = "renesas,du-r8a77965", .data = &rcar_du_r8a77965_info },
 	{ .compatible = "renesas,du-r8a77970", .data = &rcar_du_r8a77970_info },
 	{ }
 };
-- 
2.17.0

  parent reply	other threads:[~2018-04-27 16:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180427165722.19445-1-kieran.bingham+renesas@ideasonboard.com>
2018-04-27 16:57 ` [PATCH v2 01/11] dt-bindings: display: renesas: Add R-Car M3-N HDMI TX DT bindings Kieran Bingham
2018-04-27 21:17   ` Laurent Pinchart
2018-04-27 16:57 ` [PATCH v2 02/11] pinctrl: sh-pfc: r8a77965: Add DU RGB output pins, groups and functions Kieran Bingham
2018-04-27 16:57 ` [PATCH v2 03/11] drm: rcar-du: Split CRTC handling to support hardware indexing Kieran Bingham
2018-04-27 21:21   ` Laurent Pinchart
2018-04-27 16:57 ` [PATCH v2 04/11] drm: rcar-du: Allow DU groups to work with " Kieran Bingham
2018-04-27 16:57 ` Kieran Bingham [this message]
2018-04-27 16:57 ` [PATCH v2 06/11] arm64: dts: r8a77965: Add FCPF and FCPV instances Kieran Bingham
2018-04-30  7:27   ` Simon Horman
2018-04-27 16:57 ` [PATCH v2 07/11] arm64: dts: r8a77965: Add VSP instances Kieran Bingham
2018-04-30  7:28   ` Simon Horman
2018-04-27 16:57 ` [PATCH v2 08/11] arm64: dts: r8a77965: Populate the DU instance placeholder Kieran Bingham
2018-04-30  7:30   ` Simon Horman
2018-04-27 16:57 ` [PATCH v2 09/11] arm64: dts: r8a77965: Add HDMI encoder instance Kieran Bingham
2018-04-30  7:32   ` Simon Horman
2018-04-27 16:57 ` [PATCH v2 10/11] arm64: dts: r8a77965-salvator-x: Enable DU external clocks and HDMI Kieran Bingham
2018-04-27 21:34   ` Laurent Pinchart
2018-04-30  7:34     ` Simon Horman
2018-05-28  9:06   ` Geert Uytterhoeven
2018-05-29  1:44     ` Kuninori Morimoto
2018-05-29  6:48       ` Geert Uytterhoeven
2018-05-29  8:08         ` Kuninori Morimoto
2018-05-29  9:08     ` Kieran Bingham
2018-05-29  9:12       ` Geert Uytterhoeven
2018-04-27 16:57 ` [PATCH v2 11/11] arm64: dts: r8a77965-salvator-xs: " Kieran Bingham
2018-04-27 21:32   ` Laurent Pinchart
2018-04-27 21:40     ` Kieran Bingham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180427165722.19445-6-kieran.bingham+renesas@ideasonboard.com \
    --to=kieran.bingham+renesas@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --subject='Re: [PATCH v2 05/11] drm: rcar-du: Add R8A77965 support' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).