imx8 fuse override in uboot

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8 fuse override in uboot

2,361件の閲覧回数
mathdesc
Contributor III

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(&regs, bank, word, __func__);
	if (ret)
		return ret;

	phy_bank = fuse_bank_physical(bank);
	phy_word = fuse_word_physical(bank, word);

	writel(val, &regs->bank[phy_bank].fuse_regs[phy_word << 2]);

#ifdef CONFIG_MX7ULP
	if (readl(&regs->out_status) & (BM_OUT_STATUS_PROGFAIL | BM_OUT_STATUS_LOCKED)) {
		writel((BM_OUT_STATUS_PROGFAIL | BM_OUT_STATUS_LOCKED), &regs->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

ラベル(1)
タグ(1)
0 件の賞賛
返信
2 返答(返信)

2,339件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信

2,334件の閲覧回数
mathdesc
Contributor III

Hi @Zhiming_Liu ,

+@AdrianGancev 

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

0 件の賞賛
返信