From e8371faca1027a4ae8e84ae5679ccd08ad827316 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Wed, 9 Nov 2016 08:14:13 -0800 Subject: i.MX: ocotp: Add Vybrid support Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/ocotp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-imx/ocotp.c b/arch/arm/mach-imx/ocotp.c index f39e1faeaa..68ff0ce28b 100644 --- a/arch/arm/mach-imx/ocotp.c +++ b/arch/arm/mach-imx/ocotp.c @@ -516,6 +516,14 @@ static u32 imx6q_addr_to_offset(u32 addr) return imx6sl_addr_to_offset(addr) + addendum; } +static u32 vf610_addr_to_offset(u32 addr) +{ + if (addr == 0x04) + return 0x450; + else + return imx6q_addr_to_offset(addr); +} + static struct imx_ocotp_data imx6q_ocotp_data = { .num_regs = 512, .addr_to_offset = imx6q_addr_to_offset, @@ -526,6 +534,11 @@ static struct imx_ocotp_data imx6sl_ocotp_data = { .addr_to_offset = imx6sl_addr_to_offset, }; +static struct imx_ocotp_data vf610_ocotp_data = { + .num_regs = 512, + .addr_to_offset = vf610_addr_to_offset, +}; + static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = { { .compatible = "fsl,imx6q-ocotp", @@ -539,6 +552,9 @@ static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = { }, { .compatible = "fsl,imx6ul-ocotp", .data = &imx6q_ocotp_data, + }, { + .compatible = "fsl,vf610-ocotp", + .data = &vf610_ocotp_data, }, { /* sentinel */ } -- cgit v1.2.3