IMX6ULL Boot From Fuses的设置方法

本文讲解imx6ull设置Fuse的值让系统在Boot From Fuses mode从eMMC和NAND引导启动的方法。

一、关于Fuse Mode

  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页)。

二、设置Fuse在Boot From Fuses mode下从eMMC启动

  设置从eMMC引导启动的方法,需要查看参考手册的第五章Fusemap的“Table 5-6. MMC/eMMC Boot Fusemap”,该表描述了eMMC从Fuse启动相关寄存器每一位的含义;然后在第37章On-Chip OTP Controller (OCOTP_CTRL)中找到需要设置的地址对应的寄存器。

1、查看Table 5-6. MMC/eMMC Boot Fusemap

表的内容如下:

attachments-2020-03-gQLEXZyK5e7db37d93615.png

attachments-2020-03-NasATU2m5e7db3a251342.png

从此表格中,可以获取到三点信息
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才有效

2、查看地址对应的寄存器

 按照Table 5-6中的描述,根据实际硬件确认每个地址需要设置的内容后,根据地址值可以在第37章On-Chip OTP Controller (OCOTP_CTRL)中找到我们需要设置地址对应的寄存器.
  0x450地址对应的寄存器为OCOTP_CFG4 (Bank0 Word5);
  0x460地址对应的寄存器为OCOTP_CFG5 (Bank0 Word6)。
寄存器描述内容如下图所示:

attachments-2020-03-BJzMjfPH5e7db3e864fb3.pngattachments-2020-03-jYJLtWTA5e7db3ed5bc27.png

3、设置Fuse的值

  设置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

三、设置Fuse在Boot From Fuses mode下从NAND FLASH启动

  设置nand的fuse值分析可以参考上面设置EMMC的方法,此次不再赘述,详细内容查看imx6ull参考手册.
SOM6Y08 Nand Flash版本的fuse设置方法如下所示:
!!!因为Fuse的编程是不可以逆的,请谨慎使用prog命令

fuse prog -y 0 5 80
fuse prog -y 0 6 10

参考文档

1、 Burning eFuses on i.MX6 and i.MX7

2、《 i.MX 6ULL Applications Processor Reference Manual》

  • 发表于 2020-03-27 16:12
  • 阅读 ( 1026 )
  • 分类:i.MX6ULL

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
FU
FU

9 篇文章

作家榜 »

  1. BBelephant 13 文章
  2. ronnie 11 文章
  3. FU 9 文章
  4. toca 4 文章
  5. 大飞 3 文章
  6. Vivek 3 文章
  7. jack-fang 2 文章
  8. Bin 1 文章