This article is from the "embedded development" blog, please be sure to keep this source http://davinci.blog.51cto.com/1418291/303985
Although I have known the top U-boot, I just started to do it recently. The U-boot is indeed good, the structure is very clear, so I must study it carefully. The first thing to debug is the network port, because we didn't use the same network Physical Layer Chip ks8001 on the dm365 Development Board, but used rtl8201. Therefore, we need to modify the driver, in fact, you don't even need to change it in one place, that is, the PHY address, that is, the address of the network physical layer. The range is 0 ~ 31 (00000b ~ 11111b), and this address is set through the five pins of the PHY chip, rtl8201 is 9, 10, 12, 13, 15, our hardware engineer pulled these pins high, therefore, the address is 0x1f. therefore, in D: \ U-boot \ include \ ASM-Arm \ arch-DaVinci \ emac_defs.h
# Define emac_mdio_phy_num 0x1f // PHY address
That is, the PHY address is modified.
Simple, mainly because the MII interface is used.
In addition, I found that, after the first U-boot is burned, after ipaddr macaddr is set up, the network will be normal after a new power-on is required.
I opened it carefully.CodeIt is found that emac_mdio_phy_num is used in emac_gigabit_enable, And the slave can automatically or register the address. Therefore, you only need to replace emac_mdio_phy_num with active_phy_addr, no matter what the PHY address you set, I tried it. I don't know what else there is, but I hope you can tell me.
This article is from the "embedded development" blog, please be sure to keep this source http://davinci.blog.51cto.com/1418291/303985