board: ti: am335x: add support to fixup phy address
authorSekhar Nori <nsekhar@ti.com>
Thu, 23 Aug 2018 11:41:30 +0000 (17:11 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 26 Sep 2018 01:49:18 +0000 (21:49 -0400)
commit20c37fb1bfb9f20804645b2199699cd815a4d55c
treed2575c185113ab8f0be66b60dd398790cec6aa04
parente2597be5bcb90030fdc116e7c5810bdef7fd9e0d
board: ti: am335x: add support to fixup phy address

On beaglebone black, it can so happen that PHY address
is not latched correctly on reset and board boots with
PHY responding to a different address than that
programmed in device-tree. For example, see this report:

https://groups.google.com/d/msg/beagleboard/9mctrG26Mc8/1FuI_i5KW10J

Workaround this by fixing up device-tree passed to kernel
by using the PHY address detected in hardware.

Beaglebone itself uses only one ethernet port and its DT
currently uses phy_id (obsoleted). But the function has
been written to handle multiple ports and phy_id as well
as phy-handle to make the function more generically useful.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
board/ti/am335x/board.c