950-0835-dtoverlays-Add-drm-option-to-piscreen-overlay.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. From 5e54398e1b61335883dff1be46a6c8b3ca973926 Mon Sep 17 00:00:00 2001
  2. From: Dave Stevenson <[email protected]>
  3. Date: Wed, 30 Aug 2023 18:03:37 +0100
  4. Subject: [PATCH] dtoverlays: Add drm option to piscreen overlay
  5. Adds the option of selecting the DRM/KMS TinyDRM driver for
  6. this panel, rather than the deprecated FBTFT one.
  7. Signed-off-by: Dave Stevenson <[email protected]>
  8. ---
  9. arch/arm/boot/dts/overlays/README | 3 +++
  10. arch/arm/boot/dts/overlays/piscreen-overlay.dts | 10 +++++++---
  11. 2 files changed, 10 insertions(+), 3 deletions(-)
  12. --- a/arch/arm/boot/dts/overlays/README
  13. +++ b/arch/arm/boot/dts/overlays/README
  14. @@ -3245,6 +3245,9 @@ Params: speed Display
  15. xohms Touchpanel sensitivity (X-plate resistance)
  16. + drm Select the DRM/KMS driver instead of the FBTFT
  17. + one
  18. +
  19. Name: piscreen2r
  20. Info: PiScreen 2 with resistive TP display by OzzMaker.com
  21. --- a/arch/arm/boot/dts/overlays/piscreen-overlay.dts
  22. +++ b/arch/arm/boot/dts/overlays/piscreen-overlay.dts
  23. @@ -6,6 +6,8 @@
  24. /dts-v1/;
  25. /plugin/;
  26. +#include <dt-bindings/gpio/gpio.h>
  27. +
  28. / {
  29. compatible = "brcm,bcm2835";
  30. @@ -59,9 +61,9 @@
  31. fps = <30>;
  32. buswidth = <8>;
  33. regwidth = <16>;
  34. - reset-gpios = <&gpio 25 1>;
  35. - dc-gpios = <&gpio 24 0>;
  36. - led-gpios = <&gpio 22 0>;
  37. + reset-gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
  38. + dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
  39. + led-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
  40. debug = <0>;
  41. init = <0x10000b0 0x00
  42. @@ -98,5 +100,7 @@
  43. fps = <&piscreen>,"fps:0";
  44. debug = <&piscreen>,"debug:0";
  45. xohms = <&piscreen_ts>,"ti,x-plate-ohms;0";
  46. + drm = <&piscreen>,"compatible=waveshare,rpi-lcd-35",
  47. + <&piscreen>,"reset-gpios:8=",<GPIO_ACTIVE_HIGH>;
  48. };
  49. };