summaryrefslogtreecommitdiff
path: root/board/seeed/linkit-smart-7688/board.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2018-08-16 15:27:30 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2018-09-23 14:27:19 +0200
commitb02f76a83541fe9fe3a2918039b26fc133699c17 (patch)
treeff188bc459ac530efff25495694432427741b682 /board/seeed/linkit-smart-7688/board.c
parent4c835a607bd5adf88a726c0f636b00dd31e50237 (diff)
mips: Add LinkIt Smart 7688 support
The LinkIt Smart 7688 modules have a MT7688 SoC with 128 MiB of RAM and 32 MiB of flash (SPI NOR). This patch also includes 2 targets. One is the target that can be programmed into the SPI NOR flash and a 2nd target "xxx-ram" is added to support loading and booting via an already running U-Boot version. This allows easy development and testing without the need to flash the image each time. Signed-off-by: Stefan Roese <sr@denx.de> [fixed and regenerated defconfig files] Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'board/seeed/linkit-smart-7688/board.c')
-rw-r--r--board/seeed/linkit-smart-7688/board.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/board/seeed/linkit-smart-7688/board.c b/board/seeed/linkit-smart-7688/board.c
new file mode 100644
index 0000000000..a28abc00b8
--- /dev/null
+++ b/board/seeed/linkit-smart-7688/board.c
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018 Stefan Roese <sr@denx.de>
+ */
+
+#include <common.h>
+#include <asm/io.h>
+
+#define MT76XX_GPIO1_MODE 0xb0000060
+
+void board_debug_uart_init(void)
+{
+ /* Select UART2 mode instead of GPIO mode (default) */
+ clrbits_le32((void __iomem *)MT76XX_GPIO1_MODE, GENMASK(27, 26));
+}
+
+int board_early_init_f(void)
+{
+ /*
+ * The pin muxing of UART2 also needs to be done, if debug uart
+ * is not enabled. So we need to call this function here as well.
+ */
+ board_debug_uart_init();
+
+ return 0;
+}