summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Huang <darren.huang@advantech.com.tw>2021-05-13 09:25:43 +0800
committerDarren Huang <darren.huang@advantech.com.tw>2021-05-13 09:25:43 +0800
commit8b7325f26eb584631eaed0516cbf7ad64b89d770 (patch)
treee8aabc8bf9053719c0c39a70f4c5e7f75f7efc53
parenta9ecce09017a269dcb45faaa1e9daf2d63e01960 (diff)
[ROM-5722] Pull high the COLD_RST_EN to do the Cold Reset
-rw-r--r--board/freescale/imx8mp_rom5722a1/imx8mp_rom5722a1.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/freescale/imx8mp_rom5722a1/imx8mp_rom5722a1.c b/board/freescale/imx8mp_rom5722a1/imx8mp_rom5722a1.c
index 96c466ecd7..0200bcd46a 100644
--- a/board/freescale/imx8mp_rom5722a1/imx8mp_rom5722a1.c
+++ b/board/freescale/imx8mp_rom5722a1/imx8mp_rom5722a1.c
@@ -559,6 +559,19 @@ static void debug_uart_sel(void)
}
}
+#define COLD_RST_EN IMX_GPIO_NR(3, 22)
+
+static iomux_v3_cfg_t cold_rst_en_gpio[] = {
+ MX8MP_PAD_SAI5_RXD1__GPIO3_IO22 | MUX_PAD_CTRL(NO_PAD_CTRL),
+};
+
+static void cold_rst_en(void)
+{
+ imx_iomux_v3_setup_multiple_pads(cold_rst_en_gpio, ARRAY_SIZE(cold_rst_en_gpio));
+ gpio_request(COLD_RST_EN, "cold_rst_en");
+ gpio_direction_output(COLD_RST_EN, 1);
+}
+
int board_late_init(void)
{
#ifdef CONFIG_ENV_IS_IN_MMC
@@ -570,6 +583,7 @@ int board_late_init(void)
#endif
debug_uart_sel();
+ cold_rst_en();
return 0;
}