aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0968-overlays-Add-parameters-to-adafruit18-sainsmart18.patch
blob: 99ef611fe3d96928c13ba46442a13c024f966624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
From 9249fb1ac6b8bfcc0056fe2a871d4965b774c667 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Mon, 14 Sep 2020 15:48:16 +0100
Subject: [PATCH] overlays: Add parameters to adafruit18, sainsmart18

Also fix polarity of the reset GPIO.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/overlays/README                  | 13 +++++++++++++
 arch/arm/boot/dts/overlays/adafruit18-overlay.dts  | 11 +++++++++--
 arch/arm/boot/dts/overlays/sainsmart18-overlay.dts | 10 ++++++++--
 3 files changed, 30 insertions(+), 4 deletions(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -267,6 +267,13 @@ Info:   Overlay for the SPI-connected Ad
 Load:   dtoverlay=adafruit18,<param>=<val>
 Params: green                   Use the adafruit18_green variant.
         rotate                  Display rotation {0,90,180,270}
+        speed                   SPI bus speed in Hz (default 4000000)
+        fps                     Display frame rate in Hz
+        bgr                     Enable BGR mode (default on)
+        debug                   Debug output level {0-7}
+        dc_pin                  GPIO pin for D/C (default 24)
+        reset_pin               GPIO pin for RESET (default 25)
+        led_pin                 GPIO used to control backlight (default 18)
 
 
 Name:   adau1977-adc
@@ -2271,6 +2278,12 @@ Info:   Overlay for the SPI-connected Sa
         ST7735R chip).
 Load:   dtoverlay=sainsmart18,<param>=<val>
 Params: rotate                  Display rotation {0,90,180,270}
+        speed                   SPI bus speed in Hz (default 4000000)
+        fps                     Display frame rate in Hz
+        bgr                     Enable BGR mode (default on)
+        debug                   Debug output level {0-7}
+        dc_pin                  GPIO pin for D/C (default 24)
+        reset_pin               GPIO pin for RESET (default 25)
 
 
 Name:   sc16is750-i2c
--- a/arch/arm/boot/dts/overlays/adafruit18-overlay.dts
+++ b/arch/arm/boot/dts/overlays/adafruit18-overlay.dts
@@ -33,7 +33,7 @@
 				fps = <50>;
 				height = <160>;
 				width = <128>;
-				reset-gpios = <&gpio 25 0>;
+				reset-gpios = <&gpio 25 1>;
 				dc-gpios = <&gpio 24 0>;
 				led-gpios = <&gpio 18 0>;
 				bgr;
@@ -44,6 +44,13 @@
 
 	__overrides__ {
 		green = <&af18>, "compatible=fbtft,adafruit18_green";
-		rotate = <&af18>, "rotate:0";
+		speed     = <&af18>,"spi-max-frequency:0";
+		rotate    = <&af18>,"rotate:0";
+		fps       = <&af18>,"fps:0";
+		bgr       = <&af18>,"bgr?";
+		debug     = <&af18>,"debug:0";
+		dc_pin    = <&af18>,"dc-gpios:4";
+		reset_pin = <&af18>,"reset-gpios:4";
+		led_pin   = <&af18>,"led-gpios:4";
 	};
 };
--- a/arch/arm/boot/dts/overlays/sainsmart18-overlay.dts
+++ b/arch/arm/boot/dts/overlays/sainsmart18-overlay.dts
@@ -33,7 +33,7 @@
 				fps = <50>;
 				height = <160>;
 				width = <128>;
-				reset-gpios = <&gpio 25 0>;
+				reset-gpios = <&gpio 25 1>;
 				dc-gpios = <&gpio 24 0>;
 				bgr;
 				debug = <0>;
@@ -42,6 +42,12 @@
 	};
 
 	__overrides__ {
-		rotate = <&ss18>, "rotate:0";
+		speed     = <&ss18>,"spi-max-frequency:0";
+		rotate    = <&ss18>,"rotate:0";
+		fps       = <&ss18>,"fps:0";
+		bgr       = <&ss18>,"bgr?";
+		debug     = <&ss18>,"debug:0";
+		dc_pin    = <&ss18>,"dc-gpios:4";
+		reset_pin = <&ss18>,"reset-gpios:4";
 	};
 };