Boot From Fuses mode是指在Boot_Mode[1:0]的值为00b的时候,系统启动将会忽略Boot_Mode的其余位的状态,从而直接判断eFUSE的设置状态来决定从哪个外部存储设备中引导数据启动。 Boot From Fuses mode 的详细介绍位于imx6ull参考手册(i.MX 6ULL Applications Processor Reference Manual) 文档的第8.2.3小结(252页)。
设置从eMMC引导启动的方法,需要查看参考手册的第五章Fusemap的“Table 5-6. MMC/eMMC Boot Fusemap”,该表描述了eMMC从Fuse启动相关寄存器每一位的含义;然后在第37章On-Chip OTP Controller (OCOTP_CTRL)中找到需要设置的地址对应的寄存器。
表的内容如下:
从此表格中,可以获取到三点信息
a、每一位的0/1的含义
b、表中设置内容对应的地址如"0x45[7:0]"
c、每个地址段对应的配置集合,如" "BOOT_CFG1"
根据自己的硬件来配置表中的每一位的值,以SOM6Y08 eMMC核心板为例,只需要关注0x450和0x460地址寄存器的设置,设置的参数如下:
0x450[7:0] = 0x68
0x450[15:8] = 0x48
0x460[7:0] = 0x10 //设置BT_FUSE_SEL位为1,Fuse才有效
按照Table 5-6中的描述,根据实际硬件确认每个地址需要设置的内容后,根据地址值可以在第37章On-Chip OTP Controller (OCOTP_CTRL)中找到我们需要设置地址对应的寄存器.
0x450地址对应的寄存器为OCOTP_CFG4 (Bank0 Word5);
0x460地址对应的寄存器为OCOTP_CFG5 (Bank0 Word6)。
寄存器描述内容如下图所示:
设置Fuse使用可以使用uboot命令行工具fuse,fuse的使用方法如下:
=> fuse fuse - Fuse sub-system Usage: fuse read <bank> <word> [<cnt>] - read 1 or 'cnt' fuse words, starting at 'word' #Reads the eFuse value from the shadow register. fuse sense <bank> <word> [<cnt>] - sense 1 or 'cnt' fuse words, starting at 'word' #Reads the eFuse value directly from the fusebox. fuse prog [-y] <bank> <word> <hexval> [<hexval>...] - program 1 or several fuse words, starting at 'word' (PERMANENT) Write directly in the fusebox #NOTE: This operation is irreversible and can brick your device. fuse override <bank> <word> <hexval> [<hexval>...] - override 1 or several fuse words, starting at 'word' #Override just the shadow register this operation #doesn't affects the fusebox, #so it's cleaned after a reset. #This command may be useful for testing purpose.
设置fuse mode从emmc启动设置内容如下:
!!!因为Fuse的编程是不可以逆的,请谨慎使用prog命令
fuse prog -y 0 5 4868 fuse prog -y 0 6 10
设置nand的fuse值分析可以参考上面设置EMMC的方法,此次不再赘述,详细内容查看imx6ull参考手册.
SOM6Y08 Nand Flash版本的fuse设置方法如下所示:
!!!因为Fuse的编程是不可以逆的,请谨慎使用prog命令
fuse prog -y 0 5 80 fuse prog -y 0 6 10
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!