1 From 1b8ea7066ee06404e0148702bc3e85a191f6d867 Mon Sep 17 00:00:00 2001
2 From: MikeDK <m.kaplan@evva.com>
3 Date: Fri, 31 Jan 2020 12:45:43 +0100
4 Subject: [PATCH] overlays: Add sh1106-spi and ssd1351-spi overlays
7 Add overlays for SH1106 and SSD1351 based OLED displays.
8 SH1106 is present in many 1.3 inch OLEDs and SSD1351 is present in
9 1.5 inch RGB OLEDs from AliExpress.
11 This will load the staging fbtft drivers.
13 Signed-off-by: Michael Kaplan <m.kaplan@evva.com>
15 arch/arm/boot/dts/overlays/Makefile | 2 +
16 arch/arm/boot/dts/overlays/README | 23 ++++++
17 .../boot/dts/overlays/sh1106-spi-overlay.dts | 82 +++++++++++++++++++
18 .../boot/dts/overlays/ssd1351-spi-overlay.dts | 81 ++++++++++++++++++
19 4 files changed, 188 insertions(+)
20 create mode 100644 arch/arm/boot/dts/overlays/sh1106-spi-overlay.dts
21 create mode 100644 arch/arm/boot/dts/overlays/ssd1351-spi-overlay.dts
23 --- a/arch/arm/boot/dts/overlays/Makefile
24 +++ b/arch/arm/boot/dts/overlays/Makefile
25 @@ -145,6 +145,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
33 @@ -169,6 +170,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
38 superaudioboard.dtbo \
41 --- a/arch/arm/boot/dts/overlays/README
42 +++ b/arch/arm/boot/dts/overlays/README
43 @@ -2145,6 +2145,18 @@ Params: overclock_50 Clock (i
48 +Info: Overlay for SH1106 OLED via SPI using fbtft staging driver.
49 +Load: dtoverlay=sh1106-spi,<param>=<val>
50 +Params: speed SPI bus speed (default 4000000)
51 + rotate Display rotation (0, 90, 180 or 270; default 0)
52 + fps Delay between frame updates (default 25)
53 + debug Debug output level (0-7; default 0)
54 + dc_pin GPIO pin for D/C (default 24)
55 + reset_pin GPIO pin for RESET (default 25)
56 + height Display height (32 or 64; default 64)
60 Info: Enables the Secondary Memory Interface peripheral. Uses GPIOs 2-25!
62 @@ -2440,6 +2452,17 @@ Params: speed SPI bus
63 height Display height (32 or 64; default 64)
67 +Info: Overlay for SSD1351 OLED via SPI using fbtft staging driver.
68 +Load: dtoverlay=ssd1351-spi,<param>=<val>
69 +Params: speed SPI bus speed (default 4500000)
70 + rotate Display rotation (0, 90, 180 or 270; default 0)
71 + fps Delay between frame updates (default 25)
72 + debug Debug output level (0-7; default 0)
73 + dc_pin GPIO pin for D/C (default 24)
74 + reset_pin GPIO pin for RESET (default 25)
78 Info: Configures the SuperAudioBoard sound card
79 Load: dtoverlay=superaudioboard,<param>=<val>
81 +++ b/arch/arm/boot/dts/overlays/sh1106-spi-overlay.dts
84 + * Device Tree overlay for SH1106 based SPI OLED display
92 + compatible = "brcm,bcm2835";
102 + target = <&spidev0>;
104 + status = "disabled";
109 + target = <&spidev1>;
111 + status = "disabled";
118 + sh1106_pins: sh1106_pins {
119 + brcm,pins = <25 24>;
120 + brcm,function = <1 1>; /* out out */
128 + /* needed to avoid dtc warning */
129 + #address-cells = <1>;
133 + compatible = "sinowealth,sh1106";
135 + pinctrl-names = "default";
136 + pinctrl-0 = <&sh1106_pins>;
138 + spi-max-frequency = <4000000>;
144 + reset-gpios = <&gpio 25 0>;
145 + dc-gpios = <&gpio 24 0>;
148 + sinowealth,height = <64>;
149 + sinowealth,width = <128>;
150 + sinowealth,page-offset = <0>;
156 + speed = <&sh1106>,"spi-max-frequency:0";
157 + rotate = <&sh1106>,"rotate:0";
158 + fps = <&sh1106>,"fps:0";
159 + debug = <&sh1106>,"debug:0";
160 + dc_pin = <&sh1106>,"dc-gpios:4>";
161 + reset_pin = <&sh1106>,"reset-gpios:4>";
162 + height = <&sh1106>,"sinowealth,height:0>";
166 +++ b/arch/arm/boot/dts/overlays/ssd1351-spi-overlay.dts
169 + * Device Tree overlay for SSD1351 based SPI OLED display
177 + compatible = "brcm,bcm2835";
187 + target = <&spidev0>;
189 + status = "disabled";
194 + target = <&spidev1>;
196 + status = "disabled";
203 + ssd1351_pins: ssd1351_pins {
204 + brcm,pins = <25 24>;
205 + brcm,function = <1 1>; /* out out */
213 + /* needed to avoid dtc warning */
214 + #address-cells = <1>;
217 + ssd1351: ssd1351@0{
218 + compatible = "solomon,ssd1351";
220 + pinctrl-names = "default";
221 + pinctrl-0 = <&ssd1351_pins>;
223 + spi-max-frequency = <4500000>;
229 + reset-gpios = <&gpio 25 0>;
230 + dc-gpios = <&gpio 24 0>;
233 + solomon,height = <128>;
234 + solomon,width = <128>;
235 + solomon,page-offset = <0>;
241 + speed = <&ssd1351>,"spi-max-frequency:0";
242 + rotate = <&ssd1351>,"rotate:0";
243 + fps = <&ssd1351>,"fps:0";
244 + debug = <&ssd1351>,"debug:0";
245 + dc_pin = <&ssd1351>,"dc-gpios:4>";
246 + reset_pin = <&ssd1351>,"reset-gpios:4>";