1# SPDX-License-Identifier: GPL-2.0-only
2menuconfig NVMEM
3	bool "NVMEM Support"
4	imply NVMEM_LAYOUTS
5	help
6	  Support for NVMEM(Non Volatile Memory) devices like EEPROM, EFUSES...
7
8	  This framework is designed to provide a generic interface to NVMEM
9	  from both the Linux Kernel and the userspace.
10
11	  If unsure, say no.
12
13if NVMEM
14
15config NVMEM_SYSFS
16	bool "/sys/bus/nvmem/devices/*/nvmem (sysfs interface)"
17	depends on SYSFS
18	default y
19	help
20	 Say Y here to add a sysfs interface for NVMEM.
21
22	 This interface is mostly used by userspace applications to
23	 read/write directly into nvmem.
24
25# Layouts
26
27source "drivers/nvmem/layouts/Kconfig"
28
29# Devices
30
31config NVMEM_APPLE_EFUSES
32	tristate "Apple eFuse support"
33	depends on ARCH_APPLE || COMPILE_TEST
34	default ARCH_APPLE
35	help
36	  Say y here to enable support for reading eFuses on Apple SoCs
37	  such as the M1. These are e.g. used to store factory programmed
38	  calibration data required for the PCIe or the USB-C PHY.
39
40	  This driver can also be built as a module. If so, the module will
41	  be called nvmem-apple-efuses.
42
43config NVMEM_APPLE_SPMI
44	tristate "Apple SPMI NVMEM"
45	depends on ARCH_APPLE || COMPILE_TEST
46	depends on SPMI
47	select REGMAP_SPMI
48	help
49	  Say y here to build a driver to expose NVMEM cells for a set of power
50	  and RTC-related settings on a SPMI-attached PMIC present on Apple
51	  devices, such as Apple Silicon Macs.
52
53	  This driver can also be built as a module. If so, the module
54	  will be called apple-nvmem-spmi.
55
56config NVMEM_BCM_OCOTP
57	tristate "Broadcom On-Chip OTP Controller support"
58	depends on ARCH_BCM_IPROC || COMPILE_TEST
59	depends on HAS_IOMEM
60	default ARCH_BCM_IPROC
61	help
62	  Say y here to enable read/write access to the Broadcom OTP
63	  controller.
64
65	  This driver can also be built as a module. If so, the module
66	  will be called nvmem-bcm-ocotp.
67
68config NVMEM_BRCM_NVRAM
69	tristate "Broadcom's NVRAM support"
70	depends on ARCH_BCM_5301X || COMPILE_TEST
71	depends on HAS_IOMEM
72	select GENERIC_NET_UTILS
73	help
74	  This driver provides support for Broadcom's NVRAM that can be accessed
75	  using I/O mapping.
76
77config NVMEM_IMX_IIM
78	tristate "i.MX IC Identification Module support"
79	depends on ARCH_MXC || COMPILE_TEST
80	help
81	  This is a driver for the IC Identification Module (IIM) available on
82	  i.MX SoCs, providing access to 4 Kbits of programmable
83	  eFuses.
84
85	  This driver can also be built as a module. If so, the module
86	  will be called nvmem-imx-iim.
87
88config NVMEM_IMX_OCOTP
89	tristate "i.MX 6/7/8 On-Chip OTP Controller support"
90	depends on ARCH_MXC || COMPILE_TEST
91	depends on HAS_IOMEM
92	help
93	  This is a driver for the On-Chip OTP Controller (OCOTP) available on
94	  i.MX6 SoCs, providing access to 4 Kbits of one-time programmable
95	  eFuses.
96
97	  This driver can also be built as a module. If so, the module
98	  will be called nvmem-imx-ocotp.
99
100config NVMEM_IMX_OCOTP_ELE
101	tristate "i.MX On-Chip OTP Controller support"
102	depends on ARCH_MXC || COMPILE_TEST
103	depends on HAS_IOMEM
104	depends on OF
105	help
106	  This is a driver for the On-Chip OTP Controller (OCOTP)
107	  available on i.MX SoCs which has ELE.
108
109config NVMEM_IMX_OCOTP_SCU
110	tristate "i.MX8 SCU On-Chip OTP Controller support"
111	depends on IMX_SCU
112	depends on HAVE_ARM_SMCCC
113	help
114	  This is a driver for the SCU On-Chip OTP Controller (OCOTP)
115	  available on i.MX8 SoCs.
116
117config NVMEM_JZ4780_EFUSE
118	tristate "JZ4780 EFUSE Memory Support"
119	depends on MACH_INGENIC || COMPILE_TEST
120	depends on HAS_IOMEM
121	depends on OF
122	select REGMAP_MMIO
123	help
124	  Say Y here to include support for JZ4780 efuse memory found on
125	  all JZ4780 SoC based devices.
126	  To compile this driver as a module, choose M here: the module
127	  will be called nvmem_jz4780_efuse.
128
129config NVMEM_LAN9662_OTPC
130	tristate "Microchip LAN9662 OTP controller support"
131	depends on SOC_LAN966 || COMPILE_TEST
132	depends on HAS_IOMEM
133	help
134	  This driver enables the OTP controller available on Microchip LAN9662
135	  SoCs. It controls the access to the OTP memory connected to it.
136
137config NVMEM_LAYERSCAPE_SFP
138	tristate "Layerscape SFP (Security Fuse Processor) support"
139	depends on ARCH_LAYERSCAPE || COMPILE_TEST
140	depends on HAS_IOMEM
141	select REGMAP_MMIO
142	help
143	  This driver provides support to read the eFuses on Freescale
144	  Layerscape SoC's. For example, the vendor provides a per part
145	  unique ID there.
146
147	  This driver can also be built as a module. If so, the module
148	  will be called layerscape-sfp.
149
150config NVMEM_LPC18XX_EEPROM
151	tristate "NXP LPC18XX EEPROM Memory Support"
152	depends on ARCH_LPC18XX || COMPILE_TEST
153	depends on HAS_IOMEM
154	help
155	  Say Y here to include support for NXP LPC18xx EEPROM memory found in
156	  NXP LPC185x/3x and LPC435x/3x/2x/1x devices.
157	  To compile this driver as a module, choose M here: the module
158	  will be called nvmem_lpc18xx_eeprom.
159
160config NVMEM_LPC18XX_OTP
161	tristate "NXP LPC18XX OTP Memory Support"
162	depends on ARCH_LPC18XX || COMPILE_TEST
163	depends on HAS_IOMEM
164	help
165	  Say Y here to include support for NXP LPC18xx OTP memory found on
166	  all LPC18xx and LPC43xx devices.
167	  To compile this driver as a module, choose M here: the module
168	  will be called nvmem_lpc18xx_otp.
169
170config NVMEM_MAX77759
171	tristate "Maxim Integrated MAX77759 NVMEM Support"
172	depends on MFD_MAX77759
173	default MFD_MAX77759
174	help
175	  Say Y here to include support for the user-accessible storage found
176	  in Maxim Integrated MAX77759 PMICs. This IC provides space for 30
177	  bytes of storage.
178
179	  This driver can also be built as a module. If so, the module
180	  will be called nvmem-max77759.
181
182config NVMEM_MESON_EFUSE
183	tristate "Amlogic Meson GX eFuse Support"
184	depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM
185	help
186	  This is a driver to retrieve specific values from the eFuse found on
187	  the Amlogic Meson GX SoCs.
188
189	  This driver can also be built as a module. If so, the module
190	  will be called nvmem_meson_efuse.
191
192config NVMEM_MESON_MX_EFUSE
193	tristate "Amlogic Meson6/Meson8/Meson8b eFuse Support"
194	depends on ARCH_MESON || COMPILE_TEST
195	help
196	  This is a driver to retrieve specific values from the eFuse found on
197	  the Amlogic Meson6, Meson8 and Meson8b SoCs.
198
199	  This driver can also be built as a module. If so, the module
200	  will be called nvmem_meson_mx_efuse.
201
202config NVMEM_MICROCHIP_OTPC
203	tristate "Microchip OTPC support"
204	depends on ARCH_AT91 || COMPILE_TEST
205	help
206	  This driver enable the OTP controller available on Microchip SAMA7G5
207	  SoCs. It controls the access to the OTP memory connected to it.
208
209config NVMEM_MTK_EFUSE
210	tristate "Mediatek SoCs EFUSE support"
211	depends on ARCH_MEDIATEK || COMPILE_TEST
212	depends on HAS_IOMEM
213	help
214	  This is a driver to access hardware related data like sensor
215	  calibration, HDMI impedance etc.
216
217	  This driver can also be built as a module. If so, the module
218	  will be called efuse-mtk.
219
220config NVMEM_MXS_OCOTP
221	tristate "Freescale MXS On-Chip OTP Memory Support"
222	depends on ARCH_MXS || COMPILE_TEST
223	depends on HAS_IOMEM
224	help
225	  If you say Y here, you will get readonly access to the
226	  One Time Programmable memory pages that are stored
227	  on the Freescale i.MX23/i.MX28 processor.
228
229	  This driver can also be built as a module. If so, the module
230	  will be called nvmem-mxs-ocotp.
231
232config NVMEM_NINTENDO_OTP
233	tristate "Nintendo Wii and Wii U OTP Support"
234	depends on WII || COMPILE_TEST
235	help
236	  This is a driver exposing the OTP of a Nintendo Wii or Wii U console.
237
238	  This memory contains common and per-console keys, signatures and
239	  related data required to access peripherals.
240
241	  This driver can also be built as a module. If so, the module
242	  will be called nvmem-nintendo-otp.
243
244config NVMEM_QCOM_QFPROM
245	tristate "QCOM QFPROM Support"
246	depends on ARCH_QCOM || COMPILE_TEST
247	depends on HAS_IOMEM
248	help
249	  Say y here to enable QFPROM support. The QFPROM provides access
250	  functions for QFPROM data to rest of the drivers via nvmem interface.
251
252	  This driver can also be built as a module. If so, the module
253	  will be called nvmem_qfprom.
254
255config NVMEM_QCOM_SEC_QFPROM
256        tristate "QCOM SECURE QFPROM Support"
257        depends on ARCH_QCOM || COMPILE_TEST
258        depends on HAS_IOMEM
259        depends on OF
260        select QCOM_SCM
261        help
262          Say y here to enable secure QFPROM support. The secure QFPROM provides access
263          functions for QFPROM data to rest of the drivers via nvmem interface.
264
265          This driver can also be built as a module. If so, the module will be called
266          nvmem_sec_qfprom.
267
268config NVMEM_RAVE_SP_EEPROM
269	tristate "Rave SP EEPROM Support"
270	depends on RAVE_SP_CORE
271	help
272	  Say y here to enable Rave SP EEPROM support.
273
274config NVMEM_RCAR_EFUSE
275	tristate "Renesas R-Car Gen4 E-FUSE support"
276	depends on (ARCH_RENESAS && ARM64) || COMPILE_TEST
277	depends on NVMEM
278	help
279	  Enable support for reading the fuses in the E-FUSE or OTP
280	  non-volatile memory block on Renesas R-Car Gen4 SoCs.
281
282	  This driver can also be built as a module. If so, the module
283	  will be called nvmem-rcar-efuse.
284
285config NVMEM_RMEM
286	tristate "Reserved Memory Based Driver Support"
287	depends on HAS_IOMEM
288	select CRC32
289	help
290	  This driver maps reserved memory into an nvmem device. It might be
291	  useful to expose information left by firmware in memory.
292
293	  This driver can also be built as a module. If so, the module
294	  will be called nvmem-rmem.
295
296config NVMEM_ROCKCHIP_EFUSE
297	tristate "Rockchip eFuse Support"
298	depends on ARCH_ROCKCHIP || COMPILE_TEST
299	depends on HAS_IOMEM
300	help
301	  This is a simple driver to dump specified values of Rockchip SoC
302	  from eFuse, such as cpu-leakage.
303
304	  This driver can also be built as a module. If so, the module
305	  will be called nvmem_rockchip_efuse.
306
307config NVMEM_ROCKCHIP_OTP
308	tristate "Rockchip OTP controller support"
309	depends on ARCH_ROCKCHIP || COMPILE_TEST
310	depends on HAS_IOMEM
311	help
312	  This is a simple driver to dump specified values of Rockchip SoC
313	  from OTP, such as cpu-leakage.
314
315	  This driver can also be built as a module. If so, the module
316	  will be called nvmem_rockchip_otp.
317
318config NVMEM_SC27XX_EFUSE
319	tristate "Spreadtrum SC27XX eFuse Support"
320	depends on MFD_SC27XX_PMIC || COMPILE_TEST
321	depends on HAS_IOMEM
322	help
323	  This is a simple driver to dump specified values of Spreadtrum
324	  SC27XX PMICs from eFuse.
325
326	  This driver can also be built as a module. If so, the module
327	  will be called nvmem-sc27xx-efuse.
328
329config NVMEM_SNVS_LPGPR
330	tristate "Support for Low Power General Purpose Register"
331	depends on ARCH_MXC || COMPILE_TEST
332	help
333	  This is a driver for Low Power General Purpose Register (LPGPR) available on
334	  i.MX6 and i.MX7 SoCs in Secure Non-Volatile Storage (SNVS) of this chip.
335
336	  This driver can also be built as a module. If so, the module
337	  will be called nvmem-snvs-lpgpr.
338
339config NVMEM_SPMI_SDAM
340	tristate "SPMI SDAM Support"
341	depends on SPMI
342	help
343	  This driver supports the Shared Direct Access Memory Module on
344	  Qualcomm Technologies, Inc. PMICs. It provides the clients
345	  an interface to read/write to the SDAM module's shared memory.
346
347config NVMEM_SPRD_EFUSE
348	tristate "Spreadtrum SoC eFuse Support"
349	depends on ARCH_SPRD || COMPILE_TEST
350	depends on HAS_IOMEM
351	help
352	  This is a simple driver to dump specified values of Spreadtrum
353	  SoCs from eFuse.
354
355	  This driver can also be built as a module. If so, the module
356	  will be called nvmem-sprd-efuse.
357
358config NVMEM_STM32_BSEC_OPTEE_TA
359	def_bool NVMEM_STM32_ROMEM && OPTEE
360	help
361	  Say y here to enable the accesses to STM32MP SoC OTPs by the OP-TEE
362	  trusted application STM32MP BSEC.
363
364	  This library is a used by stm32-romem driver or included in the module
365	  called nvmem-stm32-romem.
366
367config NVMEM_STM32_ROMEM
368	tristate "STMicroelectronics STM32 factory-programmed memory support"
369	depends on ARCH_STM32 || COMPILE_TEST
370	depends on OPTEE || !OPTEE
371	help
372	  Say y here to enable read-only access for STMicroelectronics STM32
373	  factory-programmed memory area.
374
375	  This driver can also be built as a module. If so, the module
376	  will be called nvmem-stm32-romem.
377
378config NVMEM_SUNPLUS_OCOTP
379	tristate "Sunplus SoC OTP support"
380	depends on SOC_SP7021 || COMPILE_TEST
381	depends on HAS_IOMEM
382	help
383	  This is a driver for the On-chip OTP controller (OCOTP) available
384	  on Sunplus SoCs. It provides access to 128 bytes of one-time
385	  programmable eFuse.
386
387	  This driver can also be built as a module. If so, the module
388	  will be called nvmem-sunplus-ocotp.
389
390config NVMEM_SUNXI_SID
391	tristate "Allwinner SoCs SID support"
392	depends on ARCH_SUNXI
393	help
394	  This is a driver for the 'security ID' available on various Allwinner
395	  devices.
396
397	  This driver can also be built as a module. If so, the module
398	  will be called nvmem_sunxi_sid.
399
400config NVMEM_U_BOOT_ENV
401	tristate "U-Boot environment variables support"
402	depends on OF && MTD
403	select NVMEM_LAYOUT_U_BOOT_ENV
404	help
405	  U-Boot stores its setup as environment variables. This driver adds
406	  support for verifying & exporting such data. It also exposes variables
407	  as NVMEM cells so they can be referenced by other drivers.
408
409	  Currently this drivers works only with env variables on top of MTD.
410
411	  If compiled as module it will be called nvmem_u-boot-env.
412
413config NVMEM_UNIPHIER_EFUSE
414	tristate "UniPhier SoCs eFuse support"
415	depends on ARCH_UNIPHIER || COMPILE_TEST
416	depends on HAS_IOMEM
417	help
418	  This is a simple driver to dump specified values of UniPhier SoC
419	  from eFuse.
420
421	  This driver can also be built as a module. If so, the module
422	  will be called nvmem-uniphier-efuse.
423
424config NVMEM_VF610_OCOTP
425	tristate "VF610 SoC OCOTP support"
426	depends on SOC_VF610 || COMPILE_TEST
427	depends on HAS_IOMEM
428	help
429	  This is a driver for the 'OCOTP' peripheral available on Vybrid
430	  devices like VF5xx and VF6xx.
431
432	  This driver can also be build as a module. If so, the module will
433	  be called nvmem-vf610-ocotp.
434
435config NVMEM_ZYNQMP
436	tristate "Xilinx ZYNQMP SoC nvmem firmware support"
437	depends on ARCH_ZYNQMP
438	help
439	  This is a driver to access hardware related data like
440	  soc revision, IDCODE... etc by using the firmware
441	  interface.
442
443	  If sure, say yes. If unsure, say no.
444
445config NVMEM_QORIQ_EFUSE
446	tristate "NXP QorIQ eFuse support"
447	depends on PPC_85xx || COMPILE_TEST
448	depends on HAS_IOMEM
449	help
450	  This driver provides read support for the eFuses (SFP) on NXP QorIQ
451	  series SoC's. This includes secure boot settings, the globally unique
452	  NXP ID 'FUIDR' and the OEM unique ID 'OUIDR'.
453
454	  This driver can also be built as a module. If so, the module
455	  will be called nvmem_qoriq_efuse.
456
457endif
458