* [PATCH] nvmem: imx: ocotp: add i.MX8MP support
@ 2020-01-17 3:28 Peng Fan
2020-02-09 8:41 ` Peng Fan
2020-02-17 10:42 ` Srinivas Kandagatla
0 siblings, 2 replies; 3+ messages in thread
From: Peng Fan @ 2020-01-17 3:28 UTC (permalink / raw)
To: shawnguo, s.hauer, srinivas.kandagatla
Cc: kernel, festevam, dl-linux-imx, linux-arm-kernel, linux-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
i.MX8MP has 96 banks with each bank 4 words. And it has different
ctrl register layout, so add new macros for that.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
dt-bindings doc has been posted by Anson Huang
drivers/nvmem/imx-ocotp.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index 4ba9cc8f76df..794858093086 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -44,6 +44,11 @@
#define IMX_OCOTP_BM_CTRL_ERROR 0x00000200
#define IMX_OCOTP_BM_CTRL_REL_SHADOWS 0x00000400
+#define IMX_OCOTP_BM_CTRL_ADDR_8MP 0x000001FF
+#define IMX_OCOTP_BM_CTRL_BUSY_8MP 0x00000200
+#define IMX_OCOTP_BM_CTRL_ERROR_8MP 0x00000400
+#define IMX_OCOTP_BM_CTRL_REL_SHADOWS_8MP 0x00000800
+
#define IMX_OCOTP_BM_CTRL_DEFAULT \
{ \
.bm_addr = IMX_OCOTP_BM_CTRL_ADDR, \
@@ -52,6 +57,14 @@
.bm_rel_shadows = IMX_OCOTP_BM_CTRL_REL_SHADOWS,\
}
+#define IMX_OCOTP_BM_CTRL_8MP \
+ { \
+ .bm_addr = IMX_OCOTP_BM_CTRL_ADDR_8MP, \
+ .bm_busy = IMX_OCOTP_BM_CTRL_BUSY_8MP, \
+ .bm_error = IMX_OCOTP_BM_CTRL_ERROR_8MP, \
+ .bm_rel_shadows = IMX_OCOTP_BM_CTRL_REL_SHADOWS_8MP,\
+ }
+
#define TIMING_STROBE_PROG_US 10 /* Min time to blow a fuse */
#define TIMING_STROBE_READ_NS 37 /* Min time before read */
#define TIMING_RELAX_NS 17
@@ -520,6 +533,13 @@ static const struct ocotp_params imx8mn_params = {
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
};
+static const struct ocotp_params imx8mp_params = {
+ .nregs = 384,
+ .bank_address_words = 0,
+ .set_timing = imx_ocotp_set_imx6_timing,
+ .ctrl = IMX_OCOTP_BM_CTRL_8MP,
+};
+
static const struct of_device_id imx_ocotp_dt_ids[] = {
{ .compatible = "fsl,imx6q-ocotp", .data = &imx6q_params },
{ .compatible = "fsl,imx6sl-ocotp", .data = &imx6sl_params },
@@ -532,6 +552,7 @@ static const struct of_device_id imx_ocotp_dt_ids[] = {
{ .compatible = "fsl,imx8mq-ocotp", .data = &imx8mq_params },
{ .compatible = "fsl,imx8mm-ocotp", .data = &imx8mm_params },
{ .compatible = "fsl,imx8mn-ocotp", .data = &imx8mn_params },
+ { .compatible = "fsl,imx8mp-ocotp", .data = &imx8mp_params },
{ },
};
MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);
--
2.16.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] nvmem: imx: ocotp: add i.MX8MP support
2020-01-17 3:28 [PATCH] nvmem: imx: ocotp: add i.MX8MP support Peng Fan
@ 2020-02-09 8:41 ` Peng Fan
2020-02-17 10:42 ` Srinivas Kandagatla
1 sibling, 0 replies; 3+ messages in thread
From: Peng Fan @ 2020-02-09 8:41 UTC (permalink / raw)
To: shawnguo, s.hauer, srinivas.kandagatla
Cc: kernel, festevam, dl-linux-imx, linux-arm-kernel, linux-kernel
> Subject: [PATCH] nvmem: imx: ocotp: add i.MX8MP support
Gentle ping..
Thanks,
Peng.
>
> From: Peng Fan <peng.fan@nxp.com>
>
> i.MX8MP has 96 banks with each bank 4 words. And it has different ctrl
> register layout, so add new macros for that.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>
> dt-bindings doc has been posted by Anson Huang
>
> drivers/nvmem/imx-ocotp.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index
> 4ba9cc8f76df..794858093086 100644
> --- a/drivers/nvmem/imx-ocotp.c
> +++ b/drivers/nvmem/imx-ocotp.c
> @@ -44,6 +44,11 @@
> #define IMX_OCOTP_BM_CTRL_ERROR 0x00000200
> #define IMX_OCOTP_BM_CTRL_REL_SHADOWS 0x00000400
>
> +#define IMX_OCOTP_BM_CTRL_ADDR_8MP 0x000001FF
> +#define IMX_OCOTP_BM_CTRL_BUSY_8MP 0x00000200
> +#define IMX_OCOTP_BM_CTRL_ERROR_8MP 0x00000400
> +#define IMX_OCOTP_BM_CTRL_REL_SHADOWS_8MP 0x00000800
> +
> #define IMX_OCOTP_BM_CTRL_DEFAULT \
> { \
> .bm_addr = IMX_OCOTP_BM_CTRL_ADDR, \
> @@ -52,6 +57,14 @@
> .bm_rel_shadows = IMX_OCOTP_BM_CTRL_REL_SHADOWS,\
> }
>
> +#define IMX_OCOTP_BM_CTRL_8MP \
> + { \
> + .bm_addr = IMX_OCOTP_BM_CTRL_ADDR_8MP, \
> + .bm_busy = IMX_OCOTP_BM_CTRL_BUSY_8MP, \
> + .bm_error = IMX_OCOTP_BM_CTRL_ERROR_8MP, \
> + .bm_rel_shadows = IMX_OCOTP_BM_CTRL_REL_SHADOWS_8MP,\
> + }
> +
> #define TIMING_STROBE_PROG_US 10 /* Min time to blow a fuse */
> #define TIMING_STROBE_READ_NS 37 /* Min time before read */
> #define TIMING_RELAX_NS 17
> @@ -520,6 +533,13 @@ static const struct ocotp_params imx8mn_params =
> {
> .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> };
>
> +static const struct ocotp_params imx8mp_params = {
> + .nregs = 384,
> + .bank_address_words = 0,
> + .set_timing = imx_ocotp_set_imx6_timing,
> + .ctrl = IMX_OCOTP_BM_CTRL_8MP,
> +};
> +
> static const struct of_device_id imx_ocotp_dt_ids[] = {
> { .compatible = "fsl,imx6q-ocotp", .data = &imx6q_params },
> { .compatible = "fsl,imx6sl-ocotp", .data = &imx6sl_params }, @@ -532,6
> +552,7 @@ static const struct of_device_id imx_ocotp_dt_ids[] = {
> { .compatible = "fsl,imx8mq-ocotp", .data = &imx8mq_params },
> { .compatible = "fsl,imx8mm-ocotp", .data = &imx8mm_params },
> { .compatible = "fsl,imx8mn-ocotp", .data = &imx8mn_params },
> + { .compatible = "fsl,imx8mp-ocotp", .data = &imx8mp_params },
> { },
> };
> MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);
> --
> 2.16.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvmem: imx: ocotp: add i.MX8MP support
2020-01-17 3:28 [PATCH] nvmem: imx: ocotp: add i.MX8MP support Peng Fan
2020-02-09 8:41 ` Peng Fan
@ 2020-02-17 10:42 ` Srinivas Kandagatla
1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2020-02-17 10:42 UTC (permalink / raw)
To: Peng Fan, shawnguo, s.hauer
Cc: kernel, festevam, dl-linux-imx, linux-arm-kernel, linux-kernel
On 17/01/2020 03:28, Peng Fan wrote:
> From: Peng Fan<peng.fan@nxp.com>
>
> i.MX8MP has 96 banks with each bank 4 words. And it has different
> ctrl register layout, so add new macros for that.
>
> Signed-off-by: Peng Fan<peng.fan@nxp.com>
> ---
>
> dt-bindings doc has been posted by Anson Huang
>
> drivers/nvmem/imx-ocotp.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
Applied Thanks,
--srini
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-17 10:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 3:28 [PATCH] nvmem: imx: ocotp: add i.MX8MP support Peng Fan
2020-02-09 8:41 ` Peng Fan
2020-02-17 10:42 ` Srinivas Kandagatla
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).