Lines Matching +full:ras +full:- +full:to +full:- +full:cas

1 // SPDX-License-Identifier: GPL-2.0+
13 * I2C Functions similar to the standard memory functions.
25 * matches at least half of the data sheets :-/.
30 * Many non-memory chips have multiple registers and {addr} is used
31 * as the register index. Some non-memory chips have only one register
38 * .1, or .2 modifier (similar to the .b, .w, .l modifier). If you are
42 * successive reads using the I2C auto-incrementing memory pointer.
44 * If you are manipulating a large memory with 2-byte addresses, use
52 * {addr} field (since .1 is the default, it doesn't actually have to
93 /* If only one I2C bus is present, the list of devices to ignore when
95 * When multiple buses are present, the list is an array of bus-address
121 * Default for driver model is to use the chip's existing address length.
122 * For legacy code, this is not stored, so we need to use a suitable
126 #define DEFAULT_ADDR_LEN (-1)
156 return -ENODEV; in i2c_get_cur_bus()
163 return -ENODEV; in i2c_get_cur_bus()
185 * i2c_init_board() - Board-specific I2C bus init
187 * This function is the default no-op implementation of I2C bus
188 * initialization. This function can be overridden by board-specific
196 /* TODO: Implement architecture-specific get/set functions */
199 * i2c_get_bus_speed() - Return I2C bus speed
205 * this function to report the speed correctly. Simple or legacy drivers
212 * TODO: Implement architecture-specific get/set functions
213 * Should go away, if we switched completely to new multibus support
222 * i2c_set_bus_speed() - Configure I2C bus speed
229 * this function to report the speed correctly. Simple or legacy drivers
238 return -1; in i2c_set_bus_speed()
245 * get_alen() - Small parser helper function to get address length
257 alen = arg[j+1] - '0'; in get_alen()
279 * do_i2c_read() - Handle the "i2c read" command-line command
282 * @argc: Command-line argument count
283 * @argv: Array of command-line arguments
312 * 2 bytes long. Some day it might be 3 bytes long :-). in do_i2c_read()
325 * memaddr is the address where to store things in memory in do_i2c_read()
331 if (!ret && alen != -1) in do_i2c_read()
360 * memaddr is the address where to store things in memory in do_i2c_write()
371 * 2 bytes long. Some day it might be 3 bytes long :-). in do_i2c_write()
385 if (!ret && alen != -1) in do_i2c_write()
394 if (argc == 6 && !strcmp(argv[5], "-s")) { in do_i2c_write()
397 * device is an EEPROM, it is your responsibility to not cross in do_i2c_write()
402 i2c_chip->flags &= ~DM_I2C_CHIP_WR_ADDRESS; in do_i2c_write()
411 * Repeated addressing - perform <length> separate in do_i2c_write()
414 while (length-- > 0) { in do_i2c_write()
416 i2c_chip->flags |= DM_I2C_CHIP_WR_ADDRESS; in do_i2c_write()
498 * do_i2c_md() - Handle the "i2c md" command-line command
501 * @argc: Command-line argument count
502 * @argv: Array of command-line arguments
544 * 2 bytes long. Some day it might be 3 bytes long :-). in do_i2c_md()
552 * If another parameter, it is the length to display. in do_i2c_md()
561 if (!ret && alen != -1) in do_i2c_md()
605 nbytes -= linebytes; in do_i2c_md()
617 * do_i2c_mw() - Handle the "i2c mw" command-line command
620 * @argc: Command-line argument count
621 * @argv: Array of command-line arguments
659 if (!ret && alen != -1) in do_i2c_mw()
665 * Value to write is always specified. in do_i2c_mw()
677 while (count-- > 0) { in do_i2c_mw()
686 * Wait for the write to complete. The write can take in do_i2c_mw()
687 * up to 10mSec (we allow a little more time). in do_i2c_mw()
701 * do_i2c_crc() - Handle the "i2c crc32" command-line command
704 * @argc: Command-line argument count
705 * @argv: Array of command-line arguments
747 if (!ret && alen != -1) in do_i2c_crc()
757 printf ("CRC32 for %08lx ... %08lx ==> ", addr, addr + count - 1); in do_i2c_crc()
759 * CRC a byte at a time. This is going to be slooow, but hey, the in do_i2c_crc()
764 while (count-- > 0) { in do_i2c_crc()
784 * mod_i2c_mem() - Handle the "i2c mm" and "i2c nm" command-line command
787 * @argc: Command-line argument count
788 * @argv: Array of command-line arguments
816 bootretry_reset_cmd_timeout(); /* got a good command to get here */ in mod_i2c_mem()
828 * Defaults to byte if no or incorrect specification. in mod_i2c_mem()
848 if (!ret && alen != -1) in mod_i2c_mem()
856 * the next value. A non-converted value exits. in mod_i2c_mem()
880 * location and move to next. in mod_i2c_mem()
885 /* good enough to not time out */ in mod_i2c_mem()
889 else if (nbytes == -2) in mod_i2c_mem()
901 nbytes = endp - console_buffer; in mod_i2c_mem()
904 * good enough to not time out in mod_i2c_mem()
934 * do_i2c_probe() - Handle the "i2c probe" command-line command
937 * @argc: Command-line argument count
938 * @argv: Array of command-line arguments
951 int addr = -1; in do_i2c_probe()
1009 * do_i2c_loop() - Handle the "i2c loop" command-line command
1012 * @argc: Command-line argument count
1013 * @argv: Array of command-line arguments
1020 * {length} - Number of bytes to read
1021 * {delay} - A DECIMAL number and defaults to 1000 uSec
1053 if (!ret && alen != -1) in do_i2c_loop()
1179 " On-card PLL\n", in do_sdram()
1390 printf ("Min clock delay, back-to-back random column addresses " in do_sdram()
1405 puts ("CAS latency(s) "); in do_sdram()
1410 puts ("CAS latency(s) "); in do_sdram()
1469 if (data[22] & 0x01) puts (" Supports early RAS# precharge\n"); in do_sdram()
1475 printf ("SDRAM cycle time (2nd highest CAS latency) "); in do_sdram()
1479 printf ("SDRAM cycle time (2nd highest CAS latency) %d." in do_sdram()
1486 printf ("SDRAM access from clock (2nd highest CAS latency) 0." in do_sdram()
1490 printf ("SDRAM access from clock (2nd highest CAS latency) %d." in do_sdram()
1497 printf ("SDRAM cycle time (3rd highest CAS latency) "); in do_sdram()
1501 printf ("SDRAM cycle time (3rd highest CAS latency) %d." in do_sdram()
1508 printf ("SDRAM access from clock (3rd highest CAS latency) 0." in do_sdram()
1512 printf ("SDRAM access from clock (3rd highest CAS latency) %d." in do_sdram()
1529 printf ("Row active to row active min %d.%02d ns\n", in do_sdram()
1533 printf ("Row active to row active min %d ns\n", data[28]); in do_sdram()
1539 printf ("RAS to CAS delay min %d.%02d ns\n", in do_sdram()
1543 printf ("RAS to CAS delay min %d ns\n", data[29]); in do_sdram()
1547 printf ("Minimum RAS pulse width %d ns\n", data[30]); in do_sdram()
1567 ((data[32] >> 4) & 0x0F) - 10, data[32] & 0x0F); in do_sdram()
1575 (data[32] & 0x80) ? '-' : '+', in do_sdram()
1585 ((data[33] >> 4) & 0x0F) - 10, data[33] & 0x0F); in do_sdram()
1593 (data[33] & 0x80) ? '-' : '+', in do_sdram()
1605 (data[34] & 0x80) ? '-' : '+', in do_sdram()
1617 (data[35] & 0x80) ? '-' : '+', in do_sdram()
1692 printf("Bus %d:\t%s", bus->req_seq, bus->name); in show_bus()
1694 printf(" (active %d)", bus->seq); in show_bus()
1702 chip->chip_addr, dev->name, chip->offset_len, in show_bus()
1703 chip->flags); in show_bus()
1709 * do_i2c_show_bus() - Handle the "i2c bus" command-line command
1712 * @argc: Command-line argument count
1713 * @argv: Array of command-line arguments
1737 printf("Bus %d:\t%s", i, I2C_ADAP_NR(i)->name); in do_i2c_show_bus()
1744 printf("->%s@0x%2x:%d", in do_i2c_show_bus()
1771 return -1; in do_i2c_show_bus()
1773 printf("Bus %d:\t%s", i, I2C_ADAP_NR(i)->name); in do_i2c_show_bus()
1779 printf("->%s@0x%2x:%d", in do_i2c_show_bus()
1794 * do_i2c_bus_num() - Handle the "i2c dev" command-line command
1797 * @argc: Command-line argument count
1798 * @argv: Array of command-line arguments
1817 bus_no = bus->seq; in do_i2c_bus_num()
1819 bus_no = -1; in do_i2c_bus_num()
1829 return -1; in do_i2c_bus_num()
1832 printf("Setting bus to %d\n", bus_no); in do_i2c_bus_num()
1847 * do_i2c_bus_speed() - Handle the "i2c speed" command-line command
1850 * @argc: Command-line argument count
1851 * @argv: Array of command-line arguments
1876 printf("Setting bus speed to %d Hz\n", speed); in do_i2c_bus_speed()
1890 * do_i2c_mm() - Handle the "i2c mm" command-line command
1893 * @argc: Command-line argument count
1894 * @argv: Array of command-line arguments
1905 * do_i2c_nm() - Handle the "i2c nm" command-line command
1908 * @argc: Command-line argument count
1909 * @argv: Array of command-line arguments
1920 * do_i2c_reset() - Handle the "i2c reset" command-line command
1923 * @argc: Command-line argument count
1924 * @argv: Array of command-line arguments
1940 i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr); in do_i2c_reset()
1989 * do_i2c() - Handle the "i2c" command-line command
1992 * @argc: Command-line argument count
1993 * @argv: Array of command-line arguments
2010 argc--; in do_i2c()
2016 return c->cmd(cmdtp, flag, argc, argv); in do_i2c()
2025 "bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n"
2028 "crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
2031 "i2c dev [dev] - show or set current I2C bus\n"
2034 "i2c edid chip - print EDID configuration information\n"
2036 "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
2037 "i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
2038 "i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
2039 "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
2040 "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
2041 "i2c probe [address] - test for and show device(s) on the I2C bus\n"
2042 "i2c read chip address[.0, .1, .2] length memaddress - read to memory\n"
2043 "i2c write memaddress chip address[.0, .1, .2] length [-s] - write memory\n"
2044 " to I2C; the -s option selects bulk write in a single transaction\n"
2046 "i2c flags chip [flags] - set or get chip flags\n"
2047 "i2c olen chip [offset_length] - set or get chip offset length\n"
2049 "i2c reset - re-init the I2C Controller\n"
2051 "i2c sdram chip - print SDRAM configuration information\n"
2053 "i2c speed [speed] - show or set I2C bus speed";
2058 "I2C sub-system",