0500-overlays-Add-dpi18-overlay-1634.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. From 654ea8a724a4abaf000841788cec8f90756682a7 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <pelwell@users.noreply.github.com>
  3. Date: Mon, 12 Sep 2016 13:46:56 +0100
  4. Subject: [PATCH] overlays: Add dpi18 overlay (#1634)
  5. Add support for 18-bit DPI displays. Although the dpi24 overlay could
  6. be used, this overlay leaves GPIOs 22-27 free for other uses.
  7. ---
  8. arch/arm/boot/dts/overlays/Makefile | 1 +
  9. arch/arm/boot/dts/overlays/README | 8 +++++++
  10. arch/arm/boot/dts/overlays/dpi18-overlay.dts | 31 ++++++++++++++++++++++++++++
  11. 3 files changed, 40 insertions(+)
  12. create mode 100644 arch/arm/boot/dts/overlays/dpi18-overlay.dts
  13. --- a/arch/arm/boot/dts/overlays/Makefile
  14. +++ b/arch/arm/boot/dts/overlays/Makefile
  15. @@ -22,6 +22,7 @@ dtbo-$(RPI_DT_OVERLAYS) += audremap.dtbo
  16. dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo
  17. dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo
  18. dtbo-$(RPI_DT_OVERLAYS) += dionaudio-loco.dtbo
  19. +dtbo-$(RPI_DT_OVERLAYS) += dpi18.dtbo
  20. dtbo-$(RPI_DT_OVERLAYS) += dpi24.dtbo
  21. dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo
  22. dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo
  23. --- a/arch/arm/boot/dts/overlays/README
  24. +++ b/arch/arm/boot/dts/overlays/README
  25. @@ -283,6 +283,14 @@ Load: dtoverlay=dionaudio-loco
  26. Params: <None>
  27. +Name: dpi18
  28. +Info: Overlay for a generic 18-bit DPI display
  29. + This uses GPIOs 0-21 (so no I2C, uart etc.), and activates the output
  30. + 2-3 seconds after the kernel has started.
  31. +Load: dtoverlay=dpi18
  32. +Params: <None>
  33. +
  34. +
  35. Name: dpi24
  36. Info: Overlay for a generic 24-bit DPI display
  37. This uses GPIOs 0-27 (so no I2C, uart etc.), and activates the output
  38. --- /dev/null
  39. +++ b/arch/arm/boot/dts/overlays/dpi18-overlay.dts
  40. @@ -0,0 +1,31 @@
  41. +/dts-v1/;
  42. +/plugin/;
  43. +
  44. +/{
  45. + compatible = "brcm,bcm2708";
  46. +
  47. + // There is no DPI driver module, but we need a platform device
  48. + // node (that doesn't already use pinctrl) to hang the pinctrl
  49. + // reference on - leds will do
  50. +
  51. + fragment@0 {
  52. + target = <&leds>;
  53. + __overlay__ {
  54. + pinctrl-names = "default";
  55. + pinctrl-0 = <&dpi18_pins>;
  56. + };
  57. + };
  58. +
  59. + fragment@1 {
  60. + target = <&gpio>;
  61. + __overlay__ {
  62. + dpi18_pins: dpi18_pins {
  63. + brcm,pins = <0 1 2 3 4 5 6 7 8 9 10 11
  64. + 12 13 14 15 16 17 18 19 20
  65. + 21>;
  66. + brcm,function = <6>; /* alt2 */
  67. + brcm,pull = <0>; /* no pull */
  68. + };
  69. + };
  70. + };
  71. +};