Skip to content

Commit

Permalink
drivers/video: add support for the Solomon SSD1307 OLED Controller
Browse files Browse the repository at this point in the history
Add support for the Solomon SSD1307 OLED controller found on the
Crystalfontz CFA10036 board.

This controller can drive a display with a resolution up to 128x39 and can
operate over I2C or SPI.

The current driver has only been tested on the CFA-10036, that is using
this controller over I2C to driver a 96x16 OLED screen.

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Brian Lilly <brian@crystalfontz.com>
Cc: Greg KH <gregkh@linux-foundation.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Thomas Petazzoni <thomas@free-electrons.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Maxime Ripard authored and Tomi Valkeinen committed Dec 10, 2012
1 parent 8f22e8e commit a2ed00d
Show file tree
Hide file tree
Showing 4 changed files with 436 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Documentation/devicetree/bindings/video/ssd1307fb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
* Solomon SSD1307 Framebuffer Driver

Required properties:
- compatible: Should be "solomon,ssd1307fb-<bus>". The only supported bus for
now is i2c.
- reg: Should contain address of the controller on the I2C bus. Most likely
0x3c or 0x3d
- pwm: Should contain the pwm to use according to the OF device tree PWM
specification [0]
- reset-gpios: Should contain the GPIO used to reset the OLED display

Optional properties:
- reset-active-low: Is the reset gpio is active on physical low?

[0]: Documentation/devicetree/bindings/pwm/pwm.txt

Examples:
ssd1307: oled@3c {
compatible = "solomon,ssd1307fb-i2c";
reg = <0x3c>;
pwms = <&pwm 4 3000>;
reset-gpios = <&gpio2 7>;
reset-active-low;
};
15 changes: 15 additions & 0 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2442,4 +2442,19 @@ config FB_SH_MOBILE_MERAM
Up to 4 memory channels can be configured, allowing 4 RGB or
2 YCbCr framebuffers to be configured.

config FB_SSD1307
tristate "Solomon SSD1307 framebuffer support"
depends on FB && I2C
depends on OF
depends on GENERIC_GPIO
select FB_SYS_FOPS
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
select FB_DEFERRED_IO
select PWM
help
This driver implements support for the Solomon SSD1307
OLED controller over I2C.

endmenu
1 change: 1 addition & 0 deletions drivers/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ obj-$(CONFIG_FB_BFIN_7393) += bfin_adv7393fb.o
obj-$(CONFIG_FB_MX3) += mx3fb.o
obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o
obj-$(CONFIG_FB_MXS) += mxsfb.o
obj-$(CONFIG_FB_SSD1307) += ssd1307fb.o

# the test framebuffer is last
obj-$(CONFIG_FB_VIRTUAL) += vfb.o
Expand Down
Loading

0 comments on commit a2ed00d

Please sign in to comment.