blob: d9125a76bf7fe473b4323b0dca6a66d55ffe2e29 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Stefan Roesebf5ed2e2015-11-18 11:06:09 +01002/*
3 * Copyright (C) 2015 Stefan Roese <sr@denx.de>
Stefan Roesebf5ed2e2015-11-18 11:06:09 +01004 */
5
6#include <common.h>
Simon Glass97589732020-05-10 11:40:02 -06007#include <init.h>
Stefan Roesebf5ed2e2015-11-18 11:06:09 +01008#include <asm/arch/reset_manager.h>
9#include <asm/gpio.h>
10#include <asm/io.h>
Simon Glassdbd79542020-05-10 11:40:11 -060011#include <linux/delay.h>
Stefan Roesebf5ed2e2015-11-18 11:06:09 +010012
Stefan Roesebf5ed2e2015-11-18 11:06:09 +010013int 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}