Add support for the OLED in the CFA10036
Subsystems (3)
v5 cover Add support for the OLED in the CFA10036
Hi everyone,
This patchset adds support for the solomon SSD1307 OLED controller present in the CFA-10036 board.
It first adds the framebuffer driver for this controller, and then the needed bits to enable it in the cfa10036 dts.
Considering that the driver has been around since almost two months now, and I have not received any comments on the framebuffer part, I'd very much like it to be included in 3.7 if possible.
Thanks,
Maxime
Changes from v4:
* Fix kernel crash when writing more data than the internal buffer space by adding boundary check for the fb_write function
Changes from v3:
* Changed the dt property name to remove the leading oled- and changed the reset-gpio property to reset-gpios
Changes from v2:
* Add the pin name as comment to the pwm4 pinctrl declaration
* Change slightly the documentation of the dt bindings for the gpios to remove the mxs-specific cell.
Changes from v1:
* Did some factorisation of the ssd1307fb_write* functions.
* Filled the smem_start field of the fb_fix_screeninfo structure
* Fixed the broken pwm declaration
* Change the names of oled-reset-gpios and reset-active-low properties in the device tree to oled-reset-gpio and oled-reset-active-low for consistency
Maxime Ripard (2):
video: Add support for the Solomon SSD1307 OLED Controller
ARM: dts: mxs: add oled support for the cfa-10036
.../devicetree/bindings/video/ssd1307fb.txt | 24 ++ arch/arm/boot/dts/imx28-cfa10036.dts | 20 + drivers/video/Kconfig | 13 + drivers/video/Makefile | 1 + drivers/video/ssd1307fb.c | 407 ++++++++++++++++++++ 5 files changed, 465 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/ssd1307fb.txt create mode 100644 drivers/video/ssd1307fb.c
Signature · 1 line
1.7.9.5
PATCH v5 1/2 video: Add support for the Solomon SSD1307 OLED Controller
This patch adds 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.
--- .../devicetree/bindings/video/ssd1307fb.txt | 24 ++ drivers/video/Kconfig | 13 + drivers/video/Makefile | 1 + drivers/video/ssd1307fb.c | 407 ++++++++++++++++++++ 4 files changed, 445 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/ssd1307fb.txt create mode 100644 drivers/video/ssd1307fb.c
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 at 3c { + compatible = "solomon,ssd1307fb-i2c"; + reg = <0x3c>; + pwms = <&pwm 4 3000>; + reset-gpios = <&gpio2 7>; + reset-active-low; +};
drivers/video/Kconfig +13 -0
@@ -2469,4 +2469,17 @@ 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 + 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 +1 -0
@@ -164,6 +164,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
drivers/video/ssd1307fb.c new file +407 -0
407 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 1/2 video: Add support for the Solomon SSD1307 OLED Controller
Hi Florian,
Le 20/09/2012 18:33, Maxime Ripard a ?crit :
Quoted 6 lines
This patch adds 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.
Quoted 6 lines
The current driver has only been tested on the CFA-10036, that is using this controller over I2C to driver a 96x16 OLED screen.
Signed-off-by Maxime Ripard <[email protected]>Cc Brian Lilly <[email protected]>
Would you consider merging this patch or review it?
It has been around for quite some time now and has not received any comments for at least the 2 last versions, so I guess there is not much left holding it back (unless, of course, if you have some comments to address), and I really would like to have it in 3.7.
Thanks,
Maxime
Signature · 4 lines
Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v5 1/2 video: Add support for the Solomon SSD1307 OLED Controller
Hello Florian,
Le 21/09/2012 16:04, Maxime Ripard a ?crit :
Quoted 11 lines
Le 20/09/2012 18:33, Maxime Ripard a ?crit :
Quoted 10 lines
This patch adds 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.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Maxime Ripard <[email protected]>Cc Brian Lilly <[email protected]>Would you consider merging this patch or review it?
It has been around for quite some time now and has not received any comments for at least the 2 last versions, so I guess there is not much left holding it back (unless, of course, if you have some comments to address), and I really would like to have it in 3.7.
I guess we missed the 3.7 merge here. That's no big deal, but I sent the patch series on a regular basis, starting 07/17 (sent new versions on 07/31, 08/23, 09/05 and 09/20), addressed all the issues that were raised, and never got any feedback from you, either positive or negative. The patches affecting the MX28 device trees have already been merged by Shawn Guo into its tree, so only the driver and the bindings remain to be merged. So I'm kind of lost on what should I do here?
Is it because I have an obviously broken driver or you don't have enough time, or you don't want to merge drivers for such type of low resolution controllers, or any other reason?
Thanks for your answer,
Maxime
Signature · 4 lines
Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/2 video: Add support for the Solomon SSD1307 OLED Controller
Hi Maxime,
Quoted 31 lines · Maxime Ripard
Hello Florian,
Le 21/09/2012 16:04, Maxime Ripard a ?crit :
Quoted 11 lines
Le 20/09/2012 18:33, Maxime Ripard a ?crit :
Quoted 10 lines
This patch adds 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.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Maxime Ripard <[email protected]>Cc Brian Lilly <[email protected]>Would you consider merging this patch or review it?
It has been around for quite some time now and has not received any comments for at least the 2 last versions, so I guess there is not much left holding it back (unless, of course, if you have some comments to address), and I really would like to have it in 3.7.I guess we missed the 3.7 merge here. That's no big deal, but I sent the patch series on a regular basis, starting 07/17 (sent new versions on 07/31, 08/23, 09/05 and 09/20), addressed all the issues that were raised, and never got any feedback from you, either positive or negative. The patches affecting the MX28 device trees have already been merged by Shawn Guo into its tree, so only the driver and the bindings remain to be merged. So I'm kind of lost on what should I do here?
Quoted 3 lines
Is it because I have an obviously broken driver or you don't have enough time, or you don't want to merge drivers for such type of low resolution controllers, or any other reason?
I don't see any reason to not support low resolutions, might be a nice status monitor for embedded devices.
It's not your fault. It's just that for the past two months writing my thesis reduced my free time (and hence the time that I could potentially use for reviewing patches) to approximately zero. While I managed to get some smaller patches done, there really wasn't any time to process the 3-4 completely new things pending and some scarier patches which touch the core infrastructure.
I think that it should be better soon, at least my thesis is now done, but I also have to fix up the rest of my life that was neglected while writing, including my paid jobs.
Best regards,
Florian Tobias Schandinat
PATCH v5 1/2 video: Add support for the Solomon SSD1307 OLED Controller
Hi Florian,
Le 11/10/2012 03:06, Florian Tobias Schandinat a ?crit :
Quoted 38 lines
Hi Maxime,
Quoted 31 lines · Maxime Ripard
Hello Florian,
Le 21/09/2012 16:04, Maxime Ripard a ?crit :
Quoted 11 lines
Le 20/09/2012 18:33, Maxime Ripard a ?crit :
Quoted 10 lines
This patch adds 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.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Maxime Ripard <[email protected]>Cc Brian Lilly <[email protected]>Would you consider merging this patch or review it?
It has been around for quite some time now and has not received any comments for at least the 2 last versions, so I guess there is not much left holding it back (unless, of course, if you have some comments to address), and I really would like to have it in 3.7.I guess we missed the 3.7 merge here. That's no big deal, but I sent the patch series on a regular basis, starting 07/17 (sent new versions on 07/31, 08/23, 09/05 and 09/20), addressed all the issues that were raised, and never got any feedback from you, either positive or negative. The patches affecting the MX28 device trees have already been merged by Shawn Guo into its tree, so only the driver and the bindings remain to be merged. So I'm kind of lost on what should I do here?
Quoted 3 lines
Is it because I have an obviously broken driver or you don't have enough time, or you don't want to merge drivers for such type of low resolution controllers, or any other reason?
Quoted 11 lines
I don't see any reason to not support low resolutions, might be a nice status monitor for embedded devices.
It's not your fault. It's just that for the past two months writing my thesis reduced my free time (and hence the time that I could potentially use for reviewing patches) to approximately zero. While I managed to get some smaller patches done, there really wasn't any time to process the 3-4 completely new things pending and some scarier patches which touch the core infrastructure.
I think that it should be better soon, at least my thesis is now done, but I also have to fix up the rest of my life that was neglected while writing, including my paid jobs.
Ok, that's fine :)
How do you want to proceed? To you want me to resend the patchset, or you will review this one when you will have some time?
Thanks,
Maxime
Signature · 4 lines
Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v5 2/2 ARM: dts: mxs: add oled support for the cfa-10036
In reply to Maxime Ripard--- arch/arm/boot/dts/imx28-cfa10036.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/boot/dts/imx28-cfa10036.dts +20 -0
@@ -33,11 +33,31 @@ }; apbx at 80040000 { + pwm: pwm at 80064000 { + pinctrl-names = "default"; + pinctrl-0 = <&pwm4_pins_a>; + status = "okay"; + }; + duart: serial at 80074000 { pinctrl-names = "default"; pinctrl-0 = <&duart_pins_b>; status = "okay"; }; + + i2c0: i2c at 80058000 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_b>; + status = "okay"; + + ssd1307: oled at 3c { + compatible = "solomon,ssd1307fb-i2c"; + reg = <0x3c>; + pwms = <&pwm 4 3000>; + reset-gpios = <&gpio2 7 1>; + reset-active-low; + }; + }; }; };
Signature · 1 line
1.7.9.5