From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 9 Oct 2018 08:59:11 +0200 Subject: [U-Boot] [PATCH 09/14] mips: mt76xx: gardena-smart-gateway: Configure GPIOs (digital vs analog) In-Reply-To: <20181009065916.31977-1-sr@denx.de> References: <20181009065916.31977-1-sr@denx.de> Message-ID: <20181009065916.31977-9-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Configure digital vs analog GPIOs as needed on this board. Signed-off-by: Stefan Roese Cc: Daniel Schwierzeck --- board/gardena/smart-gateway-mt7688/board.c | 15 +++++++++------ 1 file 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 -#include +#include + +#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; } -- 2.19.1