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