socfpga.c 428 B

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