drm/panel: add support for Sharp F402 2048x1536 panel
authorhero.huang <hero.huang@rock-chips.com>
Tue, 28 Mar 2017 02:33:41 +0000 (10:33 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 7 Apr 2017 06:36:03 +0000 (14:36 +0800)
dt-bindings: consolidate display related bindings

Change-Id: I92788135d110b44185d93f3a5a54d800b4d55a1c
Signed-off-by: hero.huang <hero.huang@rock-chips.com>
Documentation/devicetree/bindings/display/panel/sharp,lcd-f402.txt [new file with mode: 0644]
drivers/gpu/drm/panel/panel-simple.c

diff --git a/Documentation/devicetree/bindings/display/panel/sharp,lcd-f402.txt b/Documentation/devicetree/bindings/display/panel/sharp,lcd-f402.txt
new file mode 100644 (file)
index 0000000..c51dd4a
--- /dev/null
@@ -0,0 +1,7 @@
+Sharp F402 (2048x1536 pexels) TFT LCD panel
+
+Required properties:
+- compatible: should be "sharp,lcd-f402"
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
index 8d9a15f..7ed53fc 100644 (file)
@@ -1115,6 +1115,31 @@ static const struct panel_desc lg_lb070wv8 = {
        .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
 };
 
+static const struct drm_display_mode sharp_lcd_f402_mode = {
+       .clock = 205000,
+       .hdisplay = 1536,
+       .hsync_start = 1536 + 12,
+       .hsync_end = 1536 + 12 + 48,
+       .htotal = 1536 + 12 + 48 + 16,
+       .vdisplay = 2048,
+       .vsync_start = 2048 + 8,
+       .vsync_end = 2048 + 8 + 8,
+       .vtotal = 2048 + 8 + 8 + 4,
+       .vrefresh = 60,
+       .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+};
+
+static const struct panel_desc sharp_lcd_f402 = {
+       .modes = &sharp_lcd_f402_mode,
+       .num_modes = 1,
+       .bpc = 8,
+       .size = {
+               .width = 95,
+               .height = 54,
+       },
+       .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
+};
+
 static const struct drm_display_mode lg_lp079qx1_sp0v_mode = {
        .clock = 200000,
        .hdisplay = 1536,
@@ -1471,6 +1496,9 @@ static const struct of_device_id platform_of_match[] = {
        }, {
                .compatible = "samsung,ltn140at29-301",
                .data = &samsung_ltn140at29_301,
+       }, {
+               .compatible = "sharp,lcd-f402",
+               .data = &sharp_lcd_f402,
        }, {
                .compatible = "shelly,sca07010-bfn-lnn",
                .data = &shelly_sca07010_bfn_lnn,