]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/tidss: Add support for AM62L display subsystem
authorDevarsh Thakkar <devarsht@ti.com>
Wed, 7 May 2025 18:06:31 +0000 (23:36 +0530)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Tue, 20 May 2025 11:43:56 +0000 (14:43 +0300)
Enable display for AM62L DSS [1] which supports only a single display
pipeline using a single overlay manager, single video port and a single
video lite pipeline which does not support scaling.

The output of video port is routed to SoC boundary via DPI interface and
the DPI signals from the video port are also routed to DSI Tx controller
present within the SoC.

[1]: Section 11.7 (Display Subsystem and Peripherals)
Link : https://www.ti.com/lit/pdf/sprujb4

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://lore.kernel.org/r/20250507180631.874930-4-devarsht@ti.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drivers/gpu/drm/tidss/tidss_dispc.c
drivers/gpu/drm/tidss/tidss_dispc.h
drivers/gpu/drm/tidss/tidss_drv.c

index 774c608c88b50977ca0bd7089a6cefad94fc7c72..21363ccbd76378d025aa64d189a63b66c19d5c88 100644 (file)
@@ -440,6 +440,42 @@ const struct dispc_features dispc_am62a7_feats = {
        .vid_order = {1, 0},
 };
 
+const struct dispc_features dispc_am62l_feats = {
+       .max_pclk_khz = {
+               [DISPC_VP_DPI] = 165000,
+       },
+
+       .subrev = DISPC_AM62L,
+
+       .common = "common",
+       .common_regs = tidss_am65x_common_regs,
+
+       .num_vps = 1,
+       .vp_name = { "vp1" },
+       .ovr_name = { "ovr1" },
+       .vpclk_name =  { "vp1" },
+       .vp_bus_type = { DISPC_VP_DPI },
+
+       .vp_feat = { .color = {
+                       .has_ctm = true,
+                       .gamma_size = 256,
+                       .gamma_type = TIDSS_GAMMA_8BIT,
+               },
+       },
+
+       .num_vids = 1,
+
+       .vid_info = {
+               {
+                       .name = "vidl1",
+                       .is_lite = true,
+                       .hw_id = 1,
+               }
+       },
+
+       .vid_order = {0},
+};
+
 static const u16 *dispc_common_regmap;
 
 struct dss_vp_data {
@@ -951,6 +987,7 @@ dispc_irq_t dispc_read_and_clear_irqstatus(struct dispc_device *dispc)
                return dispc_k2g_read_and_clear_irqstatus(dispc);
        case DISPC_AM625:
        case DISPC_AM62A7:
+       case DISPC_AM62L:
        case DISPC_AM65X:
        case DISPC_J721E:
                return dispc_k3_read_and_clear_irqstatus(dispc);
@@ -968,6 +1005,7 @@ void dispc_set_irqenable(struct dispc_device *dispc, dispc_irq_t mask)
                break;
        case DISPC_AM625:
        case DISPC_AM62A7:
+       case DISPC_AM62L:
        case DISPC_AM65X:
        case DISPC_J721E:
                dispc_k3_set_irqenable(dispc, mask);
@@ -1464,6 +1502,7 @@ void dispc_ovr_set_plane(struct dispc_device *dispc, u32 hw_plane,
                break;
        case DISPC_AM625:
        case DISPC_AM62A7:
+       case DISPC_AM62L:
        case DISPC_AM65X:
                dispc_am65x_ovr_set_plane(dispc, hw_plane, hw_videoport,
                                          x, y, layer);
@@ -2384,6 +2423,7 @@ static void dispc_plane_init(struct dispc_device *dispc)
                break;
        case DISPC_AM625:
        case DISPC_AM62A7:
+       case DISPC_AM62L:
        case DISPC_AM65X:
        case DISPC_J721E:
                dispc_k3_plane_init(dispc);
@@ -2492,6 +2532,7 @@ static void dispc_vp_write_gamma_table(struct dispc_device *dispc,
                break;
        case DISPC_AM625:
        case DISPC_AM62A7:
+       case DISPC_AM62L:
        case DISPC_AM65X:
                dispc_am65x_vp_write_gamma_table(dispc, hw_videoport);
                break;
index 72a0146e57d5fbd48f4049a975ca41fbb514b1ea..28958514b8f5118d11d9a78f1345ddfd0b3888dd 100644 (file)
@@ -67,6 +67,7 @@ enum dispc_vp_bus_type {
 enum dispc_dss_subrevision {
        DISPC_K2G,
        DISPC_AM625,
+       DISPC_AM62L,
        DISPC_AM62A7,
        DISPC_AM65X,
        DISPC_J721E,
@@ -96,6 +97,7 @@ struct dispc_features {
 extern const struct dispc_features dispc_k2g_feats;
 extern const struct dispc_features dispc_am625_feats;
 extern const struct dispc_features dispc_am62a7_feats;
+extern const struct dispc_features dispc_am62l_feats;
 extern const struct dispc_features dispc_am65x_feats;
 extern const struct dispc_features dispc_j721e_feats;
 
index d4652e8cc28c1753274155f4e83db41035fcfafd..f2a4f659f574c0039cbebf1a19a9a6e0616a38ea 100644 (file)
@@ -242,6 +242,7 @@ static const struct of_device_id tidss_of_table[] = {
        { .compatible = "ti,k2g-dss", .data = &dispc_k2g_feats, },
        { .compatible = "ti,am625-dss", .data = &dispc_am625_feats, },
        { .compatible = "ti,am62a7-dss", .data = &dispc_am62a7_feats, },
+       { .compatible = "ti,am62l-dss", .data = &dispc_am62l_feats, },
        { .compatible = "ti,am65x-dss", .data = &dispc_am65x_feats, },
        { .compatible = "ti,j721e-dss", .data = &dispc_j721e_feats, },
        { }