Hello,
is there any recommended way, how to set MAC address for FEC on iMX6UL when networking is disabled in U-Boot? We have MAC address burned in fuses. When U-Boot is compiled with networking support ethaddr is set as environment value, and propagated to kernel correctly.
When networking support is disabled, MAC address is not set. We got this error:
fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
I thought, that MAC address fuses are read by kernel driver, but obviously not. Or is there something missing in dts file?
Edit:
there is a piece of code in fec_main.c in function fec_get_mac, which obviously should do it.
Thanks for any info
Jiri
Solved! Go to Solution.
linux-4.6.2 is not supported, please try official nxp bsps from i.MX6 product page
Hi Jiri
one can try suggestion provided in sect.43.3.2 Getting a MAC Address
attached Linux Manual
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
the section 45.3.2 Getting a MAC Address in Linux Manual is only described what function fec_get_mac in Ethernet driver do. So, there is nothing more to try. There are four options. Three options which work (kernel cmd line, dts file, MAC set by bootloader) and one which doesn't (OCOTP alias Fuses).
To be more specific. In function fec_get_mac is following code (line 1637):
/*
* 3) from flash or fuse (via platform data)
*/
...
if (pdata)
iap = (unsigned char *)&pdata->mac;
The question is, who set pdata->mac earlier.
one can check linux/..arm/mach-imx/common.c
Honestly, I would by very surprised (and happy) if someone shows me the exact location when the read of OCOTP_MAC is done in kernel code.
In linux-4.6.2 to be more specific. Or is it present only in old 3.14 from BSP.
linux-4.6.2 is not supported, please try official nxp bsps from i.MX6 product page