Hello,
I was looking for support on imx8 for fuse shadowing (fuse override) in Uboot just like for imx6/imx7
=> fuse override 0 731 0x79161c13
Overriding bank 0 word 0x000002db with 0x79161c13...
Override fuse to i.MX8 in u-boot is forbidden
ERROR
Indeed in u-boot/driver/musc/imx8/fuse.c :
int fuse_override(u32 bank, u32 word, u32 val)
{
printf("Override fuse to i.MX8 in u-boot is allowed\n");
return -EPERM;
}
While in imx6/imx7 it was possible
in u-boot/driver/misc/imc_ocotp.c
int fuse_override(u32 bank, u32 word, u32 val)
{
struct ocotp_regs *regs;
int ret;
u32 phy_bank;
u32 phy_word;
ret = prepare_write(®s, bank, word, __func__);
if (ret)
return ret;
phy_bank = fuse_bank_physical(bank);
phy_word = fuse_word_physical(bank, word);
writel(val, ®s->bank[phy_bank].fuse_regs[phy_word << 2]);
#ifdef CONFIG_MX7ULP
if (readl(®s->out_status) & (BM_OUT_STATUS_PROGFAIL | BM_OUT_STATUS_LOCKED)) {
writel((BM_OUT_STATUS_PROGFAIL | BM_OUT_STATUS_LOCKED), ®s->out_status_clr);
printf("mxc_ocotp %s(): fuse write is failed\n", __func__);
return -EIO;
}
#endif
return finish_access(regs, __func__);
}
Also why fuse read is restricted to bank 0 only ?
=> fuse read 0 731
Reading bank 0:
Word 0x000002db: 00000000
fuse read 1 0
Reading bank 1:
Word 0x00000000:Invalid bank argument, ONLY bank 0 is supported
ERROR
Best Regards,
Mathieu
Hi
The source code is https://source.codeaurora.org/external/imx/uboot-imx/tree/drivers/misc/imx8/fuse.c?h=lf-5.10.52-2.1....
And the fuse_override function:
int fuse_override(u32 bank, u32 word, u32 val)
{
printf("Override fuse to i.MX8 in u-boot is forbidden\n");
return -EPERM;
}
Unfortunately, I did not find the relevant reason. But the design of the driver must be based on some reason
Hi @Zhiming_Liu ,
Thanks for that helpful reply, it will surely help Continental !
But I m not very keen on that kind of support I guess it must be based on some reason.
BR,
Mathieu