
Hi, Andy, Fabio, Benoît,
-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Beno?t Thébaudeau Sent: Thursday, June 06, 2013 5:16 AM To: Fabio Estevam Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] imx: Vybrid VF610 mac address issue
Hi Andy, Fabio,
On Wednesday, June 5, 2013 11:13:52 PM, Fabio Estevam wrote:
Hi Andy,
On Wed, Jun 5, 2013 at 5:54 PM, Andy Voltz andy.voltz@timesys.com
wrote:
I recently tried booting the VF610 support on the Tower board, but the mac address is reversed in Linux userspace. DHCP/BOOTP seems to work properly in u-boot.
I'm booting this kernel: https://github.com/Timesys/linux-timesys/ ref: 2c4ead2dd6da019f5052a69b12c8f5b6b71f8dca
I haven't yet seen how the address is passed to the kernel, but our previous u-boot support does not have this issue with the same kernel. That u-boot branch is also on our github.
The MAC address is read in the imx_get_mac_from_fuse() function in arch/arm/cpu/armv7/vf610/generic.c
Try printing all the elements of mac[] array in this function and check if the logic is correct there.
You probably had programmed the fuses with a MAC address on your board, and then replaced the existing U-Boot with the mainline version. These 2 U-Boot-s may interpret the MAC fuses in a different way. Especially, note that VF610 interprets the MAC fuses with reversed endianness compared to i.MX6 in mainline U-Boot. This is documented in doc/README.<SoC>. There may be the same difference between VF610 in mainline U-Boot and the other version of U-Boot that you used first.
[Alison Wang] First of all, the mac address is set in include/configs/vybrid.h as below in Andy's previous u-boot version. #define CONFIG_ETHADDR 00:e0:0c:bc:e5:60 #define CONFIG_IPADDR 10.81.67.175 Because no hardcoded IP addresses/MAC addresses should be set there, I change the codes. As Fabio said, the mac address is read in the imx_get_mac_from_fuse() function in arch/arm/cpu/armv7/vf610/generic.c now.
I think Andy may not program the mac address correctly in fuses on his board with the mainline version. On my board, the fuses are programmed like this, The value of OTP fuse Bank4 Word2 is 0x000000e0 The value of OTP fuse Bank4 Word3 is 0x0cbce560
So the mac address can be read from imx_get_mac_from_fuse() function in u-boot. Then we can get "ethaddr=00:e0:0c:bc:e5:60" in u-boot environment variables as below. Vybrid U-Boot > pri baudrate=115200 bootdelay=3 ethact=FEC ethaddr=00:e0:0c:bc:e5:60 stderr=serial stdin=serial stdout=serial
Environment size: 121/8188 bytes
Andy, did you program the fuses as above? How about the result after programming the fuses as above?
Best Regards, Alison Wang