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