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	depends on SHELL
28	help
29	  Enable the EEPROM shell with EEPROM related commands.
30
31config EEPROM_SHELL_BUFFER_SIZE
32	int "EEPROM shell buffer size"
33	default 256
34	depends on EEPROM_SHELL
35	help
36	  Size of the buffer used for EEPROM read/write commands in
37	  the EEPROM shell.
38
39config EEPROM_AT2X
40	bool
41	help
42	  Enable support for Atmel AT2x (and compatible) I2C/SPI
43	  EEPROMs.
44
45config EEPROM_AT2X_EMUL
46	bool "Emulate an Atmel AT24 I2C chip"
47	depends on EMUL
48	help
49	  This is an emulator for the Atmel AT24 series of I2C-attached EEPROMs.
50
51	  At present it only supports 8-bit addressing. The size of the EEPROM
52	  is given by the 'size' property. See the binding for further details.
53
54config EEPROM_AT24
55	bool "I2C EEPROMs compatible with Atmel's AT24 family"
56	default y
57	depends on DT_HAS_ATMEL_AT24_ENABLED
58	select I2C
59	select EEPROM_AT2X
60	help
61	  Enable support for I2C EEPROMs compatible with Atmel's AT24 family.
62
63	  There are multiple vendors manufacturing I2C EEPROMs compatible with
64	  the programming model of the Atmel AT24.
65
66	  Examples of compatible EEPROM families:
67	  - Microchip AT24xxx
68	  - ST M24xxx
69
70config EEPROM_AT25
71	bool "SPI EEPROMs compatibile with Atmel's AT25 family"
72	default y
73	depends on DT_HAS_ATMEL_AT25_ENABLED
74	select SPI
75	select EEPROM_AT2X
76	help
77	  Enable support for SPI EEPROMs compatible with Atmel's AT25 family.
78
79	  There are multiple vendors manufacturing SPI EEPROMs compatible with
80	  the programming model of the Atmel AT25.
81
82	  Examples of compatible EEPROM families:
83	  - Microchip AT25xxx
84	  - ST M95xxx
85
86config EEPROM_AT2X_INIT_PRIORITY
87	int "AT2X EEPROM init priority"
88	default 80
89	depends on EEPROM_AT2X
90	help
91	  AT2X EEPROM driver device initialization priority.
92
93	  The EEPROM is connected to I2C or SPI bus an has to be initialized
94	  after I2C/SPI driver.
95
96source "drivers/eeprom/Kconfig.lpc11u6x"
97source "drivers/eeprom/Kconfig.stm32"
98source "drivers/eeprom/Kconfig.eeprom_emu"
99source "drivers/eeprom/Kconfig.tmp116"
100source "drivers/eeprom/Kconfig.xec"
101source "drivers/eeprom/Kconfig.mb85rcxx"
102source "drivers/eeprom/Kconfig.mb85rsxx"
103
104config EEPROM_SIMULATOR
105	bool "Simulated EEPROM driver"
106	default y
107	depends on DT_HAS_ZEPHYR_SIM_EEPROM_ENABLED
108	select STATS
109	select STATS_NAMES
110	help
111	  Enable Simulated EEPROM driver.
112
113config EEPROM_SIMULATOR_SIMULATE_TIMING
114	bool "Hardware timing simulation"
115	depends on EEPROM_SIMULATOR
116	help
117	  Enable Simulated hardware timing.
118
119if EEPROM_SIMULATOR_SIMULATE_TIMING
120
121config EEPROM_SIMULATOR_MIN_READ_TIME_US
122	int
123	prompt "Minimum read time (µS)"
124	default 2
125	range 1 1000000
126
127config EEPROM_SIMULATOR_MIN_WRITE_TIME_US
128	int
129	prompt "Minimum write time (µS)"
130	default 100
131	range 1 1000000
132
133endif # EEPROM_SIMULATOR_SIMULATE_TIMING
134
135config EEPROM_FAKE
136	bool "Fake EEPROM driver"
137	default y
138	depends on DT_HAS_ZEPHYR_FAKE_EEPROM_ENABLED
139	help
140	  Enable support for the FFF-based fake EEPROM driver.
141
142endif # EEPROM
143