socfpga.c 431 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (C) 2015 Stefan Roese <sr@denx.de>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/arch/reset_manager.h>
  8. #include <asm/gpio.h>
  9. #include <asm/io.h>
  10. int board_early_init_f(void)
  11. {
  12. int ret;
  13. /* Reset the Marvell PHY 88E1510 */
  14. ret = gpio_request(63, "PHY reset");
  15. if (ret)
  16. return ret;
  17. gpio_direction_output(63, 0);
  18. mdelay(1);
  19. gpio_set_value(63, 1);
  20. mdelay(10);
  21. return 0;
  22. }