summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorckkim <changkon12@gmail.com>2022-02-15 11:02:08 +0300
committerChris <codewalker@hardkernel.com>2022-07-19 10:49:18 +0300
commite21b7b920332ed07415721b976e431557c914998 (patch)
tree460493fe1608399f9acf0005715be8ec8b965f86
parent862d19cb9450fb36c7e70de0aa5f3c87410e4fe8 (diff)
downloadu-boot-e21b7b920332ed07415721b976e431557c914998.tar.xz
ODROID-N2:support splash screen on odroid-vu7c
Signed-off-by: ckkim <changkon12@gmail.com> Change-Id: Ia0831c0bfdc38a4da69cef418ce880b502a78c9e
-rw-r--r--arch/arm/include/asm/arch-g12b/i2c.h7
-rw-r--r--board/hardkernel/odroidn2/odroidn2.c51
2 files changed, 42 insertions, 16 deletions
diff --git a/arch/arm/include/asm/arch-g12b/i2c.h b/arch/arm/include/asm/arch-g12b/i2c.h
index b33594a3a9..3ef1880e76 100644
--- a/arch/arm/include/asm/arch-g12b/i2c.h
+++ b/arch/arm/include/asm/arch-g12b/i2c.h
@@ -135,8 +135,6 @@ struct i2c_msg {
#define MESON_I2C_MASTER_A_GPIOW_1_BIT (1<<23)
/*i2c master b*/
-
-
#define MESON_I2C_MASTER_B_GPIOH_3_REG (PERIPHS_PIN_MUX_7)
#define MESON_I2C_MASTER_B_GPIOH_3_BIT (1<<6)
#define MESON_I2C_MASTER_B_GPIOH_4_REG (PERIPHS_PIN_MUX_7)
@@ -147,6 +145,11 @@ struct i2c_msg {
#define MESON_I2C_MASTER_B_GPIOY_13_REG (PERIPHS_PIN_MUX_10)
#define MESON_I2C_MASTER_B_GPIOY_13_BIT (1<<15)
+#define MESON_I2C_MASTER_B_GPIOX_10_REG (PERIPHS_PIN_MUX_4)
+#define MESON_I2C_MASTER_B_GPIOX_10_BIT (5<<8)
+#define MESON_I2C_MASTER_B_GPIOX_11_REG (PERIPHS_PIN_MUX_4)
+#define MESON_I2C_MASTER_B_GPIOX_11_BIT (5<<12)
+
/*i2c master c*/
#define MESON_I2C_MASTER_C_GPIOY_7_REG (PERIPHS_PIN_MUX_4)
#define MESON_I2C_MASTER_C_GPIOY_7_BIT (1<<28)
diff --git a/board/hardkernel/odroidn2/odroidn2.c b/board/hardkernel/odroidn2/odroidn2.c
index ce3bd94f39..64057cfb39 100644
--- a/board/hardkernel/odroidn2/odroidn2.c
+++ b/board/hardkernel/odroidn2/odroidn2.c
@@ -15,6 +15,7 @@
#include <asm/cpu_id.h>
#include <asm/arch/secure_apb.h>
#ifdef CONFIG_SYS_I2C_AML
+#include <amlogic/i2c.h>
#include <aml_i2c.h>
#endif
#ifdef CONFIG_AML_VPU
@@ -220,21 +221,32 @@ int board_mmc_init(bd_t *bis)
#endif
#ifdef CONFIG_SYS_I2C_AML
-struct aml_i2c_platform g_aml_i2c_plat = {
- .wait_count = 1000000,
- .wait_ack_interval = 5,
- .wait_read_interval = 5,
- .wait_xfer_interval = 5,
- .master_no = AML_I2C_MASTER_AO,
- .use_pio = 0,
- .master_i2c_speed = AML_I2C_SPPED_400K,
- .master_ao_pinmux = {
- .scl_reg = (unsigned long)MESON_I2C_MASTER_AO_GPIOAO_4_REG,
- .scl_bit = MESON_I2C_MASTER_AO_GPIOAO_4_BIT,
- .sda_reg = (unsigned long)MESON_I2C_MASTER_AO_GPIOAO_5_REG,
- .sda_bit = MESON_I2C_MASTER_AO_GPIOAO_5_BIT,
- }
+struct aml_i2c_platform g_aml_i2c_plat[] = {
+ {
+ .wait_count = 1000000,
+ .wait_ack_interval = 5,
+ .wait_read_interval = 5,
+ .wait_xfer_interval = 5,
+ .master_no = AML_I2C_MASTER_B,
+ .use_pio = 0,
+ .master_i2c_speed = AML_I2C_SPPED_400K,
+ .master_b_pinmux = {
+ .scl_reg = (unsigned long)MESON_I2C_MASTER_B_GPIOX_11_REG,
+ .scl_bit = MESON_I2C_MASTER_B_GPIOX_11_BIT,
+ .sda_reg = (unsigned long)MESON_I2C_MASTER_B_GPIOX_10_REG,
+ .sda_bit = MESON_I2C_MASTER_B_GPIOX_10_BIT,
+ },
+ },
};
+
+static void board_i2c_init(void)
+{
+ //Amlogic I2C controller initialized
+ //note: it must be call before any I2C operation
+ //aml_i2c_init();
+ extern void aml_i2c_set_ports(struct aml_i2c_platform *i2c_plat);
+ aml_i2c_set_ports(g_aml_i2c_plat);
+}
#endif
#if defined(CONFIG_BOARD_EARLY_INIT_F)
@@ -389,6 +401,17 @@ int board_late_init(void)
board_cvbs_probe();
#endif
+#ifdef CONFIG_SYS_I2C_AML
+ board_i2c_init();
+ if (lt8619c_init() == 0) {
+ setenv("colorattribute", "rgb,8bit");
+ setenv("hdmimode", "1024x600p60hz");
+ setenv("outputmode", "1024x600p60hz");
+ } else {
+ printf(" lt8619c hdmi_to_lcd device not found.!\n");
+ }
+#endif
+
setenv("variant", board_is_odroidn2plus() ? "n2_plus" : "n2");
board_set_dtbfile("meson64_odroid%s.dtb");