You could download LSDK 20.04
In u-boot source code, please modify board/freescale/ls1012ardb/eth.c as the following.
In LSDK environment, u-boot source code is in packages/firmware/u-boot.
switch (srds_s1) {
case 0x3508:
// if (!priv->gemac_port) {
/* MAC1 */
// pfe_set_phy_address_mode(priv->gemac_port,
// CONFIG_PFE_EMAC1_PHY_ADDR,
// PHY_INTERFACE_MODE_SGMII);
// } else {
/* MAC2 */
pfe_set_phy_address_mode(priv->gemac_port,
CONFIG_PFE_EMAC2_PHY_ADDR,
PHY_INTERFACE_MODE_RGMII_ID);
// }
break;
Then in LSDK build environment rebuild u-boot to generate ATF(firmware) image.
$ rm -rf build/firmware/u-boot/
$ flex-builder -c atf -m ls1012ardb -b qspi
$ flex-builder -i mkfw -m ls1012ardb -b qspi
You will get the following result in u-boot.
=> mdio list
PFE_MDIO:
1 - RealTek RTL8211F <--> pfe_eth1
=>
In recent released LSDK or OpenWrt, if you want to use only RGMII IF with PFE Ethernet port, you just need to remove "pfe_mac0"(SGMII) definition in the dts file.