2018-05-06 17:58:06 -04:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2015-11-18 11:06:09 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 Stefan Roese <sr@denx.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2020-05-10 11:40:02 -06:00
|
|
|
#include <init.h>
|
2015-11-18 11:06:09 +01:00
|
|
|
#include <asm/arch/reset_manager.h>
|
|
|
|
#include <asm/gpio.h>
|
|
|
|
#include <asm/io.h>
|
2020-05-10 11:40:11 -06:00
|
|
|
#include <linux/delay.h>
|
2015-11-18 11:06:09 +01:00
|
|
|
|
|
|
|
int board_early_init_f(void)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
/* Reset the Marvell PHY 88E1510 */
|
|
|
|
ret = gpio_request(63, "PHY reset");
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
gpio_direction_output(63, 0);
|
|
|
|
mdelay(1);
|
|
|
|
gpio_set_value(63, 1);
|
|
|
|
mdelay(10);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|