From: hero.huang Date: Tue, 28 Mar 2017 02:33:41 +0000 (+0800) Subject: drm/panel: add support for Sharp F402 2048x1536 panel X-Git-Tag: firefly_0821_release~84 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=firefly-linux-kernel-4.4.55.git;a=commitdiff_plain;h=e8308567c1c6ee659fd464d6d27632731833f03b;ds=sidebyside drm/panel: add support for Sharp F402 2048x1536 panel dt-bindings: consolidate display related bindings Change-Id: I92788135d110b44185d93f3a5a54d800b4d55a1c Signed-off-by: hero.huang --- 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 index 000000000000..c51dd4a8b009 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sharp,lcd-f402.txt @@ -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. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 8d9a15f90bad..7ed53fccb5ea 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -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,