summaryrefslogtreecommitdiff
path: root/board/warp7
diff options
context:
space:
mode:
authorMarco Franchi <marco.franchi@nxp.com>2016-06-10 14:45:28 -0300
committerStefano Babic <sbabic@denx.de>2016-06-18 10:35:05 +0200
commit0a35cc9395b7e4e5bc2b1370016f7c3156f945a4 (patch)
tree800fe91a261db87ef06479d73ca9ce7d9e9c496b /board/warp7
parent0d7cdc2abfc34125f0bc85f864d285f06675290a (diff)
downloadu-boot-imx-0a35cc9395b7e4e5bc2b1370016f7c3156f945a4.zip
u-boot-imx-0a35cc9395b7e4e5bc2b1370016f7c3156f945a4.tar.gz
u-boot-imx-0a35cc9395b7e4e5bc2b1370016f7c3156f945a4.tar.bz2
warp7: Fix watchdog reset
The latest version of warp7 board provides the connection of the WDOG1_B pin to the PMIC. Program the watchdog to enable the WDOG1_B output which causes a POR reset. Based on the imx7dsabresd code. Signed-off-by: Marco Franchi <marco.franchi@nxp.com> Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
Diffstat (limited to 'board/warp7')
-rw-r--r--board/warp7/warp7.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 8c5bf9a..27e31f3 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -32,6 +32,10 @@ int dram_init(void)
return 0;
}
+static iomux_v3_cfg_t const wdog_pads[] = {
+ MX7D_PAD_GPIO1_IO00__WDOG1_WDOG_B | MUX_PAD_CTRL(NO_PAD_CTRL),
+};
+
static iomux_v3_cfg_t const uart1_pads[] = {
MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
@@ -100,3 +104,20 @@ int board_usb_phy_mode(int port)
{
return USB_INIT_DEVICE;
}
+
+int board_late_init(void)
+{
+ struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
+
+ imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
+
+ set_wdog_reset(wdog);
+
+ /*
+ * Do not assert internal WDOG_RESET_B_DEB(controlled by bit 4),
+ * since we use PMIC_PWRON to reset the board.
+ */
+ clrsetbits_le16(&wdog->wcr, 0, 0x10);
+
+ return 0;
+}