Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Stefan Roese | bf5ed2e | 2015-11-18 11:06:09 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Stefan Roese <sr@denx.de> |
Stefan Roese | bf5ed2e | 2015-11-18 11:06:09 +0100 | [diff] [blame] | 4 | */ |
| 5 | |
Simon Glass | 9758973 | 2020-05-10 11:40:02 -0600 | [diff] [blame] | 6 | #include <init.h> |
Stefan Roese | bf5ed2e | 2015-11-18 11:06:09 +0100 | [diff] [blame] | 7 | #include <asm/arch/reset_manager.h> |
| 8 | #include <asm/gpio.h> |
| 9 | #include <asm/io.h> |
Simon Glass | dbd7954 | 2020-05-10 11:40:11 -0600 | [diff] [blame] | 10 | #include <linux/delay.h> |
Stefan Roese | bf5ed2e | 2015-11-18 11:06:09 +0100 | [diff] [blame] | 11 | |
Stefan Roese | bf5ed2e | 2015-11-18 11:06:09 +0100 | [diff] [blame] | 12 | int board_early_init_f(void) |
| 13 | { |
| 14 | int ret; |
| 15 | |
| 16 | /* Reset the Marvell PHY 88E1510 */ |
| 17 | ret = gpio_request(63, "PHY reset"); |
| 18 | if (ret) |
| 19 | return ret; |
| 20 | |
| 21 | gpio_direction_output(63, 0); |
| 22 | mdelay(1); |
| 23 | gpio_set_value(63, 1); |
| 24 | mdelay(10); |
| 25 | |
| 26 | return 0; |
| 27 | } |