1 From d8eac0d3e4f6c6f9e5f789c8e2288699b2afebcb Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 21 Jan 2019 21:17:27 +0000
4 Subject: [PATCH] overlays: Add ssd1306 overlay for OLED display
6 See: https://github.com/raspberrypi/firmware/issues/1098
8 Signed-off-by: mincepi <mincepi@gmail.com>
10 arch/arm/boot/dts/overlays/Makefile | 1 +
11 arch/arm/boot/dts/overlays/README | 31 ++++++++++++++++
12 .../arm/boot/dts/overlays/ssd1306-overlay.dts | 36 +++++++++++++++++++
13 3 files changed, 68 insertions(+)
14 create mode 100644 arch/arm/boot/dts/overlays/ssd1306-overlay.dts
16 --- a/arch/arm/boot/dts/overlays/Makefile
17 +++ b/arch/arm/boot/dts/overlays/Makefile
18 @@ -135,6 +135,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
23 superaudioboard.dtbo \
26 --- a/arch/arm/boot/dts/overlays/README
27 +++ b/arch/arm/boot/dts/overlays/README
28 @@ -1950,6 +1950,37 @@ Params: cs0_pin GPIO pin
29 is 'okay' or enabled).
33 +Info: Overlay for activation of SSD1306 over I2C OLED display framebuffer.
34 +Load: dtoverlay=ssd1306,<param>=<val>
35 +Params: address Location in display memory of first character.
37 + width Width of display. (default=128)
38 + height Height of display. (default=64)
39 + offset virtual channel a. (default=0)
40 + normal Has no effect on displays tested. (default=not
42 + sequential Set this if every other scan line is missing.
44 + remapped Set this if display is garbled. (default=not
46 + inverted Set this if display is inverted and mirrored.
50 + Typical usage for 128x64 display: dtoverlay=ssd1306,inverted
52 + Typical usage for 128x32 display: dtoverlay=ssd1306,inverted,sequential
54 + i2c_baudrate=400000 will speed up the display.
56 + i2c_baudrate=1000000 seems to work even though it's not officially
57 + supported by the hardware, and is faster still.
59 + For more information refer to the device datasheet at:
60 + https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
64 Info: Configures the SuperAudioBoard sound card
65 Load: dtoverlay=superaudioboard,<param>=<val>
67 +++ b/arch/arm/boot/dts/overlays/ssd1306-overlay.dts
69 +// Overlay for SSD1306 128x64 and 128x32 OLED displays
74 + compatible = "brcm,bcm2718";
81 + #address-cells = <1>;
85 + compatible = "solomon,ssd1306fb-i2c";
87 + solomon,width = <128>;
88 + solomon,height = <64>;
89 + solomon,page-offset = <0>;
95 + address = <&ssd1306>,"reg:0";
96 + width = <&ssd1306>,"solomon,width:0";
97 + height = <&ssd1306>,"solomon,height:0";
98 + offset = <&ssd1306>,"solomon,page-offset:0";
99 + normal = <&ssd1306>,"solomon,segment-no-remap?";
100 + sequential = <&ssd1306>,"solomon,com-seq?";
101 + remapped = <&ssd1306>,"solomon,com-lrremap?";
102 + inverted = <&ssd1306>,"solomon,com-invdir?";