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"
100source "drivers/eeprom/Kconfig.mb85rcxx"
101
102config EEPROM_SIMULATOR
103	bool "Simulated EEPROM driver"
104	default y
105	depends on DT_HAS_ZEPHYR_SIM_EEPROM_ENABLED
106	depends on !(ARCH_POSIX && !EXTERNAL_LIBC)
107	select STATS
108	select STATS_NAMES
109	help
110	  Enable Simulated EEPROM driver.
111
112config EEPROM_SIMULATOR_SIMULATE_TIMING
113	bool "Hardware timing simulation"
114	depends on EEPROM_SIMULATOR
115	help
116	  Enable Simulated hardware timing.
117
118if EEPROM_SIMULATOR_SIMULATE_TIMING
119
120config EEPROM_SIMULATOR_MIN_READ_TIME_US
121	int
122	prompt "Minimum read time (µS)"
123	default 2
124	range 1 1000000
125
126config EEPROM_SIMULATOR_MIN_WRITE_TIME_US
127	int
128	prompt "Minimum write time (µS)"
129	default 100
130	range 1 1000000
131
132endif # EEPROM_SIMULATOR_SIMULATE_TIMING
133
134config EEPROM_FAKE
135	bool "Fake EEPROM driver"
136	default y
137	depends on DT_HAS_ZEPHYR_FAKE_EEPROM_ENABLED
138	help
139	  Enable support for the FFF-based fake EEPROM driver.
140
141endif # EEPROM
142