Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lk1st support for Huawei Mediapad T1-A21W #460

Open
wants to merge 4 commits into
base: legacy
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/aboot/aboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -4051,7 +4051,6 @@ void aboot_init(const struct app_descriptor *app)
if (target_is_emmc_boot())
{
if (!boot_into_recovery) {
/* Try to boot from first fs we can find */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try not to add irrelevant changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try not to add irrelevant changes.

OK

ssize_t loaded_file = fsboot_boot_first(target_get_scratch_address(), target_get_max_flash_size());

if (loaded_file > 0)
Expand Down Expand Up @@ -4114,6 +4113,7 @@ void aboot_init(const struct app_descriptor *app)
#if FBCON_DISPLAY_MSG
display_fastboot_menu();
#endif

}

uint32_t get_page_size()
Expand Down
16 changes: 14 additions & 2 deletions lk2nd/panel/generated/lk_panel_boe_nt51017_10_800p_video.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,16 @@ static char boe_nt51017_10_800p_video_on_cmd_20[] = {
0x96, 0x40, 0x15, 0x80
};
static char boe_nt51017_10_800p_video_on_cmd_21[] = {
0x51, 0xff, 0x15, 0x80
0x83, 0x00, 0x15, 0x80
};
static char boe_nt51017_10_800p_video_on_cmd_22[] = {
0x84, 0x00, 0x15, 0x80
};
static char boe_nt51017_10_800p_video_on_cmd_23[] = {
0x96, 0x00, 0x15, 0x80
};
static char boe_nt51017_10_800p_video_on_cmd_24[] = {
0xf5, 0xfa, 0x15, 0x80
};

static struct mipi_dsi_cmd boe_nt51017_10_800p_video_on_command[] = {
Expand All @@ -133,6 +142,9 @@ static struct mipi_dsi_cmd boe_nt51017_10_800p_video_on_command[] = {
{ sizeof(boe_nt51017_10_800p_video_on_cmd_19), boe_nt51017_10_800p_video_on_cmd_19, 0 },
{ sizeof(boe_nt51017_10_800p_video_on_cmd_20), boe_nt51017_10_800p_video_on_cmd_20, 0 },
{ sizeof(boe_nt51017_10_800p_video_on_cmd_21), boe_nt51017_10_800p_video_on_cmd_21, 0 },
{ sizeof(boe_nt51017_10_800p_video_on_cmd_22), boe_nt51017_10_800p_video_on_cmd_22, 0 },
{ sizeof(boe_nt51017_10_800p_video_on_cmd_23), boe_nt51017_10_800p_video_on_cmd_23, 0 },
{ sizeof(boe_nt51017_10_800p_video_on_cmd_24), boe_nt51017_10_800p_video_on_cmd_24, 0 },
};


Expand Down Expand Up @@ -167,7 +179,7 @@ static struct lane_configuration boe_nt51017_10_800p_video_lane_config = {
.lane1_state = 1,
.lane2_state = 1,
.lane3_state = 1,
.force_clk_lane_hs = 0,
.force_clk_lane_hs = 1,
};

static const uint32_t boe_nt51017_10_800p_video_timings[] = {
Expand Down
15 changes: 8 additions & 7 deletions lk2nd/panel/oem_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#if TARGET_MSM8916
uint32_t panel_regulator_settings[] = {
0x00, 0x01, 0x01, 0x00, 0x20, 0x07, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
#endif

Expand Down Expand Up @@ -47,19 +47,20 @@ uint32_t oem_panel_max_auto_detect_panels()
static int target_tps65132_ctrl(uint8_t enable)
{
if (enable) {
gpio_tlmm_config(enn_gpio.pin_id, 0,
enn_gpio.pin_direction, 0,
enn_gpio.pin_strength,
enn_gpio.pin_state);
gpio_set_dir(enn_gpio.pin_id, 2);
/* for tps65132 ENP pin */
gpio_tlmm_config(enp_gpio.pin_id, 0,
enp_gpio.pin_direction, enp_gpio.pin_pull,
enp_gpio.pin_direction, 0,
enp_gpio.pin_strength,
enp_gpio.pin_state);
gpio_set_dir(enp_gpio.pin_id, 2);

/* for tps65132 ENN pin*/
gpio_tlmm_config(enn_gpio.pin_id, 0,
enn_gpio.pin_direction, enn_gpio.pin_pull,
enn_gpio.pin_strength,
enn_gpio.pin_state);
gpio_set_dir(enn_gpio.pin_id, 2);

} else {
gpio_set_dir(enp_gpio.pin_id, 0); /* ENP */
gpio_set_dir(enn_gpio.pin_id, 0); /* ENN */
Expand Down
4 changes: 2 additions & 2 deletions platform/msm_shared/display_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ void display_bootverify_option_menu_renew(struct select_msg_info *msg_info)
FBCON_COMMON_MSG, big_factor);
display_fbcon_menu_message("Press volume keys to navigate, and "\
"press power key to select\n\n", FBCON_COMMON_MSG, common_factor);

display_fbcon_menu_message("Welcome to HICODE002 BOOTLOADER!\n", FBCON_RED_MSG, common_factor);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to drop customised parts. You can split these into another commit, which would be easier to manage.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refe

Deleted

for (i = 0; i < len; i++) {
fbcon_draw_line(FBCON_COMMON_MSG);
msg_info->info.option_start[i] = fbcon_get_current_line();
Expand Down Expand Up @@ -443,7 +443,7 @@ void display_fastboot_menu_renew(struct select_msg_info *fastboot_msg_info)
fbcon_draw_line(msg_type);
display_fbcon_menu_message("\n\nPress volume keys to navigate, and "\
"press power key to select\n\n", FBCON_COMMON_MSG, common_factor);

display_fbcon_menu_message("Welcome to HICODE002 BOOTLOADER!\n", FBCON_RED_MSG, common_factor);
display_fbcon_menu_message("FASTBOOT MODE\n", FBCON_RED_MSG, common_factor);

#ifdef LK2ND_VERSION
Expand Down
1 change: 0 additions & 1 deletion qhypstub
Submodule qhypstub deleted from 19b3ec
2 changes: 1 addition & 1 deletion target/msm8916/include/target/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static struct gpio_pin enn_gpio_1 = {
};

static struct gpio_pin te_gpio = {
0, 0, 0, 0, 0, 0
"msmgpio", 24, 3, 1, 0, 1
};

static struct gpio_pin pwm_gpio = {
Expand Down
8 changes: 5 additions & 3 deletions target/msm8916/target_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ int target_display_dsi2hdmi_config(struct msm_panel_info *pinfo)
}

static int target_panel_reset_skuh(uint8_t enable)
{
{ dprintf(CRITICAL, "Reset Panel\n");
int ret = NO_ERROR;
if (enable) {
/* for tps65132 ENP pin */
Expand All @@ -382,7 +382,7 @@ static int target_panel_reset_skuh(uint8_t enable)
dprintf(CRITICAL, "qup_blsp_i2c_init failed \n");
ASSERT(0);
}

dprintf(CRITICAL, "Reset Panel\n");
ret = qrd_lcd_i2c_write(QRD_LCD_VPOS_ADDRESS, 0x0E); /* 5.4V */
if (ret) {
dprintf(CRITICAL, "VPOS Register: I2C Write failure\n");
Expand Down Expand Up @@ -496,8 +496,10 @@ int target_panel_reset(uint8_t enable, struct panel_reset_sequence *resetseq,

gpio_set_dir(enable_gpio.pin_id, 2);
}

//target_panel_reset_skuh(enable);
//dprintf(CRITICAL, "Reset Panel\n");
#ifndef WITH_LK2ND_PANEL
dprintf(CRITICAL, "Reset Panel1\n");
if (platform_is_msm8939() || platform_is_msm8929()) {
if ((hw_id == HW_PLATFORM_QRD) &&
(hw_subtype == HW_PLATFORM_SUBTYPE_SKUK))
Expand Down