Skip to contentSkip to conversation

Add support for the Solomon SSD1306 OLED Controller

PATCH Applied Maxime Ripard 3 participants 6 messages Apr 22, 2013 – May 8, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover Add support for the Solomon SSD1306 OLED Controller

Hi,

This patchset adds the needed bits to the ssd1307fb driver to support the very similar Solomon SSD1306 controller.

Since the SSD1307 has been replaced by the SSD1306 in the latest CFA-10036 production samples, we also need to change the device tree accordingly.

Thanks,
Maxime

Changes from v1:
- Fix style errors

Maxime Ripard (2):
video: ssd1307fb: Add support for SSD1306 OLED controller
ARM: dts: cfa10036: Change the OLED display to SSD1306

 .../devicetree/bindings/video/ssd1307fb.txt        |   10 +-
 arch/arm/boot/dts/imx28-cfa10036.dts               |   14 +-
 arch/arm/boot/dts/imx28-cfa10049.dts               |    4 +-
 drivers/video/ssd1307fb.c                          |  273 +++++++++++++++-----
 4 files changed, 216 insertions(+), 85 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/2 video: ssd1307fb: Add support for SSD1306 OLED controller

The Solomon SSD1306 OLED controller is very similar to the SSD1307, except for the fact that the power is given through an external PWM for the 1307, and while the 1306 can generate its own power without any PWM.

---
 .../devicetree/bindings/video/ssd1307fb.txt        |   10 +-
 drivers/video/ssd1307fb.c                          |  273 +++++++++++++++-----
 2 files changed, 209 insertions(+), 74 deletions(-)
Documentation/devicetree/bindings/video/ssd1307fb.txt +7 -3
index 3d0060c..7a12542 100644
@@ -1,13 +1,17 @@
 * Solomon SSD1307 Framebuffer Driver
 
 Required properties:
-  - compatible: Should be "solomon,ssd1307fb-<bus>". The only supported bus for
-    now is i2c.
+  - compatible: Should be "solomon,<chip>fb-<bus>". The only supported bus for
+    now is i2c, and the supported chips are ssd1306 and ssd1307.
   - 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]
+         specification [0]. Only required for the ssd1307.
   - reset-gpios: Should contain the GPIO used to reset the OLED display
+  - solomon,height: Height in pixel of the screen driven by the controller
+  - solomon,width: Width in pixel of the screen driven by the controller
+  - solomon,page-offset: Offset of pages (band of 8 pixels) that the screen is
+    mapped to.
 
 Optional properties:
   - reset-active-low: Is the reset gpio is active on physical low?
drivers/video/ssd1307fb.c +202 -71

387 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v2 2/2 ARM: dts: cfa10036: Change the OLED display to SSD1306

In reply to Maxime Ripard

The SSD1307 was used in an early prototype that will never get distributed. The final board now has a SSD1306 instead, that has its own power generation unit and thus doesn't need any PWM. The panel attached to it also changed.

---
 arch/arm/boot/dts/imx28-cfa10036.dts |   14 +++++---------
 arch/arm/boot/dts/imx28-cfa10049.dts |    4 ++--
 2 files changed, 7 insertions(+), 11 deletions(-)
arch/arm/boot/dts/imx28-cfa10036.dts +5 -9
index 1594694..40488f5a8 100644
@@ -58,12 +58,6 @@
 		};
 
 		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>;
@@ -75,11 +69,13 @@
 				pinctrl-0 = <&i2c0_pins_b>;
 				status = "okay";
 
-				ssd1307: oled at 3c {
-					compatible = "solomon,ssd1307fb-i2c";
+				ssd1306: oled at 3c {
+					compatible = "solomon,ssd1306fb-i2c";
 					reg = <0x3c>;
-					pwms = <&pwm 4 3000>;
 					reset-gpios = <&gpio2 7 0>;
+					solomon,height = <32>;
+					solomon,width = <128>;
+					solomon,page-offset = <0>;
 				};
 			};
 		};
arch/arm/boot/dts/imx28-cfa10049.dts +2 -2
index a0d3e9f..ded7784 100644
@@ -132,8 +132,8 @@
 
 		apbx at 80040000 {
 			pwm: pwm at 80064000 {
-				pinctrl-names = "default", "default";
-				pinctrl-1 = <&pwm3_pins_b>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pwm3_pins_b>;
 				status = "okay";
 			};
 
Signature · 1 line
1.7.10.4
Applied
#3 lore raw

Re: [PATCH 2/2] ARM: dts: cfa10036: Change the OLED display to SSD1306

Quoted 6 lines · Maxime Ripard

The SSD1307 was used in an early prototype that will never get distributed. The final board now has a SSD1306 instead, that has its own power generation unit and thus doesn't need any PWM. The panel attached to it also changed.

Applied, thanks.

#4 lore raw

v2 cover Add support for the Solomon SSD1306 OLED Controller

In reply to Maxime Ripard

Hi Andrew,

Le 22/04/2013 11:55, Maxime Ripard a ?crit :

Quoted 5 lines

This patchset adds the needed bits to the ssd1307fb driver to support the very similar Solomon SSD1306 controller.

Since the SSD1307 has been replaced by the SSD1306 in the latest CFA-10036 production samples, we also need to change the device tree accordingly.

These patches have been around for more than a month and a half now, without anyone making any comments on it.

I know that you have taken framebuffer patches in the past, especially the driver that this patch modifies, would you consider merging it through your tree?

I begin to have patches that depends on this one (the patchset "drivers:
video: Optimisations for the ssd1307fb driver"). I understand that we are quite close to the 3.10 merge window opening (we even reached the end of it for the ARM part, so the second patch will only be in 3.11), but I'd like to make sure that this patch and the others doesn't get silently ignored.

Thanks,
Maxime

Signature · 3 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

v2 cover Add support for the Solomon SSD1306 OLED Controller

In reply to Maxime Ripard
Quoted 18 lines · Maxime Ripard

Hi,

This patchset adds the needed bits to the ssd1307fb driver to support the very similar Solomon SSD1306 controller.

Since the SSD1307 has been replaced by the SSD1306 in the latest CFA-10036 production samples, we also need to change the device tree accordingly.

Thanks,
Maxime

Changes from v1:
- Fix style errors

Maxime Ripard (2):
video: ssd1307fb: Add support for SSD1306 OLED controller
ARM: dts: cfa10036: Change the OLED display to SSD1306

Quoted 5 lines
 .../devicetree/bindings/video/ssd1307fb.txt        |   10 +-
 arch/arm/boot/dts/imx28-cfa10036.dts               |   14 +-
 arch/arm/boot/dts/imx28-cfa10049.dts               |    4 +-
 drivers/video/ssd1307fb.c                          |  273 +++++++++++++++-----
 4 files changed, 216 insertions(+), 85 deletions(-)

I've taken the first patch, "video: ssd1307fb: Add support for SSD1306 OLED controller" into fbdev 3.11 branch. The dts changes should preferably go through arch tree.

Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130508/0bf96a45/attachment.sig>