openwrt/target/linux/bcm27xx/patches-5.4/950-0968-overlays-Add-parameters-to-adafruit18-sainsmart18.patch
Álvaro Fernández Rojas f07e572f64 bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-18 23:42:32 +01:00

95 lines
3.3 KiB
Diff

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";
};
};