summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2018-11-18 15:47:16 -0500
committerTom Rini <[email protected]>2018-11-18 15:47:16 -0500
commitd73d81fd85e4a030ade42c4b2d13466d45090aa3 (patch)
tree01a796e2be480b2590af9357f2926968b0050db6 /board
parent0c4b382f9041f9f2f00246c8a0ece90dae5451be (diff)
parent1bef0c530beaaba08b8ca7a9ec6ce6dc25f62dfb (diff)
Merge tag 'mips-pull-2018-11-18' of git://git.denx.de/u-boot-mips
- tree-wide: introduce LDFLAGS_STANDALONE - MIPS: fix long-standing issue with linking of standalone programs - MIPS: MT76xx: add GPIO and WDT drivers - MIPS: MT76xx: various fixes and updates to gardena-smart-gateway board - MIPS: MT76xx: various fixes and updates to linkit-smart-7688 board
Diffstat (limited to 'board')
-rw-r--r--board/gardena/smart-gateway-mt7688/board.c24
-rw-r--r--board/seeed/linkit-smart-7688/board.c7
2 files changed, 23 insertions, 8 deletions
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index 5ff546f505c..3a1838e44a9 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -4,14 +4,26 @@
*/
#include <common.h>
-#include <asm/io.h>
+#include <led.h>
+#include <linux/io.h>
+
+#define MT76XX_AGPIO_CFG 0x1000003c
int board_early_init_f(void)
{
- /*
- * Nothing to be done here for this board (no UART setup etc)
- * right now. We might need some pin muxing, so lets keep this
- * function for now.
- */
+ void __iomem *gpio_mode;
+
+ /* Configure digital vs analog GPIOs */
+ gpio_mode = ioremap_nocache(MT76XX_AGPIO_CFG, 0x100);
+ iowrite32(0x00fe01ff, gpio_mode);
+
+ return 0;
+}
+
+int board_late_init(void)
+{
+ if (IS_ENABLED(CONFIG_LED))
+ led_default_state();
+
return 0;
}
diff --git a/board/seeed/linkit-smart-7688/board.c b/board/seeed/linkit-smart-7688/board.c
index a28abc00b8c..d3d3d50c2c6 100644
--- a/board/seeed/linkit-smart-7688/board.c
+++ b/board/seeed/linkit-smart-7688/board.c
@@ -6,12 +6,15 @@
#include <common.h>
#include <asm/io.h>
-#define MT76XX_GPIO1_MODE 0xb0000060
+#define MT76XX_GPIO1_MODE 0x10000060
void board_debug_uart_init(void)
{
+ void __iomem *gpio_mode;
+
/* Select UART2 mode instead of GPIO mode (default) */
- clrbits_le32((void __iomem *)MT76XX_GPIO1_MODE, GENMASK(27, 26));
+ gpio_mode = ioremap_nocache(MT76XX_GPIO1_MODE, 0x100);
+ clrbits_le32(gpio_mode, GENMASK(27, 26));
}
int board_early_init_f(void)