diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-10-04 16:53:40 -0400 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-10-04 16:53:40 -0400 |
commit | f546c65cd59275c7b95eba4f9b3ab83b38a5e9cb (patch) | |
tree | e8957c44efeb5f331272d092cab974679fa896c8 /Documentation/i2c | |
parent | 8a0382f6fceaf0c6479e582e1054f36333ea3d24 (diff) |
i2c: Move misc devices documentation
Some times ago the eeprom and max6875 drivers moved to
drivers/misc/eeprom, but their documentation did not follow. It's
finally time to get rid of Documentation/i2c/chips.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ben Gardner <gardner.ben@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'Documentation/i2c')
-rw-r--r-- | Documentation/i2c/chips/eeprom | 96 | ||||
-rw-r--r-- | Documentation/i2c/chips/max6875 | 108 |
2 files changed, 0 insertions, 204 deletions
diff --git a/Documentation/i2c/chips/eeprom b/Documentation/i2c/chips/eeprom deleted file mode 100644 index f7e8104b576..00000000000 --- a/Documentation/i2c/chips/eeprom +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | Kernel driver eeprom | ||
2 | ==================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Any EEPROM chip in the designated address range | ||
6 | Prefix: 'eeprom' | ||
7 | Addresses scanned: I2C 0x50 - 0x57 | ||
8 | Datasheets: Publicly available from: | ||
9 | Atmel (www.atmel.com), | ||
10 | Catalyst (www.catsemi.com), | ||
11 | Fairchild (www.fairchildsemi.com), | ||
12 | Microchip (www.microchip.com), | ||
13 | Philips (www.semiconductor.philips.com), | ||
14 | Rohm (www.rohm.com), | ||
15 | ST (www.st.com), | ||
16 | Xicor (www.xicor.com), | ||
17 | and others. | ||
18 | |||
19 | Chip Size (bits) Address | ||
20 | 24C01 1K 0x50 (shadows at 0x51 - 0x57) | ||
21 | 24C01A 1K 0x50 - 0x57 (Typical device on DIMMs) | ||
22 | 24C02 2K 0x50 - 0x57 | ||
23 | 24C04 4K 0x50, 0x52, 0x54, 0x56 | ||
24 | (additional data at 0x51, 0x53, 0x55, 0x57) | ||
25 | 24C08 8K 0x50, 0x54 (additional data at 0x51, 0x52, | ||
26 | 0x53, 0x55, 0x56, 0x57) | ||
27 | 24C16 16K 0x50 (additional data at 0x51 - 0x57) | ||
28 | Sony 2K 0x57 | ||
29 | |||
30 | Atmel 34C02B 2K 0x50 - 0x57, SW write protect at 0x30-37 | ||
31 | Catalyst 34FC02 2K 0x50 - 0x57, SW write protect at 0x30-37 | ||
32 | Catalyst 34RC02 2K 0x50 - 0x57, SW write protect at 0x30-37 | ||
33 | Fairchild 34W02 2K 0x50 - 0x57, SW write protect at 0x30-37 | ||
34 | Microchip 24AA52 2K 0x50 - 0x57, SW write protect at 0x30-37 | ||
35 | ST M34C02 2K 0x50 - 0x57, SW write protect at 0x30-37 | ||
36 | |||
37 | |||
38 | Authors: | ||
39 | Frodo Looijaard <frodol@dds.nl>, | ||
40 | Philip Edelbrock <phil@netroedge.com>, | ||
41 | Jean Delvare <khali@linux-fr.org>, | ||
42 | Greg Kroah-Hartman <greg@kroah.com>, | ||
43 | IBM Corp. | ||
44 | |||
45 | Description | ||
46 | ----------- | ||
47 | |||
48 | This is a simple EEPROM module meant to enable reading the first 256 bytes | ||
49 | of an EEPROM (on a SDRAM DIMM for example). However, it will access serial | ||
50 | EEPROMs on any I2C adapter. The supported devices are generically called | ||
51 | 24Cxx, and are listed above; however the numbering for these | ||
52 | industry-standard devices may vary by manufacturer. | ||
53 | |||
54 | This module was a programming exercise to get used to the new project | ||
55 | organization laid out by Frodo, but it should be at least completely | ||
56 | effective for decoding the contents of EEPROMs on DIMMs. | ||
57 | |||
58 | DIMMS will typically contain a 24C01A or 24C02, or the 34C02 variants. | ||
59 | The other devices will not be found on a DIMM because they respond to more | ||
60 | than one address. | ||
61 | |||
62 | DDC Monitors may contain any device. Often a 24C01, which responds to all 8 | ||
63 | addresses, is found. | ||
64 | |||
65 | Recent Sony Vaio laptops have an EEPROM at 0x57. We couldn't get the | ||
66 | specification, so it is guess work and far from being complete. | ||
67 | |||
68 | The Microchip 24AA52/24LCS52, ST M34C02, and others support an additional | ||
69 | software write protect register at 0x30 - 0x37 (0x20 less than the memory | ||
70 | location). The chip responds to "write quick" detection at this address but | ||
71 | does not respond to byte reads. If this register is present, the lower 128 | ||
72 | bytes of the memory array are not write protected. Any byte data write to | ||
73 | this address will write protect the memory array permanently, and the | ||
74 | device will no longer respond at the 0x30-37 address. The eeprom driver | ||
75 | does not support this register. | ||
76 | |||
77 | Lacking functionality: | ||
78 | |||
79 | * Full support for larger devices (24C04, 24C08, 24C16). These are not | ||
80 | typically found on a PC. These devices will appear as separate devices at | ||
81 | multiple addresses. | ||
82 | |||
83 | * Support for really large devices (24C32, 24C64, 24C128, 24C256, 24C512). | ||
84 | These devices require two-byte address fields and are not supported. | ||
85 | |||
86 | * Enable Writing. Again, no technical reason why not, but making it easy | ||
87 | to change the contents of the EEPROMs (on DIMMs anyway) also makes it easy | ||
88 | to disable the DIMMs (potentially preventing the computer from booting) | ||
89 | until the values are restored somehow. | ||
90 | |||
91 | Use: | ||
92 | |||
93 | After inserting the module (and any other required SMBus/i2c modules), you | ||
94 | should have some EEPROM directories in /sys/bus/i2c/devices/* of names such | ||
95 | as "0-0050". Inside each of these is a series of files, the eeprom file | ||
96 | contains the binary data from EEPROM. | ||
diff --git a/Documentation/i2c/chips/max6875 b/Documentation/i2c/chips/max6875 deleted file mode 100644 index 10ca43cd1a7..00000000000 --- a/Documentation/i2c/chips/max6875 +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | Kernel driver max6875 | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Maxim MAX6874, MAX6875 | ||
6 | Prefix: 'max6875' | ||
7 | Addresses scanned: None (see below) | ||
8 | Datasheet: | ||
9 | http://pdfserv.maxim-ic.com/en/ds/MAX6874-MAX6875.pdf | ||
10 | |||
11 | Author: Ben Gardner <bgardner@wabtec.com> | ||
12 | |||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | The Maxim MAX6875 is an EEPROM-programmable power-supply sequencer/supervisor. | ||
18 | It provides timed outputs that can be used as a watchdog, if properly wired. | ||
19 | It also provides 512 bytes of user EEPROM. | ||
20 | |||
21 | At reset, the MAX6875 reads the configuration EEPROM into its configuration | ||
22 | registers. The chip then begins to operate according to the values in the | ||
23 | registers. | ||
24 | |||
25 | The Maxim MAX6874 is a similar, mostly compatible device, with more intputs | ||
26 | and outputs: | ||
27 | vin gpi vout | ||
28 | MAX6874 6 4 8 | ||
29 | MAX6875 4 3 5 | ||
30 | |||
31 | See the datasheet for more information. | ||
32 | |||
33 | |||
34 | Sysfs entries | ||
35 | ------------- | ||
36 | |||
37 | eeprom - 512 bytes of user-defined EEPROM space. | ||
38 | |||
39 | |||
40 | General Remarks | ||
41 | --------------- | ||
42 | |||
43 | Valid addresses for the MAX6875 are 0x50 and 0x52. | ||
44 | Valid addresses for the MAX6874 are 0x50, 0x52, 0x54 and 0x56. | ||
45 | The driver does not probe any address, so you must force the address. | ||
46 | |||
47 | Example: | ||
48 | $ modprobe max6875 force=0,0x50 | ||
49 | |||
50 | The MAX6874/MAX6875 ignores address bit 0, so this driver attaches to multiple | ||
51 | addresses. For example, for address 0x50, it also reserves 0x51. | ||
52 | The even-address instance is called 'max6875', the odd one is 'dummy'. | ||
53 | |||
54 | |||
55 | Programming the chip using i2c-dev | ||
56 | ---------------------------------- | ||
57 | |||
58 | Use the i2c-dev interface to access and program the chips. | ||
59 | Reads and writes are performed differently depending on the address range. | ||
60 | |||
61 | The configuration registers are at addresses 0x00 - 0x45. | ||
62 | Use i2c_smbus_write_byte_data() to write a register and | ||
63 | i2c_smbus_read_byte_data() to read a register. | ||
64 | The command is the register number. | ||
65 | |||
66 | Examples: | ||
67 | To write a 1 to register 0x45: | ||
68 | i2c_smbus_write_byte_data(fd, 0x45, 1); | ||
69 | |||
70 | To read register 0x45: | ||
71 | value = i2c_smbus_read_byte_data(fd, 0x45); | ||
72 | |||
73 | |||
74 | The configuration EEPROM is at addresses 0x8000 - 0x8045. | ||
75 | The user EEPROM is at addresses 0x8100 - 0x82ff. | ||
76 | |||
77 | Use i2c_smbus_write_word_data() to write a byte to EEPROM. | ||
78 | |||
79 | The command is the upper byte of the address: 0x80, 0x81, or 0x82. | ||
80 | The data word is the lower part of the address or'd with data << 8. | ||
81 | cmd = address >> 8; | ||
82 | val = (address & 0xff) | (data << 8); | ||
83 | |||
84 | Example: | ||
85 | To write 0x5a to address 0x8003: | ||
86 | i2c_smbus_write_word_data(fd, 0x80, 0x5a03); | ||
87 | |||
88 | |||
89 | Reading data from the EEPROM is a little more complicated. | ||
90 | Use i2c_smbus_write_byte_data() to set the read address and then | ||
91 | i2c_smbus_read_byte() or i2c_smbus_read_i2c_block_data() to read the data. | ||
92 | |||
93 | Example: | ||
94 | To read data starting at offset 0x8100, first set the address: | ||
95 | i2c_smbus_write_byte_data(fd, 0x81, 0x00); | ||
96 | |||
97 | And then read the data | ||
98 | value = i2c_smbus_read_byte(fd); | ||
99 | |||
100 | or | ||
101 | |||
102 | count = i2c_smbus_read_i2c_block_data(fd, 0x84, 16, buffer); | ||
103 | |||
104 | The block read should read 16 bytes. | ||
105 | 0x84 is the block read command. | ||
106 | |||
107 | See the datasheet for more details. | ||
108 | |||