linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7
@ 2019-04-18 21:42 Leonard Crestez
  2019-04-18 21:42 ` [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Leonard Crestez
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Leonard Crestez @ 2019-04-18 21:42 UTC (permalink / raw)
  To: Lucas Stach, Peng Fan, Shawn Guo, Srinivas Kandagatla
  Cc: Aisheng Dong, Abel Vesa, Anson Huang, dl-linux-imx,
	kernel@pengutronix.de, Fabio Estevam,
	linux-arm-kernel@lists.infradead.org

According to NXP Reference Manuals and uboot/atf sources the OCOTP block
on imx8m behaves more like imx6 than imx7.

- Fuses can be read/written 32bits at a time (no imx7-like banking)
- The OCOTP_HW_OCOTP_TIMING register is like imx6 not imx7

Since nvmem doesn't support uboot-style "sense" and "override" this
issue only affected "write" which is very rarely used.

Fixes: 163c0dbd0cb1 ("nvmem: imx-ocotp: add support for imx8mq")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
---
 drivers/nvmem/imx-ocotp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index 4cf7b61e4bf5..c3e1d9d8a537 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -444,12 +444,12 @@ static const struct ocotp_params imx7ulp_params = {
 	.bank_address_words = 0,
 };
 
 static const struct ocotp_params imx8mq_params = {
 	.nregs = 256,
-	.bank_address_words = 4,
-	.set_timing = imx_ocotp_set_imx7_timing,
+	.bank_address_words = 0,
+	.set_timing = imx_ocotp_set_imx6_timing,
 };
 
 static const struct of_device_id imx_ocotp_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-ocotp",  .data = &imx6q_params },
 	{ .compatible = "fsl,imx6sl-ocotp", .data = &imx6sl_params },
-- 
2.17.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-22  2:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-18 21:42 [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Leonard Crestez
2019-04-18 21:42 ` [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Leonard Crestez
2019-04-19  4:16   ` Peng Fan
2019-04-22  2:35   ` Shawn Guo
2019-04-19  4:16 ` [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Peng Fan
2019-04-19  9:32 ` Bryan O'Donoghue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).