Merge Request #2
Configure both fec phys
I would like to propose this patch to let us use the second FEC on smarcfimx7.
Until now, we were unable to use it, even when changing the environment variable 'ethact' to the correct value. Trying to send ping through the second FEC result in timeout of the autoneg, or (in case the first FEC has link) nothing has been sent out of the interface.
The problem was in the FEC driver - it uses only the PHY at CONFIG_FEC_MXC_PHYADDR without any confirmation that it is the current FEC's PHY. This results in accessing PHY 0x6 instead of 0x7 when checking for link at the second FEC.
The fix is simple - compare the address of the current device with the defined FEC, and then using the correct PHY address.
This issue has been fixed in the Mainline by commit 774ec60b ("Enable FEC driver to retrieve PHY address from device tree") and commit 89b5bd54 ("Allow the PHY node to be retrieved").
-
Signed-off-by: elyasafy
-
In case there are multiple FECs, the same PHY will be configured
for each FEC, more specificaly - PHY at address CONFIG_FEC_MXC_PHYADDR.This fix it by using the FEC address to decide which PHY to configure.
Signed-off-by: elyasafy
-
Note that this branch solve this issue better: http://git.embedian.com/Elyasafy/smarc-t335x-uboot/commits/use-phys-address-from-dtb
-
Status changed to closed