ARM: dts: imx6dl-yapp4: Add support for OLED based on different controller
authorMichal Vokáč <michal.vokac@ysoft.com>
Fri, 31 Jul 2020 12:00:08 +0000 (14:00 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sat, 22 Aug 2020 12:21:01 +0000 (20:21 +0800)
OLED display consist of an OLED panel and a display controller.
The displays that were used on yapp4 platform were based on a SSD1305
controller. These displays are now discontinued and we need to add
support for a replacement.

The new display is based on SSD1309 controller and requires slightly
different configuration (mirror + segment offset).  We want to support
both display types so it does no matter which one was used on the assembly
line. Hence the displays are placed at different I2C addresses.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/imx6dl-yapp4-common.dtsi
arch/arm/boot/dts/imx6dl-yapp4-hydra.dts
arch/arm/boot/dts/imx6dl-yapp4-orion.dts

index 207f510cb518dc8f80a2f03749623d15ccde9d91..46927a020943d2c513bcb6c10fcf1e0d7564ab02 100644 (file)
        pinctrl-0 = <&pinctrl_i2c3>;
        status = "okay";
 
-       oled: oled@3d {
+       oled_1309: oled@3c {
+               compatible = "solomon,ssd1309fb-i2c";
+               reg = <0x3c>;
+               solomon,height = <64>;
+               solomon,width = <128>;
+               solomon,page-offset = <0>;
+               solomon,segment-no-remap;
+               solomon,prechargep2 = <15>;
+               reset-gpios = <&gpio_oled 1 GPIO_ACTIVE_LOW>;
+               vbat-supply = <&sw2_reg>;
+               status = "disabled";
+       };
+
+       oled_1305: oled@3d {
                compatible = "solomon,ssd1305fb-i2c";
                reg = <0x3d>;
                solomon,height = <64>;
index 6010d3d872abcec73cc08f616afacba6f72eeb7e..a19609c7c7c0e5bd2455a1b246657d2f0530b3cc 100644 (file)
        status = "okay";
 };
 
-&oled {
+&oled_1305 {
+       status = "okay";
+};
+
+&oled_1309 {
        status = "okay";
 };
 
index 0428720417ef6c008396f2ab8b283a45bb373a36..884b236746bb0494b828ce3903f3fbf2e760d865 100644 (file)
        status = "okay";
 };
 
-&oled {
+&oled_1305 {
+       status = "okay";
+};
+
+&oled_1309 {
        status = "okay";
 };