From 0a69b314b60b19aa308be1c978222de70b9e7eab Mon Sep 17 00:00:00 2001 From: zhang sanshan Date: Wed, 10 May 2017 11:00:09 +0800 Subject: MA-9376 [Android IMX] uboot: enable lock&unlock Fix compile error for api change. Porting below patches from v2015.o4: MA-7875 Enable CAAM for i.MX6 MA-7875-1 Support fastboot lock&unlock in u-boot MA-7875-2 Support fastboot lock/unlock in i.MX6 platform MA-7875-3 Support fastboot lock/unlock in i.MX6UL MA-8425 fastboot: return OKAY in fastboot erase MA-8418 fix return value check for get_device_and_partition MA-8622 - [brillo] fix uboot compile warnings and code style warnings Change-Id: I2370c3e5851cc1f92aaa93c200e6c079f7929af2 Signed-off-by: zhang sanshan --- board/technexion/pico-imx6ul/pico-imx6ul.c | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'board') diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c index 49aeb80..9bffd93 100644 --- a/board/technexion/pico-imx6ul/pico-imx6ul.c +++ b/board/technexion/pico-imx6ul/pico-imx6ul.c @@ -244,6 +244,36 @@ int power_init_board(void) return 0; } +#ifdef CONFIG_LDO_BYPASS_CHECK +void ldo_mode_set(int ldo_bypass) +{ + unsigned int value; + u32 vddarm; + struct pmic *p = pfuze; + if (!p) { + printf("No PMIC found!\n"); + return; + } + + /* switch to ldo_bypass mode */ + if (ldo_bypass) { + prep_anatop_bypass(); + /* decrease VDDARM to 1.275V */ + pmic_reg_read(pfuze, PFUZE3000_SW1BVOLT, &value); + value &= ~0x1f; + value |= PFUZE3000_SW1AB_SETP(1275); + pmic_reg_write(pfuze, PFUZE3000_SW1BVOLT, value); + set_anatop_bypass(1); + vddarm = PFUZE3000_SW1AB_SETP(1175); + pmic_reg_read(pfuze, PFUZE3000_SW1BVOLT, &value); + value &= ~0x1f; + value |= vddarm; + pmic_reg_write(pfuze, PFUZE3000_SW1BVOLT, value); + finish_anatop_bypass(); + printf("switch to ldo_bypass mode!\n"); + } +} +#endif #endif int board_usb_phy_mode(int port) @@ -291,3 +321,11 @@ int checkboard(void) return 0; } +#ifdef CONFIG_FSL_FASTBOOT +#ifdef CONFIG_ANDROID_RECOVERY +int is_recovery_key_pressing(void) +{ + return 0; +} +#endif +#endif -- cgit v1.1