board.c 376 B

1234567891011121314151617181920
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2018 Stefan Roese <sr@denx.de>
  4. */
  5. #include <common.h>
  6. #include <linux/io.h>
  7. #define MT76XX_AGPIO_CFG 0x1000003c
  8. int board_early_init_f(void)
  9. {
  10. void __iomem *gpio_mode;
  11. /* Configure digital vs analog GPIOs */
  12. gpio_mode = ioremap_nocache(MT76XX_AGPIO_CFG, 0x100);
  13. iowrite32(0x00fe01ff, gpio_mode);
  14. return 0;
  15. }