blob: e43566bc56db6baaec5c3324319a5d6d4919a083 [file] [log] [blame]
wdenk38635852002-08-27 05:55:31 +00001/*
2 * (C) Copyright 2000, 2001
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk38635852002-08-27 05:55:31 +00006 */
7
d4f5c722005-08-12 21:16:13 +02008/*
9 * Support for read and write access to EEPROM like memory devices. This
10 * includes regular EEPROM as well as FRAM (ferroelectic nonvolaile RAM).
11 * FRAM devices read and write data at bus speed. In particular, there is no
Peter Meerwalde506a002012-02-08 05:31:53 +000012 * write delay. Also, there is no limit imposed on the number of bytes that can
d4f5c722005-08-12 21:16:13 +020013 * be transferred with a single read or write.
Wolfgang Denk6617aae2005-08-19 00:46:54 +020014 *
d4f5c722005-08-12 21:16:13 +020015 * Use the following configuration options to ensure no unneeded performance
16 * degradation (typical for EEPROM) is incured for FRAM memory:
Wolfgang Denk6617aae2005-08-19 00:46:54 +020017 *
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020018 * #define CONFIG_SYS_I2C_FRAM
19 * #undef CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS
d4f5c722005-08-12 21:16:13 +020020 *
21 */
22
wdenk38635852002-08-27 05:55:31 +000023#include <common.h>
24#include <config.h>
25#include <command.h>
26#include <i2c.h>
Nikita Kiryanove7c27292016-04-16 17:55:12 +030027#include <eeprom_layout.h>
wdenk38635852002-08-27 05:55:31 +000028
Marek Vasut4f296d02015-11-10 20:53:18 +010029#ifndef CONFIG_SYS_I2C_SPEED
30#define CONFIG_SYS_I2C_SPEED 50000
Stefan Roese98f4a3d2005-09-22 09:04:17 +020031#endif
wdenk38635852002-08-27 05:55:31 +000032
Marek Vasutd7387462015-11-10 20:53:26 +010033#ifndef CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS
34#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 0
35#endif
36
Marek Vasut6717e3c2015-11-10 20:53:28 +010037#ifndef CONFIG_SYS_EEPROM_PAGE_WRITE_BITS
38#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 8
39#endif
40
Mario Sixa6e7b772016-04-20 10:44:52 +020041#ifndef I2C_RXTX_LEN
42#define I2C_RXTX_LEN 128
43#endif
44
Marek Vasut6717e3c2015-11-10 20:53:28 +010045#define EEPROM_PAGE_SIZE (1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS)
46#define EEPROM_PAGE_OFFSET(x) ((x) & (EEPROM_PAGE_SIZE - 1))
47
Marek Vasut4f296d02015-11-10 20:53:18 +010048/*
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020049 * for CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 2 (16-bit EEPROM address) offset is
wdenk38635852002-08-27 05:55:31 +000050 * 0x000nxxxx for EEPROM address selectors at n, offset xxxx in EEPROM.
51 *
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020052 * for CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 1 (8-bit EEPROM page address) offset is
wdenk38635852002-08-27 05:55:31 +000053 * 0x00000nxx for EEPROM address selectors and page number at n.
54 */
Heiko Schocher548738b2010-01-07 08:55:40 +010055#if !defined(CONFIG_SPI) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
Marek Vasut4f296d02015-11-10 20:53:18 +010056#if !defined(CONFIG_SYS_I2C_EEPROM_ADDR_LEN) || \
Marek Vasutd4e69e62015-11-10 20:53:33 +010057 (CONFIG_SYS_I2C_EEPROM_ADDR_LEN < 1) || \
58 (CONFIG_SYS_I2C_EEPROM_ADDR_LEN > 2)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020059#error CONFIG_SYS_I2C_EEPROM_ADDR_LEN must be 1 or 2
wdenk38635852002-08-27 05:55:31 +000060#endif
61#endif
62
Marek Vasut52cd47c2015-11-10 20:53:25 +010063__weak int eeprom_write_enable(unsigned dev_addr, int state)
64{
65 return 0;
66}
Marek Vasut4f296d02015-11-10 20:53:18 +010067
Marek Vasut354e3ed2015-11-10 20:53:31 +010068void eeprom_init(int bus)
Marek Vasut4f296d02015-11-10 20:53:18 +010069{
70 /* SPI EEPROM */
71#if defined(CONFIG_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
Marek Vasut8eee40a2015-11-10 20:53:27 +010072 spi_init_f();
Marek Vasut4f296d02015-11-10 20:53:18 +010073#endif
74
75 /* I2C EEPROM */
Marek Vasut354e3ed2015-11-10 20:53:31 +010076#if defined(CONFIG_SYS_I2C)
77 if (bus >= 0)
78 i2c_set_bus_num(bus);
Marek Vasut4f296d02015-11-10 20:53:18 +010079 i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
80#endif
81}
82
Marek Vasut02c321c2015-11-10 20:53:24 +010083static int eeprom_addr(unsigned dev_addr, unsigned offset, uchar *addr)
84{
85 unsigned blk_off;
86 int alen;
87
88 blk_off = offset & 0xff; /* block offset */
89#if CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 1
90 addr[0] = offset >> 8; /* block number */
91 addr[1] = blk_off; /* block offset */
92 alen = 2;
93#else
94 addr[0] = offset >> 16; /* block number */
95 addr[1] = offset >> 8; /* upper address octet */
96 addr[2] = blk_off; /* lower address octet */
97 alen = 3;
98#endif /* CONFIG_SYS_I2C_EEPROM_ADDR_LEN */
99
100 addr[0] |= dev_addr; /* insert device address */
101
102 return alen;
103}
104
Marek Vasut39b6f982015-11-10 20:53:29 +0100105static int eeprom_len(unsigned offset, unsigned end)
106{
107 unsigned len = end - offset;
108
109 /*
110 * For a FRAM device there is no limit on the number of the
111 * bytes that can be ccessed with the single read or write
112 * operation.
113 */
114#if !defined(CONFIG_SYS_I2C_FRAM)
115 unsigned blk_off = offset & 0xff;
116 unsigned maxlen = EEPROM_PAGE_SIZE - EEPROM_PAGE_OFFSET(blk_off);
117
118 if (maxlen > I2C_RXTX_LEN)
119 maxlen = I2C_RXTX_LEN;
120
121 if (len > maxlen)
122 len = maxlen;
123#endif
124
125 return len;
126}
127
Marek Vasut91320882015-11-10 20:53:23 +0100128static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen,
129 uchar *buffer, unsigned len, bool read)
130{
131 int ret = 0;
132
133 /* SPI */
134#if defined(CONFIG_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
135 if (read)
136 spi_read(addr, alen, buffer, len);
137 else
138 spi_write(addr, alen, buffer, len);
139#else /* I2C */
140
141#if defined(CONFIG_SYS_I2C_EEPROM_BUS)
142 i2c_set_bus_num(CONFIG_SYS_I2C_EEPROM_BUS);
143#endif
144
145 if (read)
146 ret = i2c_read(addr[0], offset, alen - 1, buffer, len);
147 else
148 ret = i2c_write(addr[0], offset, alen - 1, buffer, len);
149
150 if (ret)
151 ret = 1;
152#endif
153 return ret;
154}
155
Marek Vasut1a378892015-11-10 20:53:30 +0100156static int eeprom_rw(unsigned dev_addr, unsigned offset, uchar *buffer,
157 unsigned cnt, bool read)
wdenk38635852002-08-27 05:55:31 +0000158{
159 unsigned end = offset + cnt;
Marek Vasut1a378892015-11-10 20:53:30 +0100160 unsigned alen, len;
wdenk38635852002-08-27 05:55:31 +0000161 int rcode = 0;
Marek Vasut02c321c2015-11-10 20:53:24 +0100162 uchar addr[3];
wdenk38635852002-08-27 05:55:31 +0000163
wdenk38635852002-08-27 05:55:31 +0000164 while (offset < end) {
Marek Vasut02c321c2015-11-10 20:53:24 +0100165 alen = eeprom_addr(dev_addr, offset, addr);
wdenk38635852002-08-27 05:55:31 +0000166
Marek Vasut39b6f982015-11-10 20:53:29 +0100167 len = eeprom_len(offset, end);
d4f5c722005-08-12 21:16:13 +0200168
Marek Vasut1a378892015-11-10 20:53:30 +0100169 rcode = eeprom_rw_block(offset, addr, alen, buffer, len, read);
Marek Vasut91320882015-11-10 20:53:23 +0100170
wdenk38635852002-08-27 05:55:31 +0000171 buffer += len;
172 offset += len;
Marek Vasut1a378892015-11-10 20:53:30 +0100173
174 if (!read)
175 udelay(CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS * 1000);
wdenk38635852002-08-27 05:55:31 +0000176 }
d4f5c722005-08-12 21:16:13 +0200177
wdenk38635852002-08-27 05:55:31 +0000178 return rcode;
179}
180
Marek Vasut1a378892015-11-10 20:53:30 +0100181int eeprom_read(unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt)
wdenk38635852002-08-27 05:55:31 +0000182{
Marek Vasut1a378892015-11-10 20:53:30 +0100183 /*
184 * Read data until done or would cross a page boundary.
185 * We must write the address again when changing pages
186 * because the next page may be in a different device.
187 */
188 return eeprom_rw(dev_addr, offset, buffer, cnt, 1);
189}
190
Marek Vasutd4e69e62015-11-10 20:53:33 +0100191int eeprom_write(unsigned dev_addr, unsigned offset,
192 uchar *buffer, unsigned cnt)
Marek Vasut1a378892015-11-10 20:53:30 +0100193{
194 int ret;
wdenk38635852002-08-27 05:55:31 +0000195
Marek Vasut52cd47c2015-11-10 20:53:25 +0100196 eeprom_write_enable(dev_addr, 1);
197
Marek Vasut4f296d02015-11-10 20:53:18 +0100198 /*
199 * Write data until done or would cross a write page boundary.
wdenk38635852002-08-27 05:55:31 +0000200 * We must write the address again when changing pages
201 * because the address counter only increments within a page.
202 */
Alexey Brodkin52bc7c72015-12-14 18:45:34 +0300203 ret = eeprom_rw(dev_addr, offset, buffer, cnt, 0);
Marek Vasut52cd47c2015-11-10 20:53:25 +0100204
205 eeprom_write_enable(dev_addr, 0);
Marek Vasut1a378892015-11-10 20:53:30 +0100206 return ret;
wdenk38635852002-08-27 05:55:31 +0000207}
208
Nikita Kiryanovc40f0372016-04-16 17:55:11 +0300209static int parse_numeric_param(char *str)
210{
211 char *endptr;
212 int value = simple_strtol(str, &endptr, 16);
213
214 return (*endptr != '\0') ? -1 : value;
215}
216
217/**
218 * parse_i2c_bus_addr - parse the i2c bus and i2c devaddr parameters
219 *
220 * @i2c_bus: address to store the i2c bus
221 * @i2c_addr: address to store the device i2c address
222 * @argc: count of command line arguments left to parse
223 * @argv: command line arguments left to parse
224 * @argc_no_bus_addr: argc value we expect to see when bus & addr aren't given
225 *
226 * @returns: number of arguments parsed or CMD_RET_USAGE if error
227 */
228static int parse_i2c_bus_addr(int *i2c_bus, ulong *i2c_addr, int argc,
229 char * const argv[], int argc_no_bus_addr)
230{
231 int argc_no_bus = argc_no_bus_addr + 1;
232 int argc_bus_addr = argc_no_bus_addr + 2;
233
234#ifdef CONFIG_SYS_DEF_EEPROM_ADDR
235 if (argc == argc_no_bus_addr) {
236 *i2c_bus = -1;
237 *i2c_addr = CONFIG_SYS_DEF_EEPROM_ADDR;
238
239 return 0;
240 }
241#endif
242 if (argc == argc_no_bus) {
243 *i2c_bus = -1;
244 *i2c_addr = parse_numeric_param(argv[0]);
245
246 return 1;
247 }
248
249 if (argc == argc_bus_addr) {
250 *i2c_bus = parse_numeric_param(argv[0]);
251 *i2c_addr = parse_numeric_param(argv[1]);
252
253 return 2;
254 }
255
256 return CMD_RET_USAGE;
257}
258
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300259#ifdef CONFIG_CMD_EEPROM_LAYOUT
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300260
261__weak int eeprom_parse_layout_version(char *str)
262{
263 return LAYOUT_VERSION_UNRECOGNIZED;
264}
265
266static unsigned char eeprom_buf[CONFIG_SYS_EEPROM_SIZE];
267
268#ifndef CONFIG_EEPROM_LAYOUT_HELP_STRING
269#define CONFIG_EEPROM_LAYOUT_HELP_STRING "<not defined>"
270#endif
271
Nikita Kiryanove7c27292016-04-16 17:55:12 +0300272#endif
273
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300274enum eeprom_action {
Nikita Kiryanove7c27292016-04-16 17:55:12 +0300275 EEPROM_READ,
276 EEPROM_WRITE,
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300277 EEPROM_PRINT,
278 EEPROM_UPDATE,
279 EEPROM_ACTION_INVALID,
280};
281
282static enum eeprom_action parse_action(char *cmd)
283{
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300284 if (!strncmp(cmd, "read", 4))
285 return EEPROM_READ;
286 if (!strncmp(cmd, "write", 5))
287 return EEPROM_WRITE;
288#ifdef CONFIG_CMD_EEPROM_LAYOUT
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300289 if (!strncmp(cmd, "print", 5))
290 return EEPROM_PRINT;
291 if (!strncmp(cmd, "update", 6))
292 return EEPROM_UPDATE;
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300293#endif
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300294
295 return EEPROM_ACTION_INVALID;
296}
297
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300298static int eeprom_execute_command(enum eeprom_action action, int i2c_bus,
Nikita Kiryanove7c27292016-04-16 17:55:12 +0300299 ulong i2c_addr, int layout_ver, char *key,
300 char *value, ulong addr, ulong off, ulong cnt)
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300301{
Nikita Kiryanove7c27292016-04-16 17:55:12 +0300302 int rcode = 0;
303 const char *const fmt =
304 "\nEEPROM @0x%lX %s: addr %08lx off %04lx count %ld ... ";
305#ifdef CONFIG_CMD_EEPROM_LAYOUT
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300306 struct eeprom_layout layout;
Nikita Kiryanove7c27292016-04-16 17:55:12 +0300307#endif
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300308
309 if (action == EEPROM_ACTION_INVALID)
310 return CMD_RET_USAGE;
311
312 eeprom_init(i2c_bus);
Nikita Kiryanove7c27292016-04-16 17:55:12 +0300313 if (action == EEPROM_READ) {
314 printf(fmt, i2c_addr, "read", addr, off, cnt);
315
316 rcode = eeprom_read(i2c_addr, off, (uchar *)addr, cnt);
317
318 puts("done\n");
319 return rcode;
320 } else if (action == EEPROM_WRITE) {
321 printf(fmt, i2c_addr, "write", addr, off, cnt);
322
323 rcode = eeprom_write(i2c_addr, off, (uchar *)addr, cnt);
324
325 puts("done\n");
326 return rcode;
327 }
328
329#ifdef CONFIG_CMD_EEPROM_LAYOUT
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300330 rcode = eeprom_read(i2c_addr, 0, eeprom_buf, CONFIG_SYS_EEPROM_SIZE);
331 if (rcode < 0)
332 return rcode;
333
334 eeprom_layout_setup(&layout, eeprom_buf, CONFIG_SYS_EEPROM_SIZE,
335 layout_ver);
336
337 if (action == EEPROM_PRINT) {
338 layout.print(&layout);
339 return 0;
340 }
341
342 layout.update(&layout, key, value);
343
344 rcode = eeprom_write(i2c_addr, 0, layout.data, CONFIG_SYS_EEPROM_SIZE);
Nikita Kiryanove7c27292016-04-16 17:55:12 +0300345#endif
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300346
347 return rcode;
348}
349
350#define NEXT_PARAM(argc, index) { (argc)--; (index)++; }
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300351int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300352{
353 int layout_ver = LAYOUT_VERSION_AUTODETECT;
354 enum eeprom_action action = EEPROM_ACTION_INVALID;
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300355 int i2c_bus = -1, index = 0;
356 ulong i2c_addr = -1, addr = 0, cnt = 0, off = 0;
357 int ret;
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300358 char *field_name = "";
359 char *field_value = "";
360
361 if (argc <= 1)
362 return CMD_RET_USAGE;
363
364 NEXT_PARAM(argc, index); /* Skip program name */
365
366 action = parse_action(argv[index]);
367 NEXT_PARAM(argc, index);
368
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300369 if (action == EEPROM_ACTION_INVALID)
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300370 return CMD_RET_USAGE;
371
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300372#ifdef CONFIG_CMD_EEPROM_LAYOUT
373 if (action == EEPROM_PRINT || action == EEPROM_UPDATE) {
374 if (!strcmp(argv[index], "-l")) {
375 NEXT_PARAM(argc, index);
376 layout_ver = eeprom_parse_layout_version(argv[index]);
377 NEXT_PARAM(argc, index);
378 }
379 }
380#endif
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300381
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300382 switch (action) {
383 case EEPROM_READ:
384 case EEPROM_WRITE:
385 ret = parse_i2c_bus_addr(&i2c_bus, &i2c_addr, argc,
386 argv + index, 3);
387 break;
388 case EEPROM_PRINT:
389 ret = parse_i2c_bus_addr(&i2c_bus, &i2c_addr, argc,
390 argv + index, 0);
391 break;
392 case EEPROM_UPDATE:
393 ret = parse_i2c_bus_addr(&i2c_bus, &i2c_addr, argc,
394 argv + index, 2);
395 break;
396 default:
397 /* Get compiler to stop whining */
398 return CMD_RET_USAGE;
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300399 }
400
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300401 if (ret == CMD_RET_USAGE)
402 return ret;
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300403
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300404 while (ret--)
405 NEXT_PARAM(argc, index);
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300406
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300407 if (action == EEPROM_READ || action == EEPROM_WRITE) {
408 addr = parse_numeric_param(argv[index]);
409 NEXT_PARAM(argc, index);
410 off = parse_numeric_param(argv[index]);
411 NEXT_PARAM(argc, index);
412 cnt = parse_numeric_param(argv[index]);
413 }
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300414
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300415#ifdef CONFIG_CMD_EEPROM_LAYOUT
416 if (action == EEPROM_UPDATE) {
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300417 field_name = argv[index];
418 NEXT_PARAM(argc, index);
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300419 field_value = argv[index];
420 NEXT_PARAM(argc, index);
421 }
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300422#endif
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300423
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300424 return eeprom_execute_command(action, i2c_bus, i2c_addr, layout_ver,
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300425 field_name, field_value, addr, off, cnt);
wdenk38635852002-08-27 05:55:31 +0000426}
Heiko Schocher548738b2010-01-07 08:55:40 +0100427
wdenk0d498392003-07-01 21:06:45 +0000428U_BOOT_CMD(
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300429 eeprom, 8, 1, do_eeprom,
Peter Tyser2fb26042009-01-27 18:03:12 -0600430 "EEPROM sub-system",
Marek Vasutd4fec4e2015-11-10 20:53:32 +0100431 "read <bus> <devaddr> addr off cnt\n"
432 "eeprom write <bus> <devaddr> addr off cnt\n"
Wolfgang Denka89c33d2009-05-24 17:06:54 +0200433 " - read/write `cnt' bytes from `devaddr` EEPROM at offset `off'"
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300434#ifdef CONFIG_CMD_EEPROM_LAYOUT
435 "\n"
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300436 "eeprom print [-l <layout_version>] <bus> <devaddr>\n"
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300437 " - Print layout fields and their data in human readable format\n"
Nikita Kiryanov3dc9be82016-04-16 17:55:13 +0300438 "eeprom update [-l <layout_version>] <bus> <devaddr> field_name field_value\n"
Nikita Kiryanovaa9e6042016-04-16 17:55:03 +0300439 " - Update a specific eeprom field with new data.\n"
440 " The new data must be written in the same human readable format as shown by the print command.\n"
441 "\n"
442 "LAYOUT VERSIONS\n"
443 "The -l option can be used to force the command to interpret the EEPROM data using the chosen layout.\n"
444 "If the -l option is omitted, the command will auto detect the layout based on the data in the EEPROM.\n"
445 "The values which can be provided with the -l option are:\n"
446 CONFIG_EEPROM_LAYOUT_HELP_STRING"\n"
447#endif
Jeroen Hofstee0e350f82014-06-23 00:22:08 +0200448)