3 * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 * I2C Functions similar to the standard memory functions.
27 * There are several parameters in many of the commands that bear further
30 * Two of the commands (imm and imw) take a byte/word/long modifier
31 * (e.g. imm.w specifies the word-length modifier). This was done to
32 * allow manipulating word-length registers. It was not done on any other
33 * commands because it was not deemed useful.
35 * {i2c_chip} is the I2C chip address (the first byte sent on the bus).
36 * Each I2C chip on the bus has a unique address. On the I2C data bus,
37 * the address is the upper seven bits and the LSB is the "read/write"
38 * bit. Note that the {i2c_chip} address specified on the command
39 * line is not shifted up: e.g. a typical EEPROM memory chip may have
40 * an I2C address of 0x50, but the data put on the bus will be 0xA0
41 * for write and 0xA1 for read. This "non shifted" address notation
42 * matches at least half of the data sheets :-/.
44 * {addr} is the address (or offset) within the chip. Small memory
45 * chips have 8 bit addresses. Large memory chips have 16 bit
46 * addresses. Other memory chips have 9, 10, or 11 bit addresses.
47 * Many non-memory chips have multiple registers and {addr} is used
48 * as the register index. Some non-memory chips have only one register
49 * and therefore don't need any {addr} parameter.
51 * The default {addr} parameter is one byte (.1) which works well for
52 * memories and registers with 8 bits of address space.
54 * You can specify the length of the {addr} field with the optional .0,
55 * .1, or .2 modifier (similar to the .b, .w, .l modifier). If you are
56 * manipulating a single register device which doesn't use an address
57 * field, use "0.0" for the address and the ".0" length field will
58 * suppress the address in the I2C data stream. This also works for
59 * successive reads using the I2C auto-incrementing memory pointer.
61 * If you are manipulating a large memory with 2-byte addresses, use
62 * the .2 address modifier, e.g. 210.2 addresses location 528 (decimal).
64 * Then there are the unfortunate memory chips that spill the most
65 * significant 1, 2, or 3 bits of address into the chip address byte.
66 * This effectively makes one chip (logically) look like 2, 4, or
67 * 8 chips. This is handled (awkwardly) by #defining
68 * CFG_I2C_EEPROM_ADDR_OVERFLOW and using the .1 modifier on the
69 * {addr} field (since .1 is the default, it doesn't actually have to
70 * be specified). Examples: given a memory chip at I2C chip address
71 * 0x50, the following would happen...
72 * imd 50 0 10 display 16 bytes starting at 0x000
73 * On the bus: <S> A0 00 <E> <S> A1 <rd> ... <rd>
74 * imd 50 100 10 display 16 bytes starting at 0x100
75 * On the bus: <S> A2 00 <E> <S> A3 <rd> ... <rd>
76 * imd 50 210 10 display 16 bytes starting at 0x210
77 * On the bus: <S> A4 10 <E> <S> A5 <rd> ... <rd>
78 * This is awfully ugly. It would be nice if someone would think up
79 * a better way of handling this.
81 * Adapted from cmd_mem.c which is copyright Wolfgang Denk (wd@denx.de).
87 #include <asm/byteorder.h>
89 #if (CONFIG_COMMANDS & CFG_CMD_I2C)
92 /* Display values from last command.
93 * Memory modify remembered values are different from display memory.
95 static uchar i2c_dp_last_chip;
96 static uint i2c_dp_last_addr;
97 static uint i2c_dp_last_alen;
98 static uint i2c_dp_last_length = 0x10;
100 static uchar i2c_mm_last_chip;
101 static uint i2c_mm_last_addr;
102 static uint i2c_mm_last_alen;
104 #if defined(CFG_I2C_NOPROBES)
105 static uchar i2c_no_probes[] = CFG_I2C_NOPROBES;
109 mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]);
110 extern int cmd_get_data_size(char* arg, int default_size);
114 * imd {i2c_chip} {addr}{.0, .1, .2} {len}
116 #define DISP_LINE_LEN 16
118 int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
121 uint addr, alen, length;
122 int j, nbytes, linebytes;
124 /* We use the last specified parameters, unless new ones are
127 chip = i2c_dp_last_chip;
128 addr = i2c_dp_last_addr;
129 alen = i2c_dp_last_alen;
130 length = i2c_dp_last_length;
133 printf ("Usage:\n%s\n", cmdtp->usage);
137 if ((flag & CMD_FLAG_REPEAT) == 0) {
139 * New command specified.
146 chip = simple_strtoul(argv[1], NULL, 16);
149 * I2C data address within the chip. This can be 1 or
150 * 2 bytes long. Some day it might be 3 bytes long :-).
152 addr = simple_strtoul(argv[2], NULL, 16);
154 for(j = 0; j < 8; j++) {
155 if (argv[2][j] == '.') {
156 alen = argv[2][j+1] - '0';
158 printf ("Usage:\n%s\n", cmdtp->usage);
162 } else if (argv[2][j] == '\0') {
168 * If another parameter, it is the length to display.
169 * Length is the number of objects, not number of bytes.
172 length = simple_strtoul(argv[3], NULL, 16);
178 * We buffer all read data, so we can make sure data is read only
183 unsigned char linebuf[DISP_LINE_LEN];
186 linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes;
188 if(i2c_read(chip, addr, alen, linebuf, linebytes) != 0) {
189 puts ("Error reading the chip.\n");
191 printf("%04x:", addr);
193 for (j=0; j<linebytes; j++) {
194 printf(" %02x", *cp++);
199 for (j=0; j<linebytes; j++) {
200 if ((*cp < 0x20) || (*cp > 0x7e))
209 } while (nbytes > 0);
211 i2c_dp_last_chip = chip;
212 i2c_dp_last_addr = addr;
213 i2c_dp_last_alen = alen;
214 i2c_dp_last_length = length;
219 int do_i2c_mm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
221 return mod_i2c_mem (cmdtp, 1, flag, argc, argv);
225 int do_i2c_nm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
227 return mod_i2c_mem (cmdtp, 0, flag, argc, argv);
230 /* Write (fill) memory
233 * imw {i2c_chip} {addr}{.0, .1, .2} {data} [{count}]
235 int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
244 if ((argc < 4) || (argc > 5)) {
245 printf ("Usage:\n%s\n", cmdtp->usage);
250 * Chip is always specified.
252 chip = simple_strtoul(argv[1], NULL, 16);
255 * Address is always specified.
257 addr = simple_strtoul(argv[2], NULL, 16);
259 for(j = 0; j < 8; j++) {
260 if (argv[2][j] == '.') {
261 alen = argv[2][j+1] - '0';
263 printf ("Usage:\n%s\n", cmdtp->usage);
267 } else if (argv[2][j] == '\0') {
273 * Value to write is always specified.
275 byte = simple_strtoul(argv[3], NULL, 16);
281 count = simple_strtoul(argv[4], NULL, 16);
286 while (count-- > 0) {
287 if(i2c_write(chip, addr++, alen, &byte, 1) != 0) {
288 puts ("Error writing the chip.\n");
291 * Wait for the write to complete. The write can take
292 * up to 10mSec (we allow a little more time).
294 * On some chips, while the write is in progress, the
295 * chip doesn't respond. This apparently isn't a
296 * universal feature so we don't take advantage of it.
300 for(timeout = 0; timeout < 10; timeout++) {
302 if(i2c_probe(chip) == 0)
312 /* Calculate a CRC on memory
315 * icrc32 {i2c_chip} {addr}{.0, .1, .2} {count}
317 int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
329 printf ("Usage:\n%s\n", cmdtp->usage);
334 * Chip is always specified.
336 chip = simple_strtoul(argv[1], NULL, 16);
339 * Address is always specified.
341 addr = simple_strtoul(argv[2], NULL, 16);
343 for(j = 0; j < 8; j++) {
344 if (argv[2][j] == '.') {
345 alen = argv[2][j+1] - '0';
347 printf ("Usage:\n%s\n", cmdtp->usage);
351 } else if (argv[2][j] == '\0') {
357 * Count is always specified
359 count = simple_strtoul(argv[3], NULL, 16);
361 printf ("CRC32 for %08lx ... %08lx ==> ", addr, addr + count - 1);
363 * CRC a byte at a time. This is going to be slooow, but hey, the
364 * memories are small and slow too so hopefully nobody notices.
369 if(i2c_read(chip, addr, alen, &byte, 1) != 0) {
372 crc = crc32 (crc, &byte, 1);
377 puts ("Error reading the chip,\n");
379 printf ("%08lx\n", crc);
389 * imm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2}
390 * inm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2}
394 mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
403 extern char console_buffer[];
406 printf ("Usage:\n%s\n", cmdtp->usage);
410 #ifdef CONFIG_BOOT_RETRY_TIME
411 reset_cmd_timeout(); /* got a good command to get here */
414 * We use the last specified parameters, unless new ones are
417 chip = i2c_mm_last_chip;
418 addr = i2c_mm_last_addr;
419 alen = i2c_mm_last_alen;
421 if ((flag & CMD_FLAG_REPEAT) == 0) {
423 * New command specified. Check for a size specification.
424 * Defaults to byte if no or incorrect specification.
426 size = cmd_get_data_size(argv[0], 1);
429 * Chip is always specified.
431 chip = simple_strtoul(argv[1], NULL, 16);
434 * Address is always specified.
436 addr = simple_strtoul(argv[2], NULL, 16);
438 for(j = 0; j < 8; j++) {
439 if (argv[2][j] == '.') {
440 alen = argv[2][j+1] - '0';
442 printf ("Usage:\n%s\n", cmdtp->usage);
446 } else if (argv[2][j] == '\0') {
453 * Print the address, followed by value. Then accept input for
454 * the next value. A non-converted value exits.
457 printf("%08lx:", addr);
458 if(i2c_read(chip, addr, alen, (char *)&data, size) != 0) {
459 puts ("\nError reading the chip,\n");
461 data = cpu_to_be32(data);
463 printf(" %02lx", (data >> 24) & 0x000000FF);
464 } else if(size == 2) {
465 printf(" %04lx", (data >> 16) & 0x0000FFFF);
467 printf(" %08lx", data);
471 nbytes = readline (" ? ");
474 * <CR> pressed as only input, don't modify current
475 * location and move to next.
480 #ifdef CONFIG_BOOT_RETRY_TIME
481 reset_cmd_timeout(); /* good enough to not time out */
484 #ifdef CONFIG_BOOT_RETRY_TIME
485 else if (nbytes == -2) {
486 break; /* timed out, exit the command */
492 data = simple_strtoul(console_buffer, &endp, 16);
495 } else if(size == 2) {
498 data = be32_to_cpu(data);
499 nbytes = endp - console_buffer;
501 #ifdef CONFIG_BOOT_RETRY_TIME
503 * good enough to not time out
507 if(i2c_write(chip, addr, alen, (char *)&data, size) != 0) {
508 puts ("Error writing the chip.\n");
510 #ifdef CFG_EEPROM_PAGE_WRITE_DELAY_MS
511 udelay(CFG_EEPROM_PAGE_WRITE_DELAY_MS * 1000);
519 chip = i2c_mm_last_chip;
520 addr = i2c_mm_last_addr;
521 alen = i2c_mm_last_alen;
528 * iprobe {addr}{.0, .1, .2}
530 int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
533 #if defined(CFG_I2C_NOPROBES)
537 puts ("Valid chip addresses:");
538 for(j = 0; j < 128; j++) {
539 #if defined(CFG_I2C_NOPROBES)
541 for (k = 0; k < sizeof(i2c_no_probes); k++){
542 if (j == i2c_no_probes[k]){
550 if(i2c_probe(j) == 0) {
556 #if defined(CFG_I2C_NOPROBES)
557 puts ("Excluded chip addresses:");
558 for( k = 0; k < sizeof(i2c_no_probes); k++ )
559 printf(" %02X", i2c_no_probes[k] );
569 * iloop {i2c_chip} {addr}{.0, .1, .2} [{length}] [{delay}]
570 * {length} - Number of bytes to read
571 * {delay} - A DECIMAL number and defaults to 1000 uSec
573 int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
584 printf ("Usage:\n%s\n", cmdtp->usage);
589 * Chip is always specified.
591 chip = simple_strtoul(argv[1], NULL, 16);
594 * Address is always specified.
596 addr = simple_strtoul(argv[2], NULL, 16);
598 for(j = 0; j < 8; j++) {
599 if (argv[2][j] == '.') {
600 alen = argv[2][j+1] - '0';
602 printf ("Usage:\n%s\n", cmdtp->usage);
606 } else if (argv[2][j] == '\0') {
612 * Length is the number of objects, not number of bytes.
615 length = simple_strtoul(argv[3], NULL, 16);
616 if(length > sizeof(bytes)) {
617 length = sizeof(bytes);
621 * The delay time (uSec) is optional.
625 delay = simple_strtoul(argv[4], NULL, 10);
631 if(i2c_read(chip, addr, alen, bytes, length) != 0) {
632 puts ("Error reading the chip.\n");
643 * The SDRAM command is separately configured because many
644 * (most?) embedded boards don't use SDRAM DIMMs.
646 #if (CONFIG_COMMANDS & CFG_CMD_SDRAM)
652 int do_sdram ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
660 printf ("Usage:\n%s\n", cmdtp->usage);
664 * Chip is always specified.
666 chip = simple_strtoul(argv[1], NULL, 16);
668 if(i2c_read(chip, 0, 1, data, sizeof(data)) != 0) {
669 puts ("No SDRAM Serial Presence Detect found.\n");
674 for (j = 0; j < 63; j++) {
677 if(cksum != data[63]) {
678 printf ("WARNING: Configuration data checksum failure:\n"
679 " is 0x%02x, calculated 0x%02x\n",
682 printf("SPD data revision %d.%d\n",
683 (data[62] >> 4) & 0x0F, data[62] & 0x0F);
684 printf("Bytes used 0x%02X\n", data[0]);
685 printf("Serial memory size 0x%02X\n", 1 << data[1]);
686 puts ("Memory type ");
688 case 2: puts ("EDO\n"); break;
689 case 4: puts ("SDRAM\n"); break;
690 default: puts ("unknown\n"); break;
692 puts ("Row address bits ");
693 if((data[3] & 0x00F0) == 0) {
694 printf("%d\n", data[3] & 0x0F);
696 printf("%d/%d\n", data[3] & 0x0F, (data[3] >> 4) & 0x0F);
698 puts ("Column address bits ");
699 if((data[4] & 0x00F0) == 0) {
700 printf("%d\n", data[4] & 0x0F);
702 printf("%d/%d\n", data[4] & 0x0F, (data[4] >> 4) & 0x0F);
704 printf("Module rows %d\n", data[5]);
705 printf("Module data width %d bits\n", (data[7] << 8) | data[6]);
706 puts ("Interface signal levels ");
708 case 0: puts ("5.0v/TTL\n"); break;
709 case 1: puts ("LVTTL\n"); break;
710 case 2: puts ("HSTL 1.5\n"); break;
711 case 3: puts ("SSTL 3.3\n"); break;
712 case 4: puts ("SSTL 2.5\n"); break;
713 default: puts ("unknown\n"); break;
715 printf("SDRAM cycle time %d.%d nS\n",
716 (data[9] >> 4) & 0x0F, data[9] & 0x0F);
717 printf("SDRAM access time %d.%d nS\n",
718 (data[10] >> 4) & 0x0F, data[10] & 0x0F);
719 puts ("EDC configuration ");
721 case 0: puts ("None\n"); break;
722 case 1: puts ("Parity\n"); break;
723 case 2: puts ("ECC\n"); break;
724 default: puts ("unknown\n"); break;
726 if((data[12] & 0x80) == 0) {
727 puts ("No self refresh, rate ");
729 puts ("Self refresh, rate ");
731 switch(data[12] & 0x7F) {
732 case 0: puts ("15.625uS\n"); break;
733 case 1: puts ("3.9uS\n"); break;
734 case 2: puts ("7.8uS\n"); break;
735 case 3: puts ("31.3uS\n"); break;
736 case 4: puts ("62.5uS\n"); break;
737 case 5: puts ("125uS\n"); break;
738 default: puts ("unknown\n"); break;
740 printf("SDRAM width (primary) %d\n", data[13] & 0x7F);
741 if((data[13] & 0x80) != 0) {
742 printf(" (second bank) %d\n",
743 2 * (data[13] & 0x7F));
746 printf("EDC width %d\n",
748 if((data[14] & 0x80) != 0) {
749 printf(" (second bank) %d\n",
750 2 * (data[14] & 0x7F));
753 printf("Min clock delay, back-to-back random column addresses %d\n",
755 puts ("Burst length(s) ");
756 if (data[16] & 0x80) puts (" Page");
757 if (data[16] & 0x08) puts (" 8");
758 if (data[16] & 0x04) puts (" 4");
759 if (data[16] & 0x02) puts (" 2");
760 if (data[16] & 0x01) puts (" 1");
762 printf("Number of banks %d\n", data[17]);
763 puts ("CAS latency(s) ");
764 if (data[18] & 0x80) puts (" TBD");
765 if (data[18] & 0x40) puts (" 7");
766 if (data[18] & 0x20) puts (" 6");
767 if (data[18] & 0x10) puts (" 5");
768 if (data[18] & 0x08) puts (" 4");
769 if (data[18] & 0x04) puts (" 3");
770 if (data[18] & 0x02) puts (" 2");
771 if (data[18] & 0x01) puts (" 1");
773 puts ("CS latency(s) ");
774 if (data[19] & 0x80) puts (" TBD");
775 if (data[19] & 0x40) puts (" 6");
776 if (data[19] & 0x20) puts (" 5");
777 if (data[19] & 0x10) puts (" 4");
778 if (data[19] & 0x08) puts (" 3");
779 if (data[19] & 0x04) puts (" 2");
780 if (data[19] & 0x02) puts (" 1");
781 if (data[19] & 0x01) puts (" 0");
783 puts ("WE latency(s) ");
784 if (data[20] & 0x80) puts (" TBD");
785 if (data[20] & 0x40) puts (" 6");
786 if (data[20] & 0x20) puts (" 5");
787 if (data[20] & 0x10) puts (" 4");
788 if (data[20] & 0x08) puts (" 3");
789 if (data[20] & 0x04) puts (" 2");
790 if (data[20] & 0x02) puts (" 1");
791 if (data[20] & 0x01) puts (" 0");
793 puts ("Module attributes:\n");
794 if (!data[21]) puts (" (none)\n");
795 if (data[21] & 0x80) puts (" TBD (bit 7)\n");
796 if (data[21] & 0x40) puts (" Redundant row address\n");
797 if (data[21] & 0x20) puts (" Differential clock input\n");
798 if (data[21] & 0x10) puts (" Registerd DQMB inputs\n");
799 if (data[21] & 0x08) puts (" Buffered DQMB inputs\n");
800 if (data[21] & 0x04) puts (" On-card PLL\n");
801 if (data[21] & 0x02) puts (" Registered address/control lines\n");
802 if (data[21] & 0x01) puts (" Buffered address/control lines\n");
803 puts ("Device attributes:\n");
804 if (data[22] & 0x80) puts (" TBD (bit 7)\n");
805 if (data[22] & 0x40) puts (" TBD (bit 6)\n");
806 if (data[22] & 0x20) puts (" Upper Vcc tolerance 5%\n");
807 else puts (" Upper Vcc tolerance 10%\n");
808 if (data[22] & 0x10) puts (" Lower Vcc tolerance 5%\n");
809 else puts (" Lower Vcc tolerance 10%\n");
810 if (data[22] & 0x08) puts (" Supports write1/read burst\n");
811 if (data[22] & 0x04) puts (" Supports precharge all\n");
812 if (data[22] & 0x02) puts (" Supports auto precharge\n");
813 if (data[22] & 0x01) puts (" Supports early RAS# precharge\n");
814 printf("SDRAM cycle time (2nd highest CAS latency) %d.%d nS\n",
815 (data[23] >> 4) & 0x0F, data[23] & 0x0F);
816 printf("SDRAM access from clock (2nd highest CAS latency) %d.%d nS\n",
817 (data[24] >> 4) & 0x0F, data[24] & 0x0F);
818 printf("SDRAM cycle time (3rd highest CAS latency) %d.%d nS\n",
819 (data[25] >> 4) & 0x0F, data[25] & 0x0F);
820 printf("SDRAM access from clock (3rd highest CAS latency) %d.%d nS\n",
821 (data[26] >> 4) & 0x0F, data[26] & 0x0F);
822 printf("Minimum row precharge %d nS\n", data[27]);
823 printf("Row active to row active min %d nS\n", data[28]);
824 printf("RAS to CAS delay min %d nS\n", data[29]);
825 printf("Minimum RAS pulse width %d nS\n", data[30]);
826 puts ("Density of each row ");
827 if (data[31] & 0x80) puts (" 512");
828 if (data[31] & 0x40) puts (" 256");
829 if (data[31] & 0x20) puts (" 128");
830 if (data[31] & 0x10) puts (" 64");
831 if (data[31] & 0x08) puts (" 32");
832 if (data[31] & 0x04) puts (" 16");
833 if (data[31] & 0x02) puts (" 8");
834 if (data[31] & 0x01) puts (" 4");
836 printf("Command and Address setup %c%d.%d nS\n",
837 (data[32] & 0x80) ? '-' : '+',
838 (data[32] >> 4) & 0x07, data[32] & 0x0F);
839 printf("Command and Address hold %c%d.%d nS\n",
840 (data[33] & 0x80) ? '-' : '+',
841 (data[33] >> 4) & 0x07, data[33] & 0x0F);
842 printf("Data signal input setup %c%d.%d nS\n",
843 (data[34] & 0x80) ? '-' : '+',
844 (data[34] >> 4) & 0x07, data[34] & 0x0F);
845 printf("Data signal input hold %c%d.%d nS\n",
846 (data[35] & 0x80) ? '-' : '+',
847 (data[35] >> 4) & 0x07, data[35] & 0x0F);
848 puts ("Manufacturer's JEDEC ID ");
849 for(j = 64; j <= 71; j++)
850 printf("%02X ", data[j]);
852 printf("Manufacturing Location %02X\n", data[72]);
853 puts ("Manufacturer's Part Number ");
854 for(j = 73; j <= 90; j++)
855 printf("%02X ", data[j]);
857 printf("Revision Code %02X %02X\n", data[91], data[92]);
858 printf("Manufacturing Date %02X %02X\n", data[93], data[94]);
859 puts ("Assembly Serial Number ");
860 for(j = 95; j <= 98; j++)
861 printf("%02X ", data[j]);
863 printf("Speed rating PC%d\n",
864 data[126] == 0x66 ? 66 : data[126]);
868 #endif /* CFG_CMD_SDRAM */
871 /***************************************************/
874 imd, 4, 1, do_i2c_md, \
875 "imd - i2c memory display\n", \
876 "chip address[.0, .1, .2] [# of objects]\n - i2c memory display\n" \
880 imm, 3, 1, do_i2c_mm,
881 "imm - i2c memory modify (auto-incrementing)\n",
882 "chip address[.0, .1, .2]\n"
883 " - memory modify, auto increment address\n"
886 inm, 3, 1, do_i2c_nm,
887 "inm - memory modify (constant address)\n",
888 "chip address[.0, .1, .2]\n - memory modify, read and keep address\n"
892 imw, 5, 1, do_i2c_mw,
893 "imw - memory write (fill)\n",
894 "chip address[.0, .1, .2] value [count]\n - memory write (fill)\n"
898 icrc32, 5, 1, do_i2c_crc,
899 "icrc32 - checksum calculation\n",
900 "chip address[.0, .1, .2] count\n - compute CRC32 checksum\n"
904 iprobe, 1, 1, do_i2c_probe,
905 "iprobe - probe to discover valid I2C chip addresses\n",
906 "\n -discover valid I2C chip addresses\n"
910 * Require full name for "iloop" because it is an infinite loop!
913 iloop, 5, 1, do_i2c_loop,
914 "iloop - infinite loop on address range\n",
915 "chip address[.0, .1, .2] [# of objects]\n"
916 " - loop, reading a set of addresses\n"
919 #if (CONFIG_COMMANDS & CFG_CMD_SDRAM)
921 isdram, 2, 1, do_sdram,
922 "isdram - print SDRAM configuration information\n",
923 "chip\n - print SDRAM configuration information\n"
924 " (valid chip values 50..57)\n"
927 #endif /* CFG_CMD_I2C */