I'd like to use the eFuse MAC as the linux MAC, but the 4.2.2 BSP's linux is setting a random MAC every time. My current strategy is to read the eFuse address in uboot and pass it to the kernel, but that's not quite working.
First, I'm not sure I'm reading the right registers. From https://support.logicpd.com/TDGForum/tabid/124/aft/96/Default.aspx I discovered the CONTROL_FUSE_EMAC_LSB and CONTROL_FUSE_EMAC_MSB registers (addresses 0x4800 2380 and 0x4800 2384, respectively). And I then found more information in the technical manual.
I then attempt to read out the bytes at those addresses and compose a well-formed ethaddr:
setexpr.b m1 *0x48002380 \| 0x0
setexpr.b m2 *0x48002381 \| 0x0
setexpr.b m3 *0x48002382 \| 0x0
setexpr.b m5 *0x48002384 \| 0x0
setexpr.b m6 *0x48002385 \| 0x0
setexpr.b m7 *0x48002386 \| 0x0
setenv ethaddr $m1:$m2:$m3:$m5:$m6:$m7
That let's me construct a MAC ID looking string, but I'm not convinced those memory dumps are accessing the right memory (i'm more inclined to believe that I'm interpreting them correctly, but that could be wrong too).
Then, making things even harder, sending that ethaddr to the kernel doesn't actually do anything. I pass it as ethaddr and its just ignored.
== Kernel bootargs ==
nand-ecc=chip console=ttyO0,115200n8 ethaddr=9a:aa:aa:f0:88:89 display=15 ignore_loglevel early_printk no_console_suspend mem=55M@0x80000000 mem=128M@0x88000000 mtdparts=om2
Then later:
[ 2.614318] smsc911x smsc911x.0: eth0: MAC Address: d6:71:c6:ab:c9:1c
So... two questions:
1. How do I read the CONTROL_FUSE_EMAC_LSB and CONTROL_FUSE_EMAC_MSB and format them into an ethaddr?
2. How do I send that ethaddr to the kernel?