diff options
author | Marek Vasut <marek.vasut+renesas@gmail.com> | 2018-02-17 00:35:23 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-02-17 21:59:21 +0100 |
commit | cd07358c044247c01d14f08307026879e80efb8e (patch) | |
tree | 5ac6515bbf13093f13032f59294d357e253b5ec0 /board | |
parent | 8a41f6887056ef4aff1c5481f00d6e29fafd68bf (diff) | |
download | u-boot-cd07358c044247c01d14f08307026879e80efb8e.tar.gz |
ARM: rmobile: Reset ethernet PHY
Toggle the PHY reset GPIO to bring the ethernet PHY out of reset properly.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
NOTE: This should be moved to the SH ethernet driver, but it's quite
late in the cycle, so this is something to be done in 2018.05.
Diffstat (limited to 'board')
-rw-r--r-- | board/renesas/porter/porter.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c index bd0080d210..dfefd7fb71 100644 --- a/board/renesas/porter/porter.c +++ b/board/renesas/porter/porter.c @@ -65,11 +65,19 @@ int board_early_init_f(void) return 0; } +#define ETHERNET_PHY_RESET 176 /* GPIO 5 22 */ + int board_init(void) { /* adress of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + /* Force ethernet PHY out of reset */ + gpio_request(ETHERNET_PHY_RESET, "phy_reset"); + gpio_direction_output(ETHERNET_PHY_RESET, 0); + mdelay(10); + gpio_direction_output(ETHERNET_PHY_RESET, 1); + return 0; } |