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 31if NVMEM_SYSFS 32 33config EEPROM_AT24 34 tristate "I2C EEPROMs / RAMs / ROMs from most vendors" 35 depends on I2C && SYSFS 36 select REGMAP 37 select REGMAP_I2C 38 help 39 Enable this driver to get read/write support to most I2C EEPROMs 40 and compatible devices like FRAMs, SRAMs, ROMs etc. After you 41 configure the driver to know about each chip on your target 42 board. Use these generic chip names, instead of vendor-specific 43 ones like at24c64, 24lc02 or fm24c04: 44 45 24c00, 24c01, 24c02, spd (readonly 24c02), 24c04, 24c08, 46 24c16, 24c32, 24c64, 24c128, 24c256, 24c512, 24c1024, 24c2048 47 48 Unless you like data loss puzzles, always be sure that any chip 49 you configure as a 24c32 (32 kbit) or larger is NOT really a 50 24c16 (16 kbit) or smaller, and vice versa. Marking the chip 51 as read-only won't help recover from this. Also, if your chip 52 has any software write-protect mechanism you may want to review the 53 code to make sure this driver won't turn it on by accident. 54 55 If you use this with an SMBus adapter instead of an I2C adapter, 56 full functionality is not available. Only smaller devices are 57 supported (24c16 and below, max 4 kByte). 58 59 This driver can also be built as a module. If so, the module 60 will be called at24. 61 62config EEPROM_AT25 63 tristate "SPI EEPROMs (FRAMs) from most vendors" 64 depends on SPI && SYSFS 65 select SPI_MEM 66 help 67 Enable this driver to get read/write support to most SPI EEPROMs 68 and Cypress FRAMs, 69 after you configure the board init code to know about each eeprom 70 on your target board. 71 72 This driver can also be built as a module. If so, the module 73 will be called at25. 74 75config EEPROM_93XX46 76 tristate "Microwire EEPROM 93XX46 support" 77 depends on SPI && SYSFS 78 select REGMAP 79 help 80 Driver for the microwire EEPROM chipsets 93xx46x. The driver 81 supports both read and write commands and also the command to 82 erase the whole EEPROM. 83 84 This driver can also be built as a module. If so, the module 85 will be called eeprom_93xx46. 86 87 If unsure, say N. 88 89config EEPROM_EE1004 90 tristate "SPD EEPROMs on DDR4 memory modules" 91 depends on I2C && SYSFS 92 help 93 Enable this driver to get read support to SPD EEPROMs following 94 the JEDEC EE1004 standard. These are typically found on DDR4 95 SDRAM memory modules. 96 97 This driver can also be built as a module. If so, the module 98 will be called ee1004. 99 100config EEPROM_M24LR 101 tristate "STMicroelectronics M24LR RFID/NFC EEPROM support" 102 depends on I2C && SYSFS 103 select REGMAP_I2C 104 help 105 This enables support for STMicroelectronics M24LR RFID/NFC EEPROM 106 chips. These dual-interface devices expose two I2C addresses: 107 one for EEPROM memory access and another for control and system 108 configuration (e.g. UID, password handling). 109 110 This driver provides a sysfs interface for control functions and 111 integrates with the nvmem subsystem for EEPROM access. 112 113 To compile this driver as a module, choose M here: the 114 module will be called m24lr. 115 116endif # NVMEM_SYSFS 117 118config NVMEM_AIROHA_SMC_EFUSES 119 tristate "Airoha SMC eFuse support" 120 depends on ARM64 121 depends on ARCH_AIROHA || COMPILE_TEST 122 depends on HAVE_ARM_SMCCC 123 default ARCH_AIROHA 124 help 125 Say y here to enable support for reading eFuses on Airoha AN7581 126 SoCs. These are e.g. used to store factory programmed 127 calibration data required for the PCIe or the USB-C PHY or Thermal. 128 129 This driver can also be built as a module. If so, the module will 130 be called nvmem-airoha-smc-efuses. 131 132config NVMEM_AN8855_EFUSE 133 tristate "Airoha AN8855 eFuse support" 134 depends on COMPILE_TEST 135 help 136 Say y here to enable support for reading eFuses on Airoha AN8855 137 Switch. These are e.g. used to store factory programmed 138 calibration data required for the PHY. 139 140 This driver can also be built as a module. If so, the module will 141 be called nvmem-an8855-efuse. 142 143config NVMEM_APPLE_EFUSES 144 tristate "Apple eFuse support" 145 depends on ARCH_APPLE || COMPILE_TEST 146 help 147 Say y here to enable support for reading eFuses on Apple SoCs 148 such as the M1. These are e.g. used to store factory programmed 149 calibration data required for the PCIe or the USB-C PHY. 150 151 This driver can also be built as a module. If so, the module will 152 be called nvmem-apple-efuses. 153 154config NVMEM_APPLE_SPMI 155 tristate "Apple SPMI NVMEM" 156 depends on ARCH_APPLE || COMPILE_TEST 157 depends on SPMI 158 select REGMAP_SPMI 159 help 160 Say y here to build a driver to expose NVMEM cells for a set of power 161 and RTC-related settings on a SPMI-attached PMIC present on Apple 162 devices, such as Apple Silicon Macs. 163 164 This driver can also be built as a module. If so, the module 165 will be called apple-nvmem-spmi. 166 167config NVMEM_BCM_OCOTP 168 tristate "Broadcom On-Chip OTP Controller support" 169 depends on ARCH_BCM_IPROC || COMPILE_TEST 170 depends on HAS_IOMEM 171 default ARCH_BCM_IPROC 172 help 173 Say y here to enable read/write access to the Broadcom OTP 174 controller. 175 176 This driver can also be built as a module. If so, the module 177 will be called nvmem-bcm-ocotp. 178 179config NVMEM_BRCM_NVRAM 180 tristate "Broadcom's NVRAM support" 181 depends on ARCH_BCM_5301X || COMPILE_TEST 182 depends on HAS_IOMEM 183 select GENERIC_NET_UTILS 184 help 185 This driver provides support for Broadcom's NVRAM that can be accessed 186 using I/O mapping. 187 188config NVMEM_IMX_IIM 189 tristate "i.MX IC Identification Module support" 190 depends on ARCH_MXC || COMPILE_TEST 191 help 192 This is a driver for the IC Identification Module (IIM) available on 193 i.MX SoCs, providing access to 4 Kbits of programmable 194 eFuses. 195 196 This driver can also be built as a module. If so, the module 197 will be called nvmem-imx-iim. 198 199config NVMEM_IMX_OCOTP 200 tristate "i.MX 6/7/8 On-Chip OTP Controller support" 201 depends on ARCH_MXC || COMPILE_TEST 202 depends on HAS_IOMEM 203 help 204 This is a driver for the On-Chip OTP Controller (OCOTP) available on 205 i.MX6 SoCs, providing access to 4 Kbits of one-time programmable 206 eFuses. 207 208 This driver can also be built as a module. If so, the module 209 will be called nvmem-imx-ocotp. 210 211config NVMEM_IMX_OCOTP_ELE 212 tristate "i.MX On-Chip OTP Controller support" 213 depends on ARCH_MXC || COMPILE_TEST 214 depends on HAS_IOMEM 215 depends on OF 216 help 217 This is a driver for the On-Chip OTP Controller (OCOTP) 218 available on i.MX SoCs which has ELE. 219 220config NVMEM_IMX_OCOTP_SCU 221 tristate "i.MX8 SCU On-Chip OTP Controller support" 222 depends on IMX_SCU 223 depends on HAVE_ARM_SMCCC 224 help 225 This is a driver for the SCU On-Chip OTP Controller (OCOTP) 226 available on i.MX8 SoCs. 227 228config NVMEM_JZ4780_EFUSE 229 tristate "JZ4780 EFUSE Memory Support" 230 depends on MACH_INGENIC || COMPILE_TEST 231 depends on HAS_IOMEM 232 depends on OF 233 select REGMAP_MMIO 234 help 235 Say Y here to include support for JZ4780 efuse memory found on 236 all JZ4780 SoC based devices. 237 To compile this driver as a module, choose M here: the module 238 will be called nvmem_jz4780_efuse. 239 240config NVMEM_LAN9662_OTPC 241 tristate "Microchip LAN9662 OTP controller support" 242 depends on SOC_LAN966 || ARCH_LAN969X || COMPILE_TEST 243 depends on HAS_IOMEM 244 help 245 This driver enables the OTP controller available on Microchip LAN9662 246 SoCs. It controls the access to the OTP memory connected to it. 247 248config NVMEM_LAYERSCAPE_SFP 249 tristate "Layerscape SFP (Security Fuse Processor) support" 250 depends on ARCH_LAYERSCAPE || COMPILE_TEST 251 depends on HAS_IOMEM 252 select REGMAP_MMIO 253 help 254 This driver provides support to read the eFuses on Freescale 255 Layerscape SoC's. For example, the vendor provides a per part 256 unique ID there. 257 258 This driver can also be built as a module. If so, the module 259 will be called layerscape-sfp. 260 261config NVMEM_LPC18XX_EEPROM 262 tristate "NXP LPC18XX EEPROM Memory Support" 263 depends on ARCH_LPC18XX || COMPILE_TEST 264 depends on HAS_IOMEM 265 help 266 Say Y here to include support for NXP LPC18xx EEPROM memory found in 267 NXP LPC185x/3x and LPC435x/3x/2x/1x devices. 268 To compile this driver as a module, choose M here: the module 269 will be called nvmem_lpc18xx_eeprom. 270 271config NVMEM_LPC18XX_OTP 272 tristate "NXP LPC18XX OTP Memory Support" 273 depends on ARCH_LPC18XX || COMPILE_TEST 274 depends on HAS_IOMEM 275 help 276 Say Y here to include support for NXP LPC18xx OTP memory found on 277 all LPC18xx and LPC43xx devices. 278 To compile this driver as a module, choose M here: the module 279 will be called nvmem_lpc18xx_otp. 280 281config NVMEM_MAX77759 282 tristate "Maxim Integrated MAX77759 NVMEM Support" 283 depends on MFD_MAX77759 284 default MFD_MAX77759 285 help 286 Say Y here to include support for the user-accessible storage found 287 in Maxim Integrated MAX77759 PMICs. This IC provides space for 30 288 bytes of storage. 289 290 This driver can also be built as a module. If so, the module 291 will be called nvmem-max77759. 292 293config NVMEM_MESON_EFUSE 294 tristate "Amlogic Meson GX eFuse Support" 295 depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM 296 help 297 This is a driver to retrieve specific values from the eFuse found on 298 the Amlogic Meson GX SoCs. 299 300 This driver can also be built as a module. If so, the module 301 will be called nvmem_meson_efuse. 302 303config NVMEM_MESON_MX_EFUSE 304 tristate "Amlogic Meson6/Meson8/Meson8b eFuse Support" 305 depends on ARCH_MESON || COMPILE_TEST 306 help 307 This is a driver to retrieve specific values from the eFuse found on 308 the Amlogic Meson6, Meson8 and Meson8b SoCs. 309 310 This driver can also be built as a module. If so, the module 311 will be called nvmem_meson_mx_efuse. 312 313config NVMEM_MICROCHIP_OTPC 314 tristate "Microchip OTPC support" 315 depends on ARCH_AT91 || COMPILE_TEST 316 help 317 This driver enable the OTP controller available on Microchip SAMA7G5 318 SoCs. It controls the access to the OTP memory connected to it. 319 320config NVMEM_MTK_EFUSE 321 tristate "Mediatek SoCs EFUSE support" 322 depends on ARCH_MEDIATEK || COMPILE_TEST 323 depends on HAS_IOMEM 324 help 325 This is a driver to access hardware related data like sensor 326 calibration, HDMI impedance etc. 327 328 This driver can also be built as a module. If so, the module 329 will be called efuse-mtk. 330 331config NVMEM_MXS_OCOTP 332 tristate "Freescale MXS On-Chip OTP Memory Support" 333 depends on ARCH_MXS || COMPILE_TEST 334 depends on HAS_IOMEM 335 help 336 If you say Y here, you will get readonly access to the 337 One Time Programmable memory pages that are stored 338 on the Freescale i.MX23/i.MX28 processor. 339 340 This driver can also be built as a module. If so, the module 341 will be called nvmem-mxs-ocotp. 342 343config NVMEM_NINTENDO_OTP 344 tristate "Nintendo Wii and Wii U OTP Support" 345 depends on WII || COMPILE_TEST 346 help 347 This is a driver exposing the OTP of a Nintendo Wii or Wii U console. 348 349 This memory contains common and per-console keys, signatures and 350 related data required to access peripherals. 351 352 This driver can also be built as a module. If so, the module 353 will be called nvmem-nintendo-otp. 354 355config NVMEM_S32G_OCOTP 356 tristate "S32G SoC OCOTP support" 357 depends on ARCH_S32 358 help 359 This is a driver for the 'OCOTP' peripheral available on S32G 360 platforms. 361 362 If you say Y here, you will get support for the One Time 363 Programmable memory pages. 364 365config NVMEM_QCOM_QFPROM 366 tristate "Qualcomm QFPROM Support" 367 depends on ARCH_QCOM || COMPILE_TEST 368 depends on HAS_IOMEM 369 help 370 Say y here to enable QFPROM support. The QFPROM provides access 371 functions for QFPROM data to rest of the drivers via nvmem interface. 372 373 This driver can also be built as a module. If so, the module 374 will be called nvmem_qfprom. 375 376config NVMEM_QCOM_SEC_QFPROM 377 tristate "Qualcomm SECURE QFPROM Support" 378 depends on ARCH_QCOM || COMPILE_TEST 379 depends on HAS_IOMEM 380 depends on OF 381 select QCOM_SCM 382 help 383 Say y here to enable secure QFPROM support. The secure QFPROM provides access 384 functions for QFPROM data to rest of the drivers via nvmem interface. 385 386 This driver can also be built as a module. If so, the module will be called 387 nvmem_sec_qfprom. 388 389config NVMEM_QNAP_MCU_EEPROM 390 tristate "QNAP MCU EEPROM Support" 391 depends on MFD_QNAP_MCU 392 help 393 Say y here to enable support for accessing the EEPROM attached to 394 QNAP MCU devices. This EEPROM contains additional runtime device 395 information, like MAC addresses for ethernet devices that do not 396 contain their own mac storage. 397 398config NVMEM_RAVE_SP_EEPROM 399 tristate "Rave SP EEPROM Support" 400 depends on RAVE_SP_CORE 401 help 402 Say y here to enable Rave SP EEPROM support. 403 404config NVMEM_RCAR_EFUSE 405 tristate "Renesas R-Car Gen4 E-FUSE support" 406 depends on (ARCH_RENESAS && ARM64) || COMPILE_TEST 407 help 408 Enable support for reading the fuses in the E-FUSE or OTP 409 non-volatile memory block on Renesas R-Car Gen4 SoCs. 410 411 This driver can also be built as a module. If so, the module 412 will be called nvmem-rcar-efuse. 413 414config NVMEM_RMEM 415 tristate "Reserved Memory Based Driver Support" 416 depends on HAS_IOMEM 417 select CRC32 418 help 419 This driver maps reserved memory into an nvmem device. It might be 420 useful to expose information left by firmware in memory. 421 422 This driver can also be built as a module. If so, the module 423 will be called nvmem-rmem. 424 425config NVMEM_ROCKCHIP_EFUSE 426 tristate "Rockchip eFuse Support" 427 depends on ARCH_ROCKCHIP || COMPILE_TEST 428 depends on HAS_IOMEM 429 help 430 This is a simple driver to dump specified values of Rockchip SoC 431 from eFuse, such as cpu-leakage. 432 433 This driver can also be built as a module. If so, the module 434 will be called nvmem_rockchip_efuse. 435 436config NVMEM_ROCKCHIP_OTP 437 tristate "Rockchip OTP controller support" 438 depends on ARCH_ROCKCHIP || COMPILE_TEST 439 depends on HAS_IOMEM 440 help 441 This is a simple driver to dump specified values of Rockchip SoC 442 from OTP, such as cpu-leakage. 443 444 This driver can also be built as a module. If so, the module 445 will be called nvmem_rockchip_otp. 446 447config NVMEM_SC27XX_EFUSE 448 tristate "Spreadtrum SC27XX eFuse Support" 449 depends on MFD_SC27XX_PMIC || COMPILE_TEST 450 depends on HAS_IOMEM 451 help 452 This is a simple driver to dump specified values of Spreadtrum 453 SC27XX PMICs from eFuse. 454 455 This driver can also be built as a module. If so, the module 456 will be called nvmem-sc27xx-efuse. 457 458config NVMEM_SNVS_LPGPR 459 tristate "Support for Low Power General Purpose Register" 460 depends on ARCH_MXC || COMPILE_TEST 461 help 462 This is a driver for Low Power General Purpose Register (LPGPR) available on 463 i.MX6 and i.MX7 SoCs in Secure Non-Volatile Storage (SNVS) of this chip. 464 465 This driver can also be built as a module. If so, the module 466 will be called nvmem-snvs-lpgpr. 467 468config NVMEM_SPMI_SDAM 469 tristate "SPMI SDAM Support" 470 depends on SPMI 471 help 472 This driver supports the Shared Direct Access Memory Module on 473 Qualcomm Technologies, Inc. PMICs. It provides the clients 474 an interface to read/write to the SDAM module's shared memory. 475 476config NVMEM_SPRD_EFUSE 477 tristate "Spreadtrum SoC eFuse Support" 478 depends on ARCH_SPRD || COMPILE_TEST 479 depends on HAS_IOMEM 480 help 481 This is a simple driver to dump specified values of Spreadtrum 482 SoCs from eFuse. 483 484 This driver can also be built as a module. If so, the module 485 will be called nvmem-sprd-efuse. 486 487config NVMEM_STM32_BSEC_OPTEE_TA 488 def_bool NVMEM_STM32_ROMEM && OPTEE 489 help 490 Say y here to enable the accesses to STM32MP SoC OTPs by the OP-TEE 491 trusted application STM32MP BSEC. 492 493 This library is a used by stm32-romem driver or included in the module 494 called nvmem-stm32-romem. 495 496config NVMEM_STM32_ROMEM 497 tristate "STMicroelectronics STM32 factory-programmed memory support" 498 depends on ARCH_STM32 || COMPILE_TEST 499 depends on OPTEE || !OPTEE 500 help 501 Say y here to enable read-only access for STMicroelectronics STM32 502 factory-programmed memory area. 503 504 This driver can also be built as a module. If so, the module 505 will be called nvmem-stm32-romem. 506 507config NVMEM_SUNPLUS_OCOTP 508 tristate "Sunplus SoC OTP support" 509 depends on SOC_SP7021 || COMPILE_TEST 510 depends on HAS_IOMEM 511 help 512 This is a driver for the On-chip OTP controller (OCOTP) available 513 on Sunplus SoCs. It provides access to 128 bytes of one-time 514 programmable eFuse. 515 516 This driver can also be built as a module. If so, the module 517 will be called nvmem-sunplus-ocotp. 518 519config NVMEM_SUNXI_SID 520 tristate "Allwinner SoCs SID support" 521 depends on ARCH_SUNXI 522 help 523 This is a driver for the 'security ID' available on various Allwinner 524 devices. 525 526 This driver can also be built as a module. If so, the module 527 will be called nvmem_sunxi_sid. 528 529config NVMEM_U_BOOT_ENV 530 tristate "U-Boot environment variables support" 531 depends on OF && MTD 532 select NVMEM_LAYOUT_U_BOOT_ENV 533 help 534 U-Boot stores its setup as environment variables. This driver adds 535 support for verifying & exporting such data. It also exposes variables 536 as NVMEM cells so they can be referenced by other drivers. 537 538 Currently this drivers works only with env variables on top of MTD. 539 540 If compiled as module it will be called nvmem_u-boot-env. 541 542config NVMEM_UNIPHIER_EFUSE 543 tristate "UniPhier SoCs eFuse support" 544 depends on ARCH_UNIPHIER || COMPILE_TEST 545 depends on HAS_IOMEM 546 help 547 This is a simple driver to dump specified values of UniPhier SoC 548 from eFuse. 549 550 This driver can also be built as a module. If so, the module 551 will be called nvmem-uniphier-efuse. 552 553config NVMEM_VF610_OCOTP 554 tristate "VF610 SoC OCOTP support" 555 depends on SOC_VF610 || COMPILE_TEST 556 depends on HAS_IOMEM 557 help 558 This is a driver for the 'OCOTP' peripheral available on Vybrid 559 devices like VF5xx and VF6xx. 560 561 This driver can also be build as a module. If so, the module will 562 be called nvmem-vf610-ocotp. 563 564config NVMEM_ZYNQMP 565 tristate "Xilinx ZYNQMP SoC nvmem firmware support" 566 depends on ARCH_ZYNQMP 567 help 568 This is a driver to access hardware related data like 569 soc revision, IDCODE... etc by using the firmware 570 interface. 571 572 If sure, say yes. If unsure, say no. 573 574config NVMEM_QORIQ_EFUSE 575 tristate "NXP QorIQ eFuse support" 576 depends on PPC_85xx || COMPILE_TEST 577 depends on HAS_IOMEM 578 help 579 This driver provides read support for the eFuses (SFP) on NXP QorIQ 580 series SoC's. This includes secure boot settings, the globally unique 581 NXP ID 'FUIDR' and the OEM unique ID 'OUIDR'. 582 583 This driver can also be built as a module. If so, the module 584 will be called nvmem_qoriq_efuse. 585 586endif # NVMEM 587