drivers/video: add support for the Solomon SSD1307 OLED Controller
Subsystems (2)
PATCH 1/2 drivers/video: add support for the Solomon SSD1307 OLED Controller
From: Maxime Ripard <[email protected]>
Subject: drivers/video: add support for the Solomon SSD1307 OLED Controller
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.
---
Documentation/devicetree/bindings/video/ssd1307fb.txt | 24 drivers/video/Kconfig | 15 drivers/video/Makefile | 1 drivers/video/ssd1307fb.c | 396 ++++++++++ 4 files changed, 436 insertions(+)
Documentation/devicetree/bindings/video/ssd1307fb.txt new file +24 -0
@@ -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; +};
drivers/video/Kconfig renamed from drivers/video/Kconfig~drivers-video-add-support-for-the-solomon-ssd1307-oled-controller +15 -0
@@ -2444,4 +2444,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
drivers/video/Makefile renamed from drivers/video/Makefile~drivers-video-add-support-for-the-solomon-ssd1307-oled-controller +1 -0
@@ -161,6 +161,7 @@ obj-$(CONFIG_FB_BFIN_7393) += bfi 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
drivers/video/ssd1307fb.c new file +396 -0
396 lines not on this page · raw message
_
Quoted 20 lines · On 2012-12-07 22:30, [email protected] wrote:
From: Maxime Ripard <[email protected]>
Subject:drivers/video: add support for the Solomon SSD1307 OLED ControllerAdd 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.
[[email protected]: checkpatch fixes]Signed-off-by Maxime Ripard <[email protected]>Cc Brian Lilly <[email protected]>Cc Greg KH <[email protected]>Cc Florian Tobias Schandinat <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Tomi Valkeinen <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Quoted 7 lines
---
Documentation/devicetree/bindings/video/ssd1307fb.txt | 24 drivers/video/Kconfig | 15 drivers/video/Makefile | 1 drivers/video/ssd1307fb.c | 396 ++++++++++ 4 files changed, 436 insertions(+)
Thanks, queued for 3.8.
Tomi