forked from Minki/linux
98830350d3
Add support for Microchip OTP controller available on SAMA7G5. The OTPC controls the access to a non-volatile memory. The memory behind OTPC is organized into packets, packets are composed by a fixed length header (4 bytes long) and a variable length payload (payload length is available in the header). When software request the data at an offset in memory the OTPC will return (via header + data registers) the whole packet that has a word at that offset. For the OTP memory layout like below: offset OTP Memory layout . . . ... . . . 0x0E +-----------+ <--- packet X | header X | 0x12 +-----------+ | payload X | 0x16 | | | | 0x1A | | +-----------+ . . . ... . . . if user requests data at address 0x16 the data started at 0x0E will be returned by controller. User will be able to fetch the whole packet starting at 0x0E (or parts of the packet) via proper registers. The same packet will be returned if software request the data at offset 0x0E or 0x12 or 0x1A. The OTP will be populated by Microchip with at least 2 packets first one being boot configuration packet and the 2nd one being temperature calibration packet. The packet order will be preserved b/w different chip revisions but the packet sizes may change. For the above reasons and to keep the same software able to work on all chip variants the read function of the driver is working with a packet id instead of an offset in OTP memory. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220706100627.6534-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
348 lines
11 KiB
Plaintext
348 lines
11 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
menuconfig NVMEM
|
|
bool "NVMEM Support"
|
|
help
|
|
Support for NVMEM(Non Volatile Memory) devices like EEPROM, EFUSES...
|
|
|
|
This framework is designed to provide a generic interface to NVMEM
|
|
from both the Linux Kernel and the userspace.
|
|
|
|
If unsure, say no.
|
|
|
|
if NVMEM
|
|
|
|
config NVMEM_SYSFS
|
|
bool "/sys/bus/nvmem/devices/*/nvmem (sysfs interface)"
|
|
depends on SYSFS
|
|
default y
|
|
help
|
|
Say Y here to add a sysfs interface for NVMEM.
|
|
|
|
This interface is mostly used by userspace applications to
|
|
read/write directly into nvmem.
|
|
|
|
config NVMEM_IMX_IIM
|
|
tristate "i.MX IC Identification Module support"
|
|
depends on ARCH_MXC || COMPILE_TEST
|
|
help
|
|
This is a driver for the IC Identification Module (IIM) available on
|
|
i.MX SoCs, providing access to 4 Kbits of programmable
|
|
eFuses.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-imx-iim.
|
|
|
|
config NVMEM_IMX_OCOTP
|
|
tristate "i.MX 6/7/8 On-Chip OTP Controller support"
|
|
depends on ARCH_MXC || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This is a driver for the On-Chip OTP Controller (OCOTP) available on
|
|
i.MX6 SoCs, providing access to 4 Kbits of one-time programmable
|
|
eFuses.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-imx-ocotp.
|
|
|
|
config NVMEM_IMX_OCOTP_SCU
|
|
tristate "i.MX8 SCU On-Chip OTP Controller support"
|
|
depends on IMX_SCU
|
|
depends on HAVE_ARM_SMCCC
|
|
help
|
|
This is a driver for the SCU On-Chip OTP Controller (OCOTP)
|
|
available on i.MX8 SoCs.
|
|
|
|
config JZ4780_EFUSE
|
|
tristate "JZ4780 EFUSE Memory Support"
|
|
depends on MACH_INGENIC || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
depends on OF
|
|
select REGMAP_MMIO
|
|
help
|
|
Say Y here to include support for JZ4780 efuse memory found on
|
|
all JZ4780 SoC based devices.
|
|
To compile this driver as a module, choose M here: the module
|
|
will be called nvmem_jz4780_efuse.
|
|
|
|
config NVMEM_LPC18XX_EEPROM
|
|
tristate "NXP LPC18XX EEPROM Memory Support"
|
|
depends on ARCH_LPC18XX || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
Say Y here to include support for NXP LPC18xx EEPROM memory found in
|
|
NXP LPC185x/3x and LPC435x/3x/2x/1x devices.
|
|
To compile this driver as a module, choose M here: the module
|
|
will be called nvmem_lpc18xx_eeprom.
|
|
|
|
config NVMEM_LPC18XX_OTP
|
|
tristate "NXP LPC18XX OTP Memory Support"
|
|
depends on ARCH_LPC18XX || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
Say Y here to include support for NXP LPC18xx OTP memory found on
|
|
all LPC18xx and LPC43xx devices.
|
|
To compile this driver as a module, choose M here: the module
|
|
will be called nvmem_lpc18xx_otp.
|
|
|
|
config NVMEM_MXS_OCOTP
|
|
tristate "Freescale MXS On-Chip OTP Memory Support"
|
|
depends on ARCH_MXS || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
If you say Y here, you will get readonly access to the
|
|
One Time Programmable memory pages that are stored
|
|
on the Freescale i.MX23/i.MX28 processor.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-mxs-ocotp.
|
|
|
|
config MTK_EFUSE
|
|
tristate "Mediatek SoCs EFUSE support"
|
|
depends on ARCH_MEDIATEK || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This is a driver to access hardware related data like sensor
|
|
calibration, HDMI impedance etc.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called efuse-mtk.
|
|
|
|
config MICROCHIP_OTPC
|
|
tristate "Microchip OTPC support"
|
|
depends on ARCH_AT91 || COMPILE_TEST
|
|
help
|
|
This driver enable the OTP controller available on Microchip SAMA7G5
|
|
SoCs. It controlls the access to the OTP memory connected to it.
|
|
|
|
config NVMEM_NINTENDO_OTP
|
|
tristate "Nintendo Wii and Wii U OTP Support"
|
|
depends on WII || COMPILE_TEST
|
|
help
|
|
This is a driver exposing the OTP of a Nintendo Wii or Wii U console.
|
|
|
|
This memory contains common and per-console keys, signatures and
|
|
related data required to access peripherals.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-nintendo-otp.
|
|
|
|
config QCOM_QFPROM
|
|
tristate "QCOM QFPROM Support"
|
|
depends on ARCH_QCOM || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
Say y here to enable QFPROM support. The QFPROM provides access
|
|
functions for QFPROM data to rest of the drivers via nvmem interface.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem_qfprom.
|
|
|
|
config NVMEM_SPMI_SDAM
|
|
tristate "SPMI SDAM Support"
|
|
depends on SPMI
|
|
help
|
|
This driver supports the Shared Direct Access Memory Module on
|
|
Qualcomm Technologies, Inc. PMICs. It provides the clients
|
|
an interface to read/write to the SDAM module's shared memory.
|
|
|
|
config ROCKCHIP_EFUSE
|
|
tristate "Rockchip eFuse Support"
|
|
depends on ARCH_ROCKCHIP || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This is a simple drive to dump specified values of Rockchip SoC
|
|
from eFuse, such as cpu-leakage.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem_rockchip_efuse.
|
|
|
|
config ROCKCHIP_OTP
|
|
tristate "Rockchip OTP controller support"
|
|
depends on ARCH_ROCKCHIP || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This is a simple drive to dump specified values of Rockchip SoC
|
|
from otp, such as cpu-leakage.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem_rockchip_otp.
|
|
|
|
config NVMEM_BCM_OCOTP
|
|
tristate "Broadcom On-Chip OTP Controller support"
|
|
depends on ARCH_BCM_IPROC || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
default ARCH_BCM_IPROC
|
|
help
|
|
Say y here to enable read/write access to the Broadcom OTP
|
|
controller.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-bcm-ocotp.
|
|
|
|
config NVMEM_STM32_ROMEM
|
|
tristate "STMicroelectronics STM32 factory-programmed memory support"
|
|
depends on ARCH_STM32 || COMPILE_TEST
|
|
help
|
|
Say y here to enable read-only access for STMicroelectronics STM32
|
|
factory-programmed memory area.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-stm32-romem.
|
|
|
|
config NVMEM_SUNXI_SID
|
|
tristate "Allwinner SoCs SID support"
|
|
depends on ARCH_SUNXI
|
|
help
|
|
This is a driver for the 'security ID' available on various Allwinner
|
|
devices.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem_sunxi_sid.
|
|
|
|
config UNIPHIER_EFUSE
|
|
tristate "UniPhier SoCs eFuse support"
|
|
depends on ARCH_UNIPHIER || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This is a simple driver to dump specified values of UniPhier SoC
|
|
from eFuse.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-uniphier-efuse.
|
|
|
|
config NVMEM_VF610_OCOTP
|
|
tristate "VF610 SoC OCOTP support"
|
|
depends on SOC_VF610 || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This is a driver for the 'OCOTP' peripheral available on Vybrid
|
|
devices like VF5xx and VF6xx.
|
|
|
|
This driver can also be build as a module. If so, the module will
|
|
be called nvmem-vf610-ocotp.
|
|
|
|
config MESON_EFUSE
|
|
tristate "Amlogic Meson GX eFuse Support"
|
|
depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM
|
|
help
|
|
This is a driver to retrieve specific values from the eFuse found on
|
|
the Amlogic Meson GX SoCs.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem_meson_efuse.
|
|
|
|
config MESON_MX_EFUSE
|
|
tristate "Amlogic Meson6/Meson8/Meson8b eFuse Support"
|
|
depends on ARCH_MESON || COMPILE_TEST
|
|
help
|
|
This is a driver to retrieve specific values from the eFuse found on
|
|
the Amlogic Meson6, Meson8 and Meson8b SoCs.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem_meson_mx_efuse.
|
|
|
|
config NVMEM_SNVS_LPGPR
|
|
tristate "Support for Low Power General Purpose Register"
|
|
depends on ARCH_MXC || COMPILE_TEST
|
|
help
|
|
This is a driver for Low Power General Purpose Register (LPGPR) available on
|
|
i.MX6 and i.MX7 SoCs in Secure Non-Volatile Storage (SNVS) of this chip.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-snvs-lpgpr.
|
|
|
|
config RAVE_SP_EEPROM
|
|
tristate "Rave SP EEPROM Support"
|
|
depends on RAVE_SP_CORE
|
|
help
|
|
Say y here to enable Rave SP EEPROM support.
|
|
|
|
config SC27XX_EFUSE
|
|
tristate "Spreadtrum SC27XX eFuse Support"
|
|
depends on MFD_SC27XX_PMIC || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This is a simple driver to dump specified values of Spreadtrum
|
|
SC27XX PMICs from eFuse.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-sc27xx-efuse.
|
|
|
|
config NVMEM_ZYNQMP
|
|
bool "Xilinx ZYNQMP SoC nvmem firmware support"
|
|
depends on ARCH_ZYNQMP
|
|
help
|
|
This is a driver to access hardware related data like
|
|
soc revision, IDCODE... etc by using the firmware
|
|
interface.
|
|
|
|
If sure, say yes. If unsure, say no.
|
|
|
|
config SPRD_EFUSE
|
|
tristate "Spreadtrum SoC eFuse Support"
|
|
depends on ARCH_SPRD || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This is a simple driver to dump specified values of Spreadtrum
|
|
SoCs from eFuse.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-sprd-efuse.
|
|
|
|
config NVMEM_RMEM
|
|
tristate "Reserved Memory Based Driver Support"
|
|
depends on HAS_IOMEM
|
|
help
|
|
This driver maps reserved memory into an nvmem device. It might be
|
|
useful to expose information left by firmware in memory.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-rmem.
|
|
|
|
config NVMEM_BRCM_NVRAM
|
|
tristate "Broadcom's NVRAM support"
|
|
depends on ARCH_BCM_5301X || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This driver provides support for Broadcom's NVRAM that can be accessed
|
|
using I/O mapping.
|
|
|
|
config NVMEM_LAYERSCAPE_SFP
|
|
tristate "Layerscape SFP (Security Fuse Processor) support"
|
|
depends on ARCH_LAYERSCAPE || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
select REGMAP_MMIO
|
|
help
|
|
This driver provides support to read the eFuses on Freescale
|
|
Layerscape SoC's. For example, the vendor provides a per part
|
|
unique ID there.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called layerscape-sfp.
|
|
|
|
config NVMEM_SUNPLUS_OCOTP
|
|
tristate "Sunplus SoC OTP support"
|
|
depends on SOC_SP7021 || COMPILE_TEST
|
|
depends on HAS_IOMEM
|
|
help
|
|
This is a driver for the On-chip OTP controller (OCOTP) available
|
|
on Sunplus SoCs. It provides access to 128 bytes of one-time
|
|
programmable eFuse.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called nvmem-sunplus-ocotp.
|
|
|
|
config NVMEM_APPLE_EFUSES
|
|
tristate "Apple eFuse support"
|
|
depends on ARCH_APPLE || COMPILE_TEST
|
|
default ARCH_APPLE
|
|
help
|
|
Say y here to enable support for reading eFuses on Apple SoCs
|
|
such as the M1. These are e.g. used to store factory programmed
|
|
calibration data required for the PCIe or the USB-C PHY.
|
|
|
|
This driver can also be built as a module. If so, the module will
|
|
be called nvmem-apple-efuses.
|
|
|
|
endif
|