diff options
author | Stefan Roese <sr@denx.de> | 2018-10-09 08:59:11 +0200 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2018-11-18 16:02:23 +0100 |
commit | 48f8e15997ee1c6aa6fa62feab620c6b6593aad5 (patch) | |
tree | 057f81de8715122c2d4702193ef46bffc368a7c8 | |
parent | 4ff942b059c66c943a3ae94b6f96b3de239e9eaa (diff) | |
download | u-boot-48f8e15997ee1c6aa6fa62feab620c6b6593aad5.tar.gz u-boot-48f8e15997ee1c6aa6fa62feab620c6b6593aad5.tar.bz2 u-boot-48f8e15997ee1c6aa6fa62feab620c6b6593aad5.zip |
mips: mt76xx: gardena-smart-gateway: Configure GPIOs (digital vs analog)
Configure digital vs analog GPIOs as needed on this board.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
-rw-r--r-- | board/gardena/smart-gateway-mt7688/board.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index 5ff546f505..838dfc205b 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -4,14 +4,17 @@ */ #include <common.h> -#include <asm/io.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; } |