drm: rcar-du: Add r8a77470 support
authorFabrizio Castro <fabrizio.castro@bp.renesas.com>
Tue, 16 Oct 2018 16:58:59 +0000 (17:58 +0100)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 23 Nov 2018 11:51:22 +0000 (13:51 +0200)
Add RZ/G1C (a.k.a. r8a77470) support to the R-Car DU driver.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_drv.c

index c6770043dcdcaea664b993497d07c0d8613d0fbf..d634e846a48a02758b5dacc457d8997a243397aa 100644 (file)
@@ -77,6 +77,33 @@ static const struct rcar_du_device_info rzg1_du_r8a7745_info = {
        },
 };
 
+static const struct rcar_du_device_info rzg1_du_r8a77470_info = {
+       .gen = 2,
+       .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
+                 | RCAR_DU_FEATURE_EXT_CTRL_REGS
+                 | RCAR_DU_FEATURE_INTERLACED
+                 | RCAR_DU_FEATURE_TVM_SYNC,
+       .channels_mask = BIT(1) | BIT(0),
+       .routes = {
+               /*
+                * R8A77470 has two RGB outputs, one LVDS output, and
+                * one (currently unsupported) analog video output
+                */
+               [RCAR_DU_OUTPUT_DPAD0] = {
+                       .possible_crtcs = BIT(0),
+                       .port = 0,
+               },
+               [RCAR_DU_OUTPUT_DPAD1] = {
+                       .possible_crtcs = BIT(1),
+                       .port = 1,
+               },
+               [RCAR_DU_OUTPUT_LVDS0] = {
+                       .possible_crtcs = BIT(0) | BIT(1),
+                       .port = 2,
+               },
+       },
+};
+
 static const struct rcar_du_device_info rcar_du_r8a7779_info = {
        .gen = 2,
        .features = RCAR_DU_FEATURE_INTERLACED
@@ -342,6 +369,7 @@ static const struct rcar_du_device_info rcar_du_r8a7799x_info = {
 static const struct of_device_id rcar_du_of_table[] = {
        { .compatible = "renesas,du-r8a7743", .data = &rzg1_du_r8a7743_info },
        { .compatible = "renesas,du-r8a7745", .data = &rzg1_du_r8a7745_info },
+       { .compatible = "renesas,du-r8a77470", .data = &rzg1_du_r8a77470_info },
        { .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 },