Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlay for SSD1306 framebuffer for OLED display. #1098

Open
mincepi opened this issue Jan 21, 2019 · 10 comments
Open

Overlay for SSD1306 framebuffer for OLED display. #1098

mincepi opened this issue Jan 21, 2019 · 10 comments

Comments

@mincepi
Copy link

mincepi commented Jan 21, 2019

I've successfully used the new SSD1307fb framebuffer driver with inexpensive SSD1306 controlled 128x32 and 128x64 OLED displays. They're available for a couple of dollars US from the usual Chinese suppliers, or from Adafruit as parts 3527 and 326.

Here's the overlay source:

// Overlay for SSD1306 128x64 and 128x32 OLED displays
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2718";

fragment@0 {
target = <&i2c1>;
__overlay__ {
    status = "okay";

    #address-cells = <1>;
    #size-cells = <0>;

    ssd1306: oled@3c{
	compatible = "solomon,ssd1306fb-i2c";
	reg = <0x3c>;
	solomon,width = <128>;
	solomon,height = <64>;
	solomon,page-offset = <0>;
    };
};
};

__overrides__ {
address = <&ssd1306>,"reg:0";
width = <&ssd1306>,"solomon,width:0";
height = <&ssd1306>,"solomon,height:0";
offset = <&ssd1306>,"solomon,page-offset:0";
normal = <&ssd1306>,"solomon,segment-no-remap?";
sequential = <&ssd1306>,"solomon,com-seq?";
remapped = <&ssd1306>,"solomon,com-lrremap?";
inverted = <&ssd1306>,"solomon,com-invdir?";
};

};

Also, here's a fragment that could be included in the overlay README:

Name: ssd1306
Info: Overlay for activation of SSD1306 over I2C OLED display framebuffer.
Load: dtoverlay=ssd1306,=
Params: address Location in display memory of first character.
(default=0)
width Width of display. (default=128)
height Height of display. (default=64)
offset virtual channel a. (default=0)
normal Has no effect on displays tested. (default=not set)
sequential Set this if every other scan line is missing.
(default=not set)
remapped Set this if display is garbled. (default=not set)
inverted Set this if display is inverted and mirrored.
(default=not set)

    Examples:
    Typical usage for 128x64 display: dtoverlay=ssd1306,inverted

    Typical usage for 128x32 display: dtoverlay=ssd1306,inverted,sequential

    i2c_baudrate=400000 will speed up the display.

    i2c_baudrate=1000000 seems to work even though it's not officially supported
    by the hardware, and is faster still.

    For more information refer to the device datasheet at:
    https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf

Feel free to include them in Raspbian if you wish: that would free me from maintaining my own copies!

I have a project page here if you want more info: sites.google.com/site/mincepi/pi2oled

Email me at mincepi -at- gmail.com with questions. If I need to do this request via a different method please let me know.

@pelwell
Copy link
Contributor

pelwell commented Jan 21, 2019

A Pull Request is the usual way to submit an overlay - include an entry in the Makefile (in alphabetical order, please), and a "Signed-off-by:" line - but I have enough here to work with if you'd rather not.

@pelwell
Copy link
Contributor

pelwell commented Jan 21, 2019

P.S. This all looks good - just watch the 80 character line length limit in the README (and don't forget the two blank lines between entries).

@mincepi
Copy link
Author

mincepi commented Jan 21, 2019 via email

@pelwell
Copy link
Contributor

pelwell commented Jan 21, 2019

Can I add a Signed-off-by: line for you?

@mincepi
Copy link
Author

mincepi commented Jan 21, 2019 via email

pelwell pushed a commit to raspberrypi/linux that referenced this issue Jan 21, 2019
@pelwell
Copy link
Contributor

pelwell commented Jan 21, 2019

Done - raspberrypi/linux@0126956

@mincepi
Copy link
Author

mincepi commented Jan 21, 2019 via email

@pelwell
Copy link
Contributor

pelwell commented Jan 21, 2019

The line added to the Makefile takes care of the compilation.

@mincepi
Copy link
Author

mincepi commented Jan 21, 2019 via email

popcornmix added a commit that referenced this issue Jan 22, 2019
kernel: overlays: Add ssd1306 overlay for OLED display
See: #1098

kernel: overlays: mcp23017: Support the MCP23008
See: raspberrypi/linux#2818

kernel: overlays: Add mcp342x overlay
See: raspberrypi/linux#2819

kernel: configs: Add CONFIG_USB_UAS=m
See: raspberrypi/linux#2813

firmware: interface: Drop vcfiled
See: raspberrypi/userland#525

firmware: Add reference counting to the local audio players
See: #547

firmware: arm_loader: Add reporting the firmware git hash via the mailbox
firmware: vcos: Add reporting of which variant was built
See: raspberrypi/linux#2806

firmware: Update vcdbg help
See: #594
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Jan 22, 2019
kernel: overlays: Add ssd1306 overlay for OLED display
See: raspberrypi/firmware#1098

kernel: overlays: mcp23017: Support the MCP23008
See: raspberrypi/linux#2818

kernel: overlays: Add mcp342x overlay
See: raspberrypi/linux#2819

kernel: configs: Add CONFIG_USB_UAS=m
See: raspberrypi/linux#2813

firmware: interface: Drop vcfiled
See: raspberrypi/userland#525

firmware: Add reference counting to the local audio players
See: raspberrypi/firmware#547

firmware: arm_loader: Add reporting the firmware git hash via the mailbox
firmware: vcos: Add reporting of which variant was built
See: raspberrypi/linux#2806

firmware: Update vcdbg help
See: raspberrypi/firmware#594
pelwell pushed a commit to raspberrypi/linux that referenced this issue Jan 23, 2019
pelwell pushed a commit to raspberrypi/linux that referenced this issue Jan 23, 2019
pelwell pushed a commit to raspberrypi/linux that referenced this issue Jan 23, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Jan 24, 2019
ahmedradaideh pushed a commit to ahmedradaideh/Pi-Kernel that referenced this issue Jan 29, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 4, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 4, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 4, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 12, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 12, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 12, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 18, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 18, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 18, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 22, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 24, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 26, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 6, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 6, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 6, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 12, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 12, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 12, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 15, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 15, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 15, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 21, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 21, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 2, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 2, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 2, 2019
artynet pushed a commit to artynet/rpi-linux that referenced this issue Apr 3, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 8, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 8, 2019
Gadgetoid pushed a commit to Gadgetoid/linux that referenced this issue Apr 10, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 18, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 18, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 23, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 30, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 30, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue May 7, 2019
popcornmix pushed a commit to raspberrypi/linux that referenced this issue May 13, 2019
TiejunChina pushed a commit to raspberrypi/linux that referenced this issue Jun 19, 2019
TiejunChina pushed a commit to raspberrypi/linux that referenced this issue Jul 23, 2019
anirbanray1981-zz pushed a commit to anirbanray1981-zz/ubuntu-disco that referenced this issue Sep 18, 2019
shyam334 pushed a commit to shyam334/disco that referenced this issue Oct 1, 2019
@ypopovych
Copy link

Hello @mincepi,

Seems as solomon driver has reset-gpios option, which allows to setup GPIO pin for screen reset.

Could you, please, add this option too, so it can be configured from config.txt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants