From 5e54398e1b61335883dff1be46a6c8b3ca973926 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 30 Aug 2023 18:03:37 +0100 Subject: [PATCH 0835/1016] dtoverlays: Add drm option to piscreen overlay Adds the option of selecting the DRM/KMS TinyDRM driver for this panel, rather than the deprecated FBTFT one. Signed-off-by: Dave Stevenson --- arch/arm/boot/dts/overlays/README | 3 +++ arch/arm/boot/dts/overlays/piscreen-overlay.dts | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 1c6ddebe9723..1b6fe60d00e7 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -3245,6 +3245,9 @@ Params: speed Display SPI bus speed xohms Touchpanel sensitivity (X-plate resistance) + drm Select the DRM/KMS driver instead of the FBTFT + one + Name: piscreen2r Info: PiScreen 2 with resistive TP display by OzzMaker.com diff --git a/arch/arm/boot/dts/overlays/piscreen-overlay.dts b/arch/arm/boot/dts/overlays/piscreen-overlay.dts index 1ac75a248fab..80aef4c01ae1 100644 --- a/arch/arm/boot/dts/overlays/piscreen-overlay.dts +++ b/arch/arm/boot/dts/overlays/piscreen-overlay.dts @@ -6,6 +6,8 @@ /dts-v1/; /plugin/; +#include + / { compatible = "brcm,bcm2835"; @@ -59,9 +61,9 @@ piscreen: piscreen@0{ fps = <30>; buswidth = <8>; regwidth = <16>; - reset-gpios = <&gpio 25 1>; - dc-gpios = <&gpio 24 0>; - led-gpios = <&gpio 22 0>; + reset-gpios = <&gpio 25 GPIO_ACTIVE_LOW>; + dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; + led-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; debug = <0>; init = <0x10000b0 0x00 @@ -98,5 +100,7 @@ __overrides__ { fps = <&piscreen>,"fps:0"; debug = <&piscreen>,"debug:0"; xohms = <&piscreen_ts>,"ti,x-plate-ohms;0"; + drm = <&piscreen>,"compatible=waveshare,rpi-lcd-35", + <&piscreen>,"reset-gpios:8=",; }; }; -- 2.42.0