]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/panel/panel-simple.c
drm/panel: simple: Add support for Samsung LTN140AT29 panel
[karo-tx-linux.git] / drivers / gpu / drm / panel / panel-simple.c
index e95385bf835634e163cced6947920c688f7cc9a7..2da228576d0ca90f1c37697e98d9619d7f9ca3cb 100644 (file)
@@ -61,6 +61,8 @@ struct panel_desc {
                unsigned int disable;
                unsigned int unprepare;
        } delay;
+
+       u32 bus_format;
 };
 
 struct panel_simple {
@@ -111,6 +113,9 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel)
        connector->display_info.bpc = panel->desc->bpc;
        connector->display_info.width_mm = panel->desc->size.width;
        connector->display_info.height_mm = panel->desc->size.height;
+       if (panel->desc->bus_format)
+               drm_display_info_set_bus_formats(&connector->display_info,
+                                                &panel->desc->bus_format, 1);
 
        return num;
 }
@@ -443,6 +448,34 @@ static const struct panel_desc auo_b133htn01 = {
        },
 };
 
+static const struct drm_display_mode avic_tm070ddh03_mode = {
+       .clock = 51200,
+       .hdisplay = 1024,
+       .hsync_start = 1024 + 160,
+       .hsync_end = 1024 + 160 + 4,
+       .htotal = 1024 + 160 + 4 + 156,
+       .vdisplay = 600,
+       .vsync_start = 600 + 17,
+       .vsync_end = 600 + 17 + 1,
+       .vtotal = 600 + 17 + 1 + 17,
+       .vrefresh = 60,
+};
+
+static const struct panel_desc avic_tm070ddh03 = {
+       .modes = &avic_tm070ddh03_mode,
+       .num_modes = 1,
+       .bpc = 8,
+       .size = {
+               .width = 154,
+               .height = 90,
+       },
+       .delay = {
+               .prepare = 20,
+               .enable = 200,
+               .disable = 200,
+       },
+};
+
 static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
        .clock = 72070,
        .hdisplay = 1366,
@@ -558,6 +591,30 @@ static const struct panel_desc foxlink_fl500wvr00_a0t = {
                .width = 108,
                .height = 65,
        },
+       .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+};
+
+static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
+       .clock = 9000,
+       .hdisplay = 480,
+       .hsync_start = 480 + 5,
+       .hsync_end = 480 + 5 + 1,
+       .htotal = 480 + 5 + 1 + 40,
+       .vdisplay = 272,
+       .vsync_start = 272 + 8,
+       .vsync_end = 272 + 8 + 1,
+       .vtotal = 272 + 8 + 1 + 8,
+       .vrefresh = 60,
+};
+
+static const struct panel_desc giantplus_gpg482739qs5 = {
+       .modes = &giantplus_gpg482739qs5_mode,
+       .num_modes = 1,
+       .bpc = 8,
+       .size = {
+               .width = 95,
+               .height = 54,
+       },
 };
 
 static const struct drm_display_mode hannstar_hsd070pww1_mode = {
@@ -722,6 +779,29 @@ static const struct panel_desc samsung_ltn101nt05 = {
        },
 };
 
+static const struct drm_display_mode samsung_ltn140at29_301_mode = {
+       .clock = 76300,
+       .hdisplay = 1366,
+       .hsync_start = 1366 + 64,
+       .hsync_end = 1366 + 64 + 48,
+       .htotal = 1366 + 64 + 48 + 128,
+       .vdisplay = 768,
+       .vsync_start = 768 + 2,
+       .vsync_end = 768 + 2 + 5,
+       .vtotal = 768 + 2 + 5 + 17,
+       .vrefresh = 60,
+};
+
+static const struct panel_desc samsung_ltn140at29_301 = {
+       .modes = &samsung_ltn140at29_301_mode,
+       .num_modes = 1,
+       .bpc = 6,
+       .size = {
+               .width = 320,
+               .height = 187,
+       },
+};
+
 static const struct of_device_id platform_of_match[] = {
        {
                .compatible = "auo,b101aw03",
@@ -738,6 +818,9 @@ static const struct of_device_id platform_of_match[] = {
        }, {
                .compatible = "auo,b133xtn01",
                .data = &auo_b133xtn01,
+       }, {
+               .compatible = "avic,tm070ddh03",
+               .data = &avic_tm070ddh03,
        }, {
                .compatible = "chunghwa,claa101wa01a",
                .data = &chunghwa_claa101wa01a
@@ -756,6 +839,9 @@ static const struct of_device_id platform_of_match[] = {
        }, {
                .compatible = "foxlink,fl500wvr00-a0t",
                .data = &foxlink_fl500wvr00_a0t,
+       }, {
+               .compatible = "giantplus,gpg482739qs5",
+               .data = &giantplus_gpg482739qs5
        }, {
                .compatible = "hannstar,hsd070pww1",
                .data = &hannstar_hsd070pww1,
@@ -777,6 +863,9 @@ static const struct of_device_id platform_of_match[] = {
        }, {
                .compatible = "samsung,ltn101nt05",
                .data = &samsung_ltn101nt05,
+       }, {
+               .compatible = "samsung,ltn140at29-301",
+               .data = &samsung_ltn140at29_301,
        }, {
                /* sentinel */
        }