summaryrefslogtreecommitdiff
path: root/include/configs
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-02-16 17:23:25 +0100
committerHans de Goede <hdegoede@redhat.com>2015-02-20 08:11:57 +0100
commit55410089cb979d7a86ee817c0309c4c2348a90df (patch)
tree8fef2d3466678e793c264cad9c199ef6ea1934d1 /include/configs
parent242e3d893d1311ea38abd25613076a29961d422e (diff)
downloadu-boot-imx-55410089cb979d7a86ee817c0309c4c2348a90df.zip
u-boot-imx-55410089cb979d7a86ee817c0309c4c2348a90df.tar.gz
u-boot-imx-55410089cb979d7a86ee817c0309c4c2348a90df.tar.bz2
sunxi: video: Add support for LCD panels which need to be configured via i2c
This commits adds support for configuring a a bitbang i2c controller, which is used on some boards to configure the LCD panel (via i2c). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'include/configs')
-rw-r--r--include/configs/sunxi-common.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 1238d82..f5efebb 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -183,6 +183,22 @@
#define CONFIG_SYS_I2C_MVTWSI
#define CONFIG_SYS_I2C_SPEED 400000
#define CONFIG_SYS_I2C_SLAVE 0x7f
+
+#if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
+#define CONFIG_SYS_I2C_SOFT
+#define CONFIG_SYS_I2C_SOFT_SPEED 50000
+#define CONFIG_SYS_I2C_SOFT_SLAVE 0x00
+#define CONFIG_VIDEO_LCD_I2C_BUS 0 /* The lcd panel soft i2c is bus 0 */
+#define CONFIG_SYS_SPD_BUS_NUM 1 /* And the axp209 i2c bus is bus 1 */
+/* We use pin names in Kconfig and sunxi_name_to_gpio() */
+#define CONFIG_SOFT_I2C_GPIO_SDA soft_i2c_gpio_sda
+#define CONFIG_SOFT_I2C_GPIO_SCL soft_i2c_gpio_scl
+#ifndef __ASSEMBLY__
+extern int soft_i2c_gpio_sda;
+extern int soft_i2c_gpio_scl;
+#endif
+#endif
+
#define CONFIG_CMD_I2C
/* PMU */