diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-06-07 06:00:30 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-06-08 08:15:26 +0200 |
commit | 636b830eb3af53614cbe59d8b71ba329bd0b5a01 (patch) | |
tree | 8ef9862078d53a0541d048ea76a59de858097523 | |
parent | b8dce5d3a3be4ecb92055732927f0213976902d4 (diff) | |
download | barebox-636b830eb3af53614cbe59d8b71ba329bd0b5a01.tar.gz |
ARM: i.MX: ocotp: Add i.MX8MQ support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[andrew.smirnov@gmail.com: Rebased to account for move to nvmem]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/nvmem/Kconfig | 2 | ||||
-rw-r--r-- | drivers/nvmem/ocotp.c | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig index 53086d1aac..a3797b4aac 100644 --- a/drivers/nvmem/Kconfig +++ b/drivers/nvmem/Kconfig @@ -18,7 +18,7 @@ config NVMEM_SNVS_LPGPR config IMX_OCOTP tristate "i.MX6 On Chip OTP controller" - depends on ARCH_IMX6 || ARCH_VF610 + depends on ARCH_IMX6 || ARCH_VF610 || ARCH_IMX8MQ depends on OFDEVICE help This adds support for the i.MX6 On-Chip OTP controller. Currently the diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c index 86d0b9cd07..f3af8620ed 100644 --- a/drivers/nvmem/ocotp.c +++ b/drivers/nvmem/ocotp.c @@ -647,6 +647,13 @@ static struct imx_ocotp_data vf610_ocotp_data = { .format_mac = vf610_ocotp_format_mac, }; +static struct imx_ocotp_data imx8mq_ocotp_data = { + .num_regs = 2048, + .addr_to_offset = imx6sl_addr_to_offset, + .mac_offsets_num = 1, + .mac_offsets = { 0x90 }, +}; + static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = { { .compatible = "fsl,imx6q-ocotp", @@ -661,6 +668,9 @@ static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = { .compatible = "fsl,imx6ul-ocotp", .data = &imx6q_ocotp_data, }, { + .compatible = "fsl,imx8mq-ocotp", + .data = &imx8mq_ocotp_data, + }, { .compatible = "fsl,vf610-ocotp", .data = &vf610_ocotp_data, }, { |