From: Bryan O'Donoghue <pure.logic@nexus-software.ie>
To: l.stach@pengutronix.de, peng.fan@nxp.com, shawnguo@kernel.org,
srinivas.kandagatla@linaro.org, leonard.crestez@nxp.com
Cc: aisheng.dong@nxp.com, abel.vesa@nxp.com, anson.huang@nxp.com,
linux-imx@nxp.com, kernel@pengutronix.de, fabio.estevam@nxp.com,
Bryan O'Donoghue <pure.logic@nexus-software.ie>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] nvmem: imx-ocotp: Add i.MX8MM support
Date: Fri, 19 Apr 2019 11:03:24 +0100 [thread overview]
Message-ID: <20190419100327.31483-4-pure.logic@nexus-software.ie> (raw)
In-Reply-To: <20190419100327.31483-1-pure.logic@nexus-software.ie>
This patch adds support to burn the fuses on the i.MX8MM.
https://www.nxp.com/webapp/Download?colCode=IMX8MMRM
The i.MX8MM is similar to i.MX6 processors in terms of addressing and clock
setup.
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
---
drivers/nvmem/imx-ocotp.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index 08a9b1ef8ae4..b6e71c34a393 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -45,7 +45,12 @@
#define IMX_OCOTP_ADDR_DATA2 0x0040
#define IMX_OCOTP_ADDR_DATA3 0x0050
+#if defined(CONFIG_ARCH_MXC)
+#define IMX_OCOTP_BM_CTRL_ADDR 0x000000FF
+#else
#define IMX_OCOTP_BM_CTRL_ADDR 0x0000007F
+#endif /* ARCH_MXC */
+
#define IMX_OCOTP_BM_CTRL_BUSY 0x00000100
#define IMX_OCOTP_BM_CTRL_ERROR 0x00000200
#define IMX_OCOTP_BM_CTRL_REL_SHADOWS 0x00000400
@@ -444,6 +449,12 @@ static const struct ocotp_params imx7ulp_params = {
.bank_address_words = 0,
};
+static const struct ocotp_params imx8mm_params = {
+ .nregs = 64,
+ .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 },
@@ -453,6 +464,7 @@ static const struct of_device_id imx_ocotp_dt_ids[] = {
{ .compatible = "fsl,imx7d-ocotp", .data = &imx7d_params },
{ .compatible = "fsl,imx6sll-ocotp", .data = &imx6sll_params },
{ .compatible = "fsl,imx7ulp-ocotp", .data = &imx7ulp_params },
+ { .compatible = "fsl,imx8mm-ocotp", .data = &imx8mm_params },
{ },
};
MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-04-19 10:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 10:03 [PATCH 0/6] Add i.MX8MM support Bryan O'Donoghue
2019-04-19 10:03 ` [PATCH 1/6] nvmem: imx-ocotp: Allow selection of OCOTP for imx8 processors Bryan O'Donoghue
2019-04-19 10:03 ` [PATCH 2/6] nvmem: imx-ocotp: Fix i.MX OC-OTP naming prompt Bryan O'Donoghue
2019-04-19 10:03 ` Bryan O'Donoghue [this message]
2019-04-19 10:32 ` [PATCH 3/6] nvmem: imx-ocotp: Add i.MX8MM support Leonard Crestez
2019-04-19 11:48 ` Bryan O'Donoghue
2019-04-19 16:45 ` Bryan O'Donoghue
2019-04-19 10:03 ` [PATCH 4/6] nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing Bryan O'Donoghue
2019-04-19 10:03 ` [PATCH 5/6] nvmem: imx-ocotp: Ensure the RELAX field is non-zero Bryan O'Donoghue
2019-04-19 10:03 ` [PATCH 6/6] dt-bindings: imx-ocotp: Add i.MX8MM support Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190419100327.31483-4-pure.logic@nexus-software.ie \
--to=pure.logic@nexus-software.ie \
--cc=abel.vesa@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=anson.huang@nxp.com \
--cc=fabio.estevam@nxp.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=peng.fan@nxp.com \
--cc=shawnguo@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.