...
The difference between this page and the older page eFuses for i.MX6 SOM is that the later demonstrates how to blow fuses of i.MX6 to boot in a production line, rather a developer friendly environment.
...
Setting up the environment
HummingBoard Gate/Edge
PC that runs Linux
Terminal emulation (putty, minicom etc..) that are connected to HummingBoard2 serial terminal 115200bps 8N1 (J25 pin header where pin 1-gnd,2-i.MX6 TX, 3-i.MX6 RX) – newer PCB layout: J2 pins (6,8,10)
Download and build – imx_usb_loader (credit to BoundaryDevices for the great tool) –https://github.com/boundarydevices/imx_usb_loader
RECOMMENDED – For ease of use we already built imx_usb_loader as static binary with libusb-1.0 and all required configuration files. It can be downloaded from Here-Rev1.1
USB host to host cable – refer to eFuses for i.MX6 SOM USB host to host cable preparation
Booting through USB OTG
As a reminder, a fresh i.MX6 device (unfused) will boot off the USB OTG port. SolidRun USB OTG port is actually a USB type A host connector but carries the same USB OTG signals. (please make sure to have the latest u-boot-tools installed)
Connect HummingBoard2 USB OTG Host port to PC host and power it up.
While running ‘lsusb’ on the Linux PC you should be seeing either one of the following IDs where the first is for the dual/quad and the second is for the solo / dual-lite devices –
Code Block Bus 002 Device 047: ID 15a2:0054 Freescale Semiconductor, Inc. i.MX6Q SystemOnChip in RecoveryMode Bus 002 Device 059: ID 15a2:0061 Freescale Semiconductor, Inc.
Open up the serial console, as a reminder this is a null modem (i.e. hw/sw flow controls are disabled)
Run ‘./runme.sh’ which will mkimage the boot.txt to boot.scr (boot scriptr) and then run ‘sudo ./imx_usb -c .’ which will transfer u-boot.imx DCD (DDR intialization), zImage to 0x10a00000, device tree to 0x18000000 and a boot.scr to 0x17f00000. Once u-boot.imx runs it will source boot.scr
You should see on the terminal u-boot prompt with it’s boot count down. Press any key to stop it.
You can now use ‘fuse’ utility to modify fuses, or you can boot Linux and modify fuses there. To boot Linux run –
Code Block 'setenv bootargs console=ttymxc0,115200; bootz 0x10a00000 - 0x18000000'
The root filesytstem is embedded in the kernel image (initramfs) and root password is –
Code Block 123456
Blowing fuses to program the unit MAC address
...
echo <high 16 bit of the MAC address> > /sys/fsl_otp/HW_OCOTP_MAC1
echo <lower 32bit of the MAC address> > /sys/fsl_otp/HW_OCOTP_MAC0
For example – Program MAC Address 'D0:63:12:34:56:78'
Under Linux:
Program MAC Address 'D0:63:12:34:56:78'
Code Block |
---|
# In order to program the highest 16 bit of MAC address run – echo 0xd063 > /sys/fsl_otp/HW_OCOTP_MAC1 # and for the lowest 32bit run – echo 0x12345678 > /sys/fsl_otp/HW_OCOTP_MAC0 |
Read MAC Address Fuses
Code Block |
---|
# read the highest 16bit
cat /sys/fsl_otp/HW_OCOTP_MAC1
# read the lowest 32bit
cat /sys/fsl_otp/HW_OCOTP_MAC0 |
Under U-Boot:
Program MAC Address 'D0:63:12:34:56:78'
Code Block |
---|
# In order |
...
Code Block |
---|
to program the highest 16 bit of MAC address run – fuse prog -y 4 3 0xd063 # and for the |
...
lowest 32bit run – |
...
Code Block |
---|
fuse prog -y 4 2 0x12345678 |
Read MAC Address Fuses
Code Block |
---|
# In order to read |
...
Code Block |
---|
the highest 16bit; run – fuse read 4 2 |
and for the high 16bit run –
Code Block |
---|
3 # In order to read the lowest 32bit; run – fuse read 4 32 |
Blowing fuses to boot from Micro SD
...
Booting from eMMC is trickier than MicroSD or SATA since the device is soldered on the board and can’t be modified by simply taking it out and flashing it on a PC. So when flashing u-boot to the eMMC device, make sure you use a u-boot image that you can get into it’s console in case you need to modify it afterwards. MicroSOM rev 1.5 has a 0402 resistor pads that can be short to keep the eMMC device in reset. Refer to eFuses for i.MX6 SOM Forcing eMMC reset. If you are using the older version of the SOM (rev 1.3) that doesn’t have this force eMMC then the only option is to swap the SOM with another one that is set to boot from Micro SD, boot it up, erase the eMMC and flash the eMMC with a working u-boot/OS etc…
...