From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSqId-0001ae-N4 for barebox@lists.infradead.org; Tue, 12 Jun 2018 20:54:25 +0000 Received: by mail-pl0-x243.google.com with SMTP id az12-v6so165391plb.8 for ; Tue, 12 Jun 2018 13:53:45 -0700 (PDT) From: Andrey Smirnov Date: Tue, 12 Jun 2018 13:52:30 -0700 Message-Id: <20180612205310.25745-15-andrew.smirnov@gmail.com> In-Reply-To: <20180612205310.25745-1-andrew.smirnov@gmail.com> References: <20180612205310.25745-1-andrew.smirnov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v5 14/54] ARM: i.MX: ocotp: Add i.MX8MQ support To: barebox@lists.infradead.org Cc: Andrey Smirnov From: Sascha Hauer Signed-off-by: Sascha Hauer [andrew.smirnov@gmail.com: Rebased to account for move to nvmem] Signed-off-by: Andrey Smirnov --- drivers/nvmem/Kconfig | 2 +- drivers/nvmem/ocotp.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig index 53086d1aa..a3797b4aa 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 86d0b9cd0..c2d2982ee 100644 --- a/drivers/nvmem/ocotp.c +++ b/drivers/nvmem/ocotp.c @@ -647,6 +647,14 @@ 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 }, + .format_mac = imx_ocotp_format_mac, +}; + static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = { { .compatible = "fsl,imx6q-ocotp", @@ -660,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, -- 2.17.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox