Hello, i want burn efuse on imx8mini for emmc boot, emmc connected exactly like EVK board (SD3 8 bit on NAND pins), can you tell me arguments of uboot like:
fuse prog [-y] <bank> <word> <hexval> [<hexval>...]
Good day,
Have you managed to solve your e-Fuse boot problem?
I'm successfully using the Super Root Key to boot a signed u-boot. I'm trying to lock down the boot sequence to only use the eMMC. There's also a fallback to SD if the DISABLE_SDMMC_MFG bit is left at 0.
Before setting the fuses I've used the development kits external boot select switches to successfully boot from SD and eMMC.
The iMX 8M Mini application processor reference manual was used to look up the
meaning of the register definitions.
OCOTP_HW_OCOTP_BOOT_CFG0 register:
3035_0470 Value of OTP Bank1 Word3
Register fields defined on page 823 & p824
[15: 0] BOOT_CFG
Page 816: Boot fusemap : eMMC
[0] - IO voltage selection (Manufacture mode) : 0=3V3
[1] - IO voltage selection (Normal boot mode) : 0=3V3
[3:2] - Speed : 00=Normal
[6:4] - Bus width : 010=8-bit
[7] - Fast boot: 0=Regular
[8] - SD loopback : 0=Through SD pad
[9] - Power cycle : 0=Disable
[11:10]- Port select : 10=uSDHC3
[14:12]- Boot device select : 010=eMMC (According to p815, Table 6-41)
[15] - Reserved
[24:16] Reserverd
[25] SEC_CONFIG[1] : 1x - Closed (HAB Security On)
[27:26] Reserved
[28] BT_FUSE_SEL : 1=Boot config from eFuses
[29] FORCE_COLD_BOOT : 1=Always cold boot. Higher security
[31:30] Reserved
The programmed fuse value:
u-boot=> fuse sense 1 3 1
Sensing bank 1:
Word 0x00000003: 0x32002820
When u-boot is programmed into eMMC, it boots it regardless of the external bootpin settings.
If I wipe the u-boot from eMMC, it will load the u-boot on the SD card if the external boot pins are
set to Mode0=1, Mode1=0
I expect the boot ROM is falling back to SD due to SDMMC_MFG (manufacture mode) still being active.
Page 824 defines further boot config registers:
3035_0480 Value of OTP Bank2 Word0 (OCOTP_HW_OCOTP_BOOT_CFG1)
3035_0490 Value of OTP Bank2 Word1 (OCOTP_HW_OCOTP_BOOT_CFG2)
3035_04A0 Value of OTP Bank2 Word2 (OCOTP_HW_OCOTP_BOOT_CFG3)
3035_04B0 Value of OTP Bank2 Word3 (OCOTP_HW_OCOTP_BOOT_CFG4)
Page 817 -- 819 covers the register fields. The registers were not altered. The default values are:
u-boot=> fuse sense 2 0 4
01000010 00000000 00000000 00000000
I didn't use the FastBoot option.
Regards,
Frikkie
Hello,
The way that you are going to program the efuses depends on several things. Principally by the specs of your memory. However, to make boot from the eMMC you need to make sure that the BOOT_CFG[14:12] registers are configured as below to boot from MMC/eMMC:
BOOT_CFG[14:12] = 010
The other configurations like I said before, depends on your memory configuration. You can find the description of the register description of the efuses on chapter 6.2 of the reference manual.
Hope this information can help you.
Best regards,
Diego.
Hello Diego Adrian Cuevas.
According to this patch and processor manual
https://patchwork.kernel.org/patch/10929005/
"The i.MX8MM is similar to i.MX6 processors in terms of addressing and clock
setup."
i.MX 8M Mini Applications Processor Reference Manual, Rev. 1, 03/2019
Table 6-49. Fusemap Descriptions, page 823
0x470[15:0] BOOT_CFG
eFuse burning manual for i.mx6
https://imxdev.gitlab.io/tutorial/Burning_eFuses_on_i.MX/#calculating-fuse-bank-and-word
(0x470 - 0x400) / 0x10 = 7
7 / 8 = 0 and the remainder is 7
Bank = 0
Word = 7
it is correct for i.MX8MM BOOT_CFG?
Alexander
Hello,
It seems to me that both articles are not suitable for i.MX8M Mini.
We used the Bank and Word values from the processor manual.
What we wanted to burn:
0x470 [14-12] 010 - MMC / eMMC
0x470 [11-10] 10 - SD3
i.MX 8M Mini Applications Processor Reference Manual, Rev. 2, 08/2019
6.3.4.16 Value of OTP Bank1 Word3 (Boot Configuration Info.)
(OCOTP_HW_OCOTP_BOOT_CFG00)Shadowed memory mapped access to OTP Bank 1, word 3.
Address: 3035_0000h base + 470h offset = 3035_0470h
Therefore, we used this command in u-boot:
u-boot=> fuse prog 1 3 0x00002800
rogramming bank 1 word 0x00000003 to 0x00002800...
Warning: Programming fuses is an irreversible operation!
This may brick your system.
Use this command only if you are sure of what you are doing!
Alexander
To understand how to calculate the bank and word, using address: look at OCOTP memory map in
section 6.3.4 (OCOTP Memory Map/Register Definition) of i.MX 8M Mini Reference Manual,
Rev. 2, 08/2019 :
3035_0400 - Bank 0 Word 0
3035_0410 - Bank 0 Word 1
...
3035_0440 - Bank 1 Word 0
So, formula is as following:
Bank = (address - 0x400) / 0x40 ;
Word = [(address - 0x400) % 0x40] / 0x10 ;
Hello, thanks.
I see this chapter, in this chpater desctibe BOOT_CFG, BOOT_CFG1 etc
But uboot requre "<bank> <word>", i need to figure out the accordance between "<bank> <word>" and BOOT_CFG registers.