iMX6 Dual Plus SET OTP value for FEC MAC Address not working

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMX6 Dual Plus SET OTP value for FEC MAC Address not working

3,327件の閲覧回数
sijilcv
Contributor II

Hi,

I’m facing issues while setting MAC address for  iMX6 Dual plus based custom board. I have tried flashing the following OTP registers. The OTP flashing was successful but the board doesn't pick up the flashed mac address, its always going to the random MAC.

 

Say for eg the MAC address to be set is 00:23:a1:47:1b:80

 

echo 0x00000023 >/sys/fsl_otp/HW_OCOTP_MAC1

echo 0xa1471b80 >/sys/fsl_otp/HW_OCOTP_MAC0

 

Could you please verify the above commands. Is there anything wrong with the byte order ?

Is there any specific details to be added to Ethernet  node in device tree?

fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 0e:88:a4:78:c2:7c

In the u-boot the following error messages comes up "Error: FEC address not set."

Is there anything to be done in the u-boot level itself ?

I have gone through the imx6 fec driver code. its given as it will fetch from otp as 3rd level. But I'm not sure how the platform data ( pdata->mac) is populated with otp read MAC address.

 

/*
* 3) from flash or fuse (via platform data)
*/
if (!is_valid_ether_addr(iap)) {
#ifdef CONFIG_M5272
if (FEC_FLASHMAC)
iap = (unsigned char *)FEC_FLASHMAC;
#else
if (pdata)
iap = (unsigned char *)&pdata->mac;
#endif
}

kernel version: 4.1.15-6QuadPlus+ga4d2a08

When I tried to set mac address as kernel parameter it works perfectly.   “fec.macaddr=0x00,0x22,0xa0,0x47,0x1b,0x80”

Could you please help me to resolve this issue. I need MAC address to be placed in OTP.

0 件の賞賛
返信
1 返信

1,568件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi sijil

one can check if fuses are blown correctly using

https://community.freescale.com/docs/DOC-95458

and try to debug checking function imx_get_mac_from_fuse()
uboot/arch/arm/cpu/armv7/mx6/soc.c and /drivers/net/fec_mxc.c

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信