Skip to content
Snippets Groups Projects
Commit 18185931 authored by BJ DevOps Team's avatar BJ DevOps Team
Browse files

Merge remote-tracking branch 'origin/imx_v2022.04' into lf_v2022.04

* origin/imx_v2022.04:
  MA-20886 imx8ulp: Boot from recovery mode when pressing key
parents d62373ed 14b6c8f3
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,6 @@ enum {
IMX8ULP_PAD_PTF5__SDHC1_D2 = IOMUX_PAD(0x0114, 0x0114, 0x8, 0x0A6C, 0x2, 0),
IMX8ULP_PAD_PTF0__SDHC1_D1 = IOMUX_PAD(0x0100, 0x0100, 0x8, 0x0A68, 0x2, 0),
IMX8ULP_PAD_PTF1__SDHC1_D0 = IOMUX_PAD(0x0104, 0x0104, 0x8, 0x0A64, 0x2, 0),
IMX8ULP_PAD_PTF7__PTF7 = IOMUX_PAD(0x011C, 0x011C, 0x1, 0x0000, 0x0, 0),
};
#endif /* __ASM_ARCH_IMX8ULP_PINS_H__ */
......@@ -210,9 +210,39 @@ int board_late_init(void)
#ifdef CONFIG_FSL_FASTBOOT
#ifdef CONFIG_ANDROID_RECOVERY
static iomux_cfg_t const recovery_pad[] = {
IMX8ULP_PAD_PTF7__PTF7 | MUX_PAD_CTRL(PAD_CTL_IBE_ENABLE),
};
int is_recovery_key_pressing(void)
{
return 0; /*TODO*/
int ret;
struct gpio_desc desc;
imx8ulp_iomux_setup_multiple_pads(recovery_pad, ARRAY_SIZE(recovery_pad));
ret = dm_gpio_lookup_name("GPIO3_7", &desc);
if (ret) {
printf("%s lookup GPIO3_7 failed ret = %d\n", __func__, ret);
return 0;
}
ret = dm_gpio_request(&desc, "recovery");
if (ret) {
printf("%s request recovery pad failed ret = %d\n", __func__, ret);
return 0;
}
dm_gpio_set_dir_flags(&desc, GPIOD_IS_IN);
ret = dm_gpio_get_value(&desc);
if (ret < 0) {
printf("%s error in retrieving GPIO value ret = %d\n", __func__, ret);
return 0;
}
dm_gpio_free(desc.dev, &desc);
return !ret;
}
#endif /*CONFIG_ANDROID_RECOVERY*/
#endif /*CONFIG_FSL_FASTBOOT*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment