1# EEPROM driver configuration options
2
3# Copyright (c) 2019 Vestas Wind Systems A/S
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig EEPROM
7	bool "Electrically Erasable Programmable Read-Only Memory (EEPROM) drivers"
8	help
9	  Enable support for EEPROM hardware.
10
11if EEPROM
12
13module = EEPROM
14module-str = eeprom
15source "subsys/logging/Kconfig.template.log_config"
16
17config EEPROM_INIT_PRIORITY
18	int "EEPROM init priority"
19	default KERNEL_INIT_PRIORITY_DEVICE
20	help
21	  EEPROM driver device initialization priority. This initialization
22	  priority is used unless the driver implementation has its own
23	  initialization priority.
24
25config EEPROM_SHELL
26	bool "EEPROM shell"
27	default y
28	depends on SHELL
29	help
30	  Enable the EEPROM shell with EEPROM related commands.
31
32config EEPROM_SHELL_BUFFER_SIZE
33	int "EEPROM shell buffer size"
34	default 256
35	depends on EEPROM_SHELL
36	help
37	  Size of the buffer used for EEPROM read/write commands in
38	  the EEPROM shell.
39
40config EEPROM_AT2X
41	bool
42	help
43	  Enable support for Atmel AT2x (and compatible) I2C/SPI
44	  EEPROMs.
45
46config EEPROM_AT2X_EMUL
47	bool "Emulate an Atmel AT24 I2C chip"
48	depends on EMUL
49	help
50	  This is an emulator for the Atmel AT24 series of I2C-attached EEPROMs.
51
52	  At present it only supports 8-bit addressing. The size of the EEPROM
53	  is given by the 'size' property. See the binding for further details.
54
55config EMUL_EEPROM_AT2X
56	bool "[DEPRECATED] Emulate an Atmel AT24 I2C chip"
57	select EEPROM_AT2X_EMUL
58	select DEPRECATED
59	help
60	  This is an emulator for the Atmel AT24 series of I2C-attached EEPROMs.
61
62	  At present it only supports 8-bit addressing. The size of the EEPROM
63	  is given by the 'size' property. See the binding for further details.
64
65	  [DEPRECATED] Select EEPROM_AT2X_EMUL instead.
66
67config EEPROM_AT24
68	bool "Atmel AT24 (and compatible) I2C EEPROM support"
69	default y
70	depends on DT_HAS_ATMEL_AT24_ENABLED
71	select I2C
72	select EEPROM_AT2X
73	help
74	  Enable support for Atmel AT24 (and compatible) I2C EEPROMs.
75
76config EEPROM_AT25
77	bool "Atmel AT25 (and compatible) SPI EEPROM support"
78	default y
79	depends on DT_HAS_ATMEL_AT25_ENABLED
80	select SPI
81	select EEPROM_AT2X
82	help
83	  Enable support for Atmel AT25 (and compatible) SPI EEPROMs.
84
85config EEPROM_AT2X_INIT_PRIORITY
86	int "AT2X EEPROM init priority"
87	default 80
88	depends on EEPROM_AT2X
89	help
90	  AT2X EEPROM driver device initialization priority.
91
92	  The EEPROM is connected to I2C or SPI bus an has to be initialized
93	  after I2C/SPI driver.
94
95source "drivers/eeprom/Kconfig.lpc11u6x"
96source "drivers/eeprom/Kconfig.stm32"
97source "drivers/eeprom/Kconfig.eeprom_emu"
98source "drivers/eeprom/Kconfig.tmp116"
99source "drivers/eeprom/Kconfig.xec"
100
101config EEPROM_SIMULATOR
102	bool "Simulated EEPROM driver"
103	default y
104	depends on DT_HAS_ZEPHYR_SIM_EEPROM_ENABLED
105	select STATS
106	select STATS_NAMES
107	help
108	  Enable Simulated EEPROM driver.
109
110config EEPROM_SIMULATOR_SIMULATE_TIMING
111	bool "Hardware timing simulation"
112	depends on EEPROM_SIMULATOR
113	help
114	  Enable Simulated hardware timing.
115
116if EEPROM_SIMULATOR_SIMULATE_TIMING
117
118config EEPROM_SIMULATOR_MIN_READ_TIME_US
119	int
120	prompt "Minimum read time (µS)"
121	default 2
122	range 1 1000000
123
124config EEPROM_SIMULATOR_MIN_WRITE_TIME_US
125	int
126	prompt "Minimum write time (µS)"
127	default 100
128	range 1 1000000
129
130endif # EEPROM_SIMULATOR_SIMULATE_TIMING
131
132config EEPROM_FAKE
133	bool "Fake EEPROM driver"
134	default y
135	depends on DT_HAS_ZEPHYR_FAKE_EEPROM_ENABLED
136	help
137	  Enable support for the FFF-based fake EEPROM driver.
138
139endif # EEPROM
140