diff options
author | Daniel Palmer <daniel@0x0f.com> | 2021-06-16 21:43:46 +0900 |
---|---|---|
committer | Daniel Palmer <daniel@0x0f.com> | 2021-06-16 21:43:46 +0900 |
commit | 43a49765f1783348f2d5186d13c5dfa9cb8ee962 (patch) | |
tree | 08548352d6585627b302ab0f9b42063e87de1778 /board/olimex/am335x_som/board.c | |
parent | a44d71f71d7cef3dc484ae3b0075264db6f42755 (diff) |
Add phy reset codeHEADam335x_som_revival
Diffstat (limited to 'board/olimex/am335x_som/board.c')
-rw-r--r-- | board/olimex/am335x_som/board.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/board/olimex/am335x_som/board.c b/board/olimex/am335x_som/board.c index 5413cca6b4..c828d6c7c5 100644 --- a/board/olimex/am335x_som/board.c +++ b/board/olimex/am335x_som/board.c @@ -151,8 +151,23 @@ int board_init(void) } #ifdef CONFIG_BOARD_LATE_INIT + +#define GPIO_PHY_RST 29 + +static void board_phy_init(void) +{ + puts("phy reset\n"); + gpio_request(GPIO_PHY_RST, "phy_rst"); + gpio_direction_output(GPIO_PHY_RST, 0); + mdelay(2); + gpio_set_value(GPIO_PHY_RST, 1); + mdelay(2); +} + int board_late_init(void) { + board_phy_init(); + return 0; } #endif |