From 865ddf26070fb039fa8547bfaa3434ad56ec4973 Mon Sep 17 00:00:00 2001
From: Devarsh Thakkar <devarsht@ti.com>
Date: Thu, 17 Apr 2025 19:20:52 +0530
Subject: [PATCH 1/3] HACK: drm/panel: simple: Add dummy bt656 progressive
 display

Add dummy panel with 720x480@60 Hz NTSC compatible timings.
Pixel clock adjusted to match 60 Hz from tidss.

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 31 ++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 29838b6de12b..c6441d466470 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1526,6 +1526,34 @@ static const struct panel_desc cdtech_s043wq26h_ct7 = {
 	.bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
 };
 
+/* S070PWS19HP-FC21 2017/04/22 */
+static const struct drm_display_mode bt656_480p_mode = {
+	.clock = 63125,
+	.hdisplay = 720,
+	.hsync_start = 720 + 20,
+	.hsync_end = 720 + 20 + 552,
+	.htotal = 720 + 20 + 3 + 552,
+	.vdisplay = 480,
+	.vsync_start = 480 + 38,
+	.vsync_end = 480 + 38,
+	.vtotal = 480 + 38 + 6,
+	.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
+};
+
+static const struct panel_desc bt656_480p = {
+	.modes = &bt656_480p_mode,
+	.num_modes = 1,
+	.bpc = 8,
+	.size = {
+		.width = 129,
+		.height = 86,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
+		     DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
+	.connector_type = DRM_MODE_CONNECTOR_DPI,
+};
+
 /* S070PWS19HP-FC21 2017/04/22 */
 static const struct drm_display_mode cdtech_s070pws19hp_fc21_mode = {
 	.clock = 51200,
@@ -4736,6 +4764,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "cdtech,s070pws19hp-fc21",
 		.data = &cdtech_s070pws19hp_fc21,
+	}, {
+		.compatible = "dummy,bt656-480p",
+		.data = &bt656_480p,
 	}, {
 		.compatible = "cdtech,s070swv29hg-dc44",
 		.data = &cdtech_s070swv29hg_dc44,
-- 
2.39.1

