summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2018-09-03 00:53:20 -0700
committerYe Li <ye.li@nxp.com>2018-09-04 19:11:50 -0700
commit59d8a4772ff2163ed7e446d2c486e62849087242 (patch)
tree677975b20eaea42bd28dca3d91db9431cb7c1593
parent9dba7a4d4387278b0452f2fc93978777d903abb1 (diff)
MLK-19433-3 mxc_ocotp: Disable fuse sense for imx8mq B1
On iMX8MQ Rev B1, reading from fuse box is not allowed. The OCOTP_READ_FUSE_DATA register is tied to magic number 0xff0055aa for chip rev. So u-boot has to disable the fuse sense function for it. Signed-off-by: Ye Li <ye.li@nxp.com> Tested-by: Anson Huang <Anson.Huang@nxp.com> (cherry picked from commit da95f60611e8859eba3e7ccb715fdce4d6376774)
-rw-r--r--drivers/misc/mxc_ocotp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/mxc_ocotp.c b/drivers/misc/mxc_ocotp.c
index 42f2d399c8..fe9f16947d 100644
--- a/drivers/misc/mxc_ocotp.c
+++ b/drivers/misc/mxc_ocotp.c
@@ -323,6 +323,11 @@ int fuse_sense(u32 bank, u32 word, u32 *val)
struct ocotp_regs *regs;
int ret;
+ if (is_imx8mq() && is_soc_rev(CHIP_REV_2_1)) {
+ printf("mxc_ocotp %s(): fuse sense is disabled\n", __func__);
+ return -EPERM;
+ }
+
ret = prepare_read(&regs, bank, word, val, __func__);
if (ret)
return ret;