— a/vendor/mediatek/proprietary/bootable/bootloader/preloader/platform/mt6739/src/drivers/platform.c
+++ b/vendor/mediatek/proprietary/bootable/bootloader/preloader/platform/mt6739/src/drivers/platform.c
@@ -1362,7 +1362,7 @@ extern int mt8193_init(void);
#define AW_LED_MOUDLE_ENABLE_MASK 0xE1
#define AW_SETTINT_CURRENT_LEVEL 0x02
-#define AW_SETTING_BRIGHTNESS_VALUE 0x80//128
+#define AW_SETTING_BRIGHTNESS_VALUE 0xFF//128
#define AW_REG_RESET_DEFAULT_VALUE 0x33
enum{
@@ -1434,8 +1434,16 @@ void leds_show_boot(void) {
aw2013_i2c_write(AW_REG_RESET, 0x55); /*��оƬ����λһ��*/
udelay(5);
- aw2013_i2c_write(0x03, 0x15);
aw2013_i2c_set_leds(255, LED1);
}
+void leds_deinit(void) {
- aw2013_i2c_write(AW_REG_RESET, 0x55);
- udelay(5);
- //close red blink
- aw2013_i2c_write(0x03, 0x15);
+}
#endif
void platform_init(void)
@@ -1488,6 +1496,26 @@ void platform_init(void)
#endif
BOOTING_TIME_PROFILING_LOG(“rtc_bbpu_power_on”);
+#ifdef CONFIG_AW2013_3LINE_LED
+#if defined(SWCHR_POWER_PATH)
-
int bat_val = get_i_sense_volt(5);
+#else
-
int bat_val = get_bat_sense_volt(5);
+#endif
-
if (bat_val >= 3450) {
-
print("bat_val =%d \n", bat_val);
-
if (g_boot_reason != BR_USB) {
-
print("g_boot_reason = %d leds_show_boot \n", g_boot_reason);
-
leds_show_boot();
-
} else {
-
print("g_boot_reason = %d leds_deinit \n", g_boot_reason);
-
leds_deinit();
-
}
-
}
+#endif
+
+
#if !CFG_FPGA_PLATFORM
pl_battery_init(false);
#endif
@@ -1573,18 +1601,6 @@ void platform_init(void)
}
#endif
-#ifdef CONFIG_AW2013_3LINE_LED
-#if defined(SWCHR_POWER_PATH)
-
int bat_val = get_i_sense_volt(5);
-#else
-
int bat_val = get_bat_sense_volt(5);
-#endif
-
if (bat_val >= 3450) {
-
print("bat_val =%d leds_show_boot \n",bat_val);
-
leds_show_boot();
-
}
-#endif
#ifdef MTK_TRNG_CALIBRATION
#if defined MTK_TRNG_CALIBRATION_2ND_ROUND