From 137e8e3c1748a6ad39201b22316182bd01adb5d5 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 28 May 2018 21:47:29 -0700 Subject: i.MX: ocotp: Move OCOTP driver to drivers/nvmem Move OCOTP driver to drivers/nvmem to be consistent with Linux kerenel. Cc: Vivien Didelot Tested-by: Vivien Didelot Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- drivers/nvmem/Kconfig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'drivers/nvmem/Kconfig') diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig index d801cc25af..53086d1aac 100644 --- a/drivers/nvmem/Kconfig +++ b/drivers/nvmem/Kconfig @@ -15,4 +15,25 @@ config NVMEM_SNVS_LPGPR help If you say yes here you get NVMEM support for the Freescale SNVS Low Power Generic Purpose Register (LPGPR). + +config IMX_OCOTP + tristate "i.MX6 On Chip OTP controller" + depends on ARCH_IMX6 || ARCH_VF610 + depends on OFDEVICE + help + This adds support for the i.MX6 On-Chip OTP controller. Currently the + only supported functionality is reading the MAC address and assigning + it to an ethernet device. + +config IMX_OCOTP_WRITE + bool + prompt "Enable write support of i.MX6 CPUs OTP fuses" + depends on IMX_OCOTP + help + This adds write support to IMX6 On-Chip OTP registers. Example of set + MAC to 12:34:56:78:9A:BC (2 words with address 0x22 (OCOTP_MAC0) and + address 0x23 (OCOTP_MAC1)). To calculate the file offset multiply + the value of the address by 4. + mw -l -d /dev/imx-ocotp 0x8C 0x00001234 + mw -l -d /dev/imx-ocotp 0x88 0x56789ABC endif -- cgit v1.2.3