summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-02-16 17:49:47 +0100
committerHans de Goede <hdegoede@redhat.com>2015-02-20 08:11:57 +0100
commitaad2ac24c0871bb897be676aca946f37dd05f187 (patch)
treec792928e16e8c69decbc36d62d36bdbb5577d4d2
parent55410089cb979d7a86ee817c0309c4c2348a90df (diff)
downloadu-boot-imx-aad2ac24c0871bb897be676aca946f37dd05f187.zip
u-boot-imx-aad2ac24c0871bb897be676aca946f37dd05f187.tar.gz
u-boot-imx-aad2ac24c0871bb897be676aca946f37dd05f187.tar.bz2
sunxi: video: Add support for tl059wv5c0 lcd panels
Add support for the 6" 480x800 tl059wv5c0 panel used on e.g. Utoo P66 and Aigo M60/M608/M606 tablets. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
-rw-r--r--board/sunxi/Kconfig8
-rw-r--r--drivers/video/sunxi_display.c7
2 files changed, 15 insertions, 0 deletions
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index bbb4d1b..f5471a1 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -406,6 +406,14 @@ config VIDEO_LCD_PANEL_HITACHI_TX18D42VM
---help---
7.85" 1024x768 Hitachi tx18d42vm LCD panel support
+config VIDEO_LCD_TL059WV5C0
+ bool "tl059wv5c0 LCD panel"
+ select VIDEO_LCD_PANEL_I2C
+ select VIDEO_LCD_IF_PARALLEL
+ ---help---
+ 6" 480x800 tl059wv5c0 panel support, as used on the Utoo P66 and
+ Aigo M60/M608/M606 tablets.
+
endchoice
diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c
index 7f01401..4e12150 100644
--- a/drivers/video/sunxi_display.c
+++ b/drivers/video/sunxi_display.c
@@ -18,6 +18,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <fdt_support.h>
+#include <i2c.h>
#include <video_fb.h>
#include "videomodes.h"
#include "hitachi_tx18d42vm_lcd.h"
@@ -1030,6 +1031,12 @@ static void sunxi_mode_set(const struct ctfb_res_modes *mode,
mdelay(50); /* Wait for lcd controller power on */
hitachi_tx18d42vm_init();
}
+ if (IS_ENABLED(CONFIG_VIDEO_LCD_TL059WV5C0)) {
+ unsigned int orig_i2c_bus = i2c_get_bus_num();
+ i2c_set_bus_num(CONFIG_VIDEO_LCD_I2C_BUS);
+ i2c_reg_write(0x5c, 0x04, 0x42); /* Turn on the LCD */
+ i2c_set_bus_num(orig_i2c_bus);
+ }
sunxi_composer_mode_set(mode, address);
sunxi_lcdc_tcon0_mode_set(mode, false);
sunxi_composer_enable();