socfpga.c 731 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 <i2c.h>
  8. #include <miiphy.h>
  9. #include <asm/arch/reset_manager.h>
  10. #include <asm/gpio.h>
  11. #include <asm/io.h>
  12. DECLARE_GLOBAL_DATA_PTR;
  13. void s_init(void) {}
  14. /*
  15. * Miscellaneous platform dependent initialisations
  16. */
  17. int board_init(void)
  18. {
  19. /* Address of boot parameters for ATAG (if ATAG is used) */
  20. gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
  21. return 0;
  22. }
  23. int board_early_init_f(void)
  24. {
  25. int ret;
  26. /* Reset the Marvell PHY 88E1510 */
  27. ret = gpio_request(63, "PHY reset");
  28. if (ret)
  29. return ret;
  30. gpio_direction_output(63, 0);
  31. mdelay(1);
  32. gpio_set_value(63, 1);
  33. mdelay(10);
  34. return 0;
  35. }