socfpga.c 471 B

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