From a2ed455462c59063310d27b63d2b11d3104a6be9 Mon Sep 17 00:00:00 2001 From: "jianglk.darker" Date: Wed, 7 Aug 2024 07:20:01 +0000 Subject: [PATCH] Amp Au6815P regTable init in Bootloader by New method by king.wang --- .../bootloader/source/apps/main/main.c | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/vendor/huanglong/bootloader/source/apps/main/main.c b/vendor/huanglong/bootloader/source/apps/main/main.c index e5c7604366..1448485761 100755 --- a/vendor/huanglong/bootloader/source/apps/main/main.c +++ b/vendor/huanglong/bootloader/source/apps/main/main.c @@ -296,7 +296,7 @@ static td_void slave_boot_app_entry_i2c_init(td_void) uapi_i2c_write(i2c_para, &data, 1); } - +/* static td_void slave_boot_i2c_amp_init(td_void) { td_u8 data; @@ -328,6 +328,36 @@ static td_void slave_boot_i2c_amp_init(td_void) uapi_i2c_write(i2c_para, &data, 1); } +*/ + + +static td_void slave_boot_i2c_amp_init(td_void) +{ + td_u32 i = 0; + i2c_base_para i2c_para = {0}; + i2c_para.i2c_num = 1; + i2c_para.dev_address = 0x58; + i2c_para.reg_addr_count = 1; + + td_u8 data[][2] = { + { 0x00 , 0x00}, + { 0x7F , 0x00}, + { 0x00 , 0x00}, + { 0x01 , 0x11}, + { 0x03 , 0x03}, + }; + +for (i = 0; i < sizeof(data) / sizeof(data[0]); i++) + { + i2c_para.i2c_reg_addr = data[i][0]; + uapi_i2c_write(i2c_para, (&data[i][1]),1 ) ; + udelay(10); + } + +} + + + static td_void ext_boot_logo_main(td_void) { int ret;