drm/panel: simple: Add support for DataImage SCF0700C48GGU18
authorMichal Vokáč <michal.vokac@ysoft.com>
Mon, 25 Jun 2018 12:41:30 +0000 (14:41 +0200)
committerThierry Reding <treding@nvidia.com>
Tue, 10 Jul 2018 15:59:05 +0000 (17:59 +0200)
This adds support for the DataImage SCF0700C48GGU18 7.0" WVGA (800x480)
TFT LCD panel. The panel has 24-bit parallel interface and can be
supported by the simple panel driver.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1529930490-11874-2-git-send-email-michal.vokac@ysoft.com
Documentation/devicetree/bindings/display/panel/dataimage,scf0700c48ggu18.txt [new file with mode: 0644]
drivers/gpu/drm/panel/panel-simple.c

diff --git a/Documentation/devicetree/bindings/display/panel/dataimage,scf0700c48ggu18.txt b/Documentation/devicetree/bindings/display/panel/dataimage,scf0700c48ggu18.txt
new file mode 100644 (file)
index 0000000..897085e
--- /dev/null
@@ -0,0 +1,8 @@
+DataImage, Inc. 7" WVGA (800x480) TFT LCD panel with 24-bit parallel interface.
+
+Required properties:
+- compatible: should be "dataimage,scf0700c48ggu18"
+- power-supply: as specified in the base binding
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
index da7fbd2..3b226ad 100644 (file)
@@ -906,6 +906,32 @@ static const struct panel_desc chunghwa_claa101wb01 = {
        },
 };
 
+static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = {
+       .clock = 33260,
+       .hdisplay = 800,
+       .hsync_start = 800 + 40,
+       .hsync_end = 800 + 40 + 128,
+       .htotal = 800 + 40 + 128 + 88,
+       .vdisplay = 480,
+       .vsync_start = 480 + 10,
+       .vsync_end = 480 + 10 + 2,
+       .vtotal = 480 + 10 + 2 + 33,
+       .vrefresh = 60,
+       .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+};
+
+static const struct panel_desc dataimage_scf0700c48ggu18 = {
+       .modes = &dataimage_scf0700c48ggu18_mode,
+       .num_modes = 1,
+       .bpc = 8,
+       .size = {
+               .width = 152,
+               .height = 91,
+       },
+       .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+       .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
+};
+
 static const struct display_timing dlc_dlc0700yzg_1_timing = {
        .pixelclock = { 45000000, 51200000, 57000000 },
        .hactive = { 1024, 1024, 1024 },
@@ -2331,6 +2357,9 @@ static const struct of_device_id platform_of_match[] = {
        }, {
                .compatible = "chunghwa,claa101wb01",
                .data = &chunghwa_claa101wb01
+       }, {
+               .compatible = "dataimage,scf0700c48ggu18",
+               .data = &dataimage_scf0700c48ggu18,
        }, {
                .compatible = "dlc,dlc0700yzg-1",
                .data = &dlc_dlc0700yzg_1,