0341-drm-panel-simple-Add-the-7-DPI-panel-from-Adafruit.patch 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. From 33b3868f0ec0b813153b977b08087fa4e4d5a5d3 Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Thu, 24 Mar 2016 17:23:48 -0700
  4. Subject: [PATCH 341/381] drm/panel: simple: Add the 7" DPI panel from Adafruit
  5. This is a basic TFT panel with a 40-pin FPC connector on it. The
  6. specification doesn't define timings, but the Adafruit instructions
  7. were setting up 800x480 CVT.
  8. v2: Add .bus_format and vsync/hsync flags.
  9. Signed-off-by: Eric Anholt <eric@anholt.net>
  10. Acked-by: Rob Herring <robh@kernel.org>
  11. [treding@nvidia.com: keep entries properly sorted]
  12. Signed-off-by: Thierry Reding <treding@nvidia.com>
  13. (cherry picked from commit 8070fdbd024727c752f815b18e5339c681a01bbe)
  14. ---
  15. .../bindings/display/panel/ontat,yx700wv03.txt | 7 ++++
  16. drivers/gpu/drm/panel/panel-simple.c | 37 ++++++++++++++++++++++
  17. 2 files changed, 44 insertions(+)
  18. create mode 100644 Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt
  19. --- /dev/null
  20. +++ b/Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt
  21. @@ -0,0 +1,7 @@
  22. +On Tat Industrial Company 7" DPI TFT panel.
  23. +
  24. +Required properties:
  25. +- compatible: should be "ontat,yx700wv03"
  26. +
  27. +This binding is compatible with the simple-panel binding, which is specified
  28. +in simple-panel.txt in this directory.
  29. --- a/drivers/gpu/drm/panel/panel-simple.c
  30. +++ b/drivers/gpu/drm/panel/panel-simple.c
  31. @@ -1003,6 +1003,40 @@ static const struct panel_desc okaya_rs8
  32. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  33. };
  34. +/*
  35. + * 800x480 CVT. The panel appears to be quite accepting, at least as far as
  36. + * pixel clocks, but this is the timing that was being used in the Adafruit
  37. + * installation instructions.
  38. + */
  39. +static const struct drm_display_mode ontat_yx700wv03_mode = {
  40. + .clock = 29500,
  41. + .hdisplay = 800,
  42. + .hsync_start = 824,
  43. + .hsync_end = 896,
  44. + .htotal = 992,
  45. + .vdisplay = 480,
  46. + .vsync_start = 483,
  47. + .vsync_end = 493,
  48. + .vtotal = 500,
  49. + .vrefresh = 60,
  50. + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  51. +};
  52. +
  53. +/*
  54. + * Specification at:
  55. + * https://www.adafruit.com/images/product-files/2406/c3163.pdf
  56. + */
  57. +static const struct panel_desc ontat_yx700wv03 = {
  58. + .modes = &ontat_yx700wv03_mode,
  59. + .num_modes = 1,
  60. + .bpc = 8,
  61. + .size = {
  62. + .width = 154,
  63. + .height = 83,
  64. + },
  65. + .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  66. +};
  67. +
  68. static const struct drm_display_mode ortustech_com43h4m85ulc_mode = {
  69. .clock = 25000,
  70. .hdisplay = 480,
  71. @@ -1179,6 +1213,9 @@ static const struct of_device_id platfor
  72. .compatible = "okaya,rs800480t-7x0gp",
  73. .data = &okaya_rs800480t_7x0gp,
  74. }, {
  75. + .compatible = "ontat,yx700wv03",
  76. + .data = &ontat_yx700wv03,
  77. + }, {
  78. .compatible = "ortustech,com43h4m85ulc",
  79. .data = &ortustech_com43h4m85ulc,
  80. }, {