Hi
I've built my own board based on the iMX7dsabre eval board. One of the differences: Both ethernet ports are on their own MDIO-line. Both ports work in Li-nux, but in u-boot (2018-03_4), only one works. I guess the problem is the config-header I took (and adjusted) from the sabre board:
#define CONFIG_FEC_ENET_DEV 0
#define CONFIG_PHY_BROADCOM
/* ENET1 */
#if (CONFIG_FEC_ENET_DEV == 0)
#define IMX_FEC_BASE ENET_IPS_BASE_ADDR
#define CONFIG_FEC_MXC_PHYADDR 0x0
#define CONFIG_ETHPRIME "eth0"
#define CONFIG_FEC_MXC_MDIO_BASE ENET_IPS_BASE_ADDR
/* ENET2 */
#elif (CONFIG_FEC_ENET_DEV == 1)
#define IMX_FEC_BASE ENET2_IPS_BASE_ADDR
#define CONFIG_FEC_MXC_PHYADDR 0x1
#define CONFIG_ETHPRIME "eth1"
#define CONFIG_FEC_MXC_MDIO_BASE ENET2_IPS_BASE_ADDR
#endif
#endif
If I define CONFIG_FEC_ENET_DEV as 0, only port eth0 works in u-boot, if I define CONFIG_FEC_ENET_DEV as 1, only port eth1 works. So the settings should be correct. The problem is, that CONFIG_FEC_MXC_PHYADDR is a parameter from u-boot and can only be defined for one port.
If I scan the devices in u-boot with mdio list for ONFIG_FEC_ENET_DEV 0:
=> mdio list
FEC0:
0 - Generic PHY <--> ethernet@30be0000
FEC1:
0 - Generic PHY <--> ethernet@30bf0000
For ONFIG_FEC_ENET_DEV 1:
=> mdio list
FEC0:
1 - Generic PHY <--> ethernet@30be0000
FEC1:
1 - Generic PHY <--> ethernet@30bf0000
Both ports get the address that is defined in the header file. How can I change the header file to enable both ports at the same time? (Something like CONFIG_FEC2_MXC_PHYADDR)
Thanks.
Sebastian