http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / kernel / linux / Documentation / i2c / i2c-parport
1 ==================
2 i2c-parport driver
3 ==================
4
5 2004-07-06, Jean Delvare
6
7 This is a unified driver for several i2c-over-parallel-port adapters,
8 such as the ones made by Philips, Velleman or ELV. This driver is
9 meant as a replacement for the older, individual drivers:
10  * i2c-philips-par
11  * i2c-elv
12  * i2c-velleman
13  * video/i2c-parport (NOT the same as this one, dedicated to home brew
14                       teletext adapters)
15
16 It currently supports the following devices:
17  * Philips adapter
18  * home brew teletext adapter
19  * Velleman K8000 adapter
20  * ELV adapter
21  * Analog Devices evaluation boards (ADM1025, ADM1030, ADM1031, ADM1032)
22
23 These devices use different pinout configurations, so you have to tell
24 the driver what you have, using the type module parameter. There is no
25 way to autodetect the devices. Support for different pinout configurations
26 can be easily added when needed.
27
28
29 Building your own adapter
30 -------------------------
31
32 If you want to build you own i2c-over-parallel-port adapter, here is
33 a sample electronics schema (credits go to Sylvain Munaut):
34
35 Device                                                      PC
36 Side          ___________________Vdd (+)                    Side
37                |    |         |
38               ---  ---       ---
39               | |  | |       | |
40               |R|  |R|       |R|
41               | |  | |       | |
42               ---  ---       ---
43                |    |         |
44                |    |    /|   |
45 SCL  ----------x--------o |-----------x-------------------  pin 2
46                     |    \|   |       |
47                     |         |       |
48                     |   |\    |       |
49 SDA  ----------x----x---| o---x---------------------------  pin 13
50                |        |/            |
51                |                      |
52                |         /|           |
53                ---------o |----------------x--------------  pin 3
54                          \|           |    |
55                                       |    |
56                                      ---  ---
57                                      | |  | |
58                                      |R|  |R|
59                                      | |  | |
60                                      ---  ---
61                                       |    | 
62                                      ###  ###
63                                      GND  GND
64         
65 Remarks:
66  - This is the exact pinout and electronics used on the Analog Devices
67    evaluation boards.
68                    /|
69  - All inverters -o |- must be 74HC05, they must be open collector output.
70                    \|
71  - All resitors are 10k.
72  - Pins 18-25 of the parallel port connected to GND.
73  - Pins 4-9 (D2-D7) could be used as VDD is the driver drives them high.
74    The ADM1032 evaluation board uses D4-D7. Beware that the amount of
75    current you can draw from the parallel port is limited. Also note that
76    all connected lines MUST BE driven at the same state, else you'll short
77    circuit the output buffers! So plugging the I2C adapter after loading
78    the i2c-parport module might be a good safety since data line state
79    prior to init may be unknown. 
80  - This is 5V!
81  - Obviously you cannot read SCL (so it's not really standard-compliant).
82    Pretty easy to add, just copy the SDA part and use another input pin.
83    That would give (ELV compatible pinout):
84
85
86 Device                                                      PC
87 Side          ______________________________Vdd (+)         Side
88                |    |            |    |
89               ---  ---          ---  ---
90               | |  | |          | |  | |
91               |R|  |R|          |R|  |R|
92               | |  | |          | |  | |
93               ---  ---          ---  ---
94                |    |            |    |
95                |    |      |\    |    |
96 SCL  ----------x--------x--| o---x------------------------  pin 15
97                     |   |  |/         | 
98                     |   |             |
99                     |   |   /|        |
100                     |   ---o |-------------x--------------  pin 2
101                     |       \|        |    |
102                     |                 |    |
103                     |                 |    |
104                     |      |\         |    |
105 SDA  ---------------x---x--| o--------x-------------------  pin 10
106                         |  |/              |
107                         |                  |
108                         |   /|             |
109                         ---o |------------------x---------  pin 3
110                             \|             |    |
111                                            |    |
112                                           ---  ---
113                                           | |  | |
114                                           |R|  |R|
115                                           | |  | |
116                                           ---  ---
117                                            |    | 
118                                           ###  ###
119                                           GND  GND
120
121
122 If possible, you should use the same pinout configuration as existing
123 adapters do, so you won't even have to change the code.
124
125
126 Similar (but different) drivers
127 -------------------------------
128
129 This driver is NOT the same as the i2c-pport driver found in the i2c package.
130 The i2c-pport driver makes use of modern parallel port features so that
131 you don't need additional electronics. It has other restrictions however, and
132 was not ported to Linux 2.6 (yet).
133
134 This driver is also NOT the same as the i2c-pcf-epp driver found in the
135 lm_sensors package. The i2c-pcf-epp driver doesn't use the parallel port
136 as an I2C bus directly. Instead, it uses it to control an external I2C bus
137 master. That driver was not ported to Linux 2.6 (yet) either.
138
139
140 Legacy documentation for Velleman adapter
141 -----------------------------------------
142
143 Useful links:
144 Velleman                http://www.velleman.be/
145 Velleman K8000 Howto    http://howto.htlw16.ac.at/k8000-howto.html
146
147 The project has lead to new libs for the Velleman K8000 and K8005:
148   LIBK8000 v1.99.1 and LIBK8005 v0.21
149 With these libs, you can control the K8000 interface card and the K8005
150 stepper motor card with the simple commands which are in the original
151 Velleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and
152 many more, using /dev/velleman.
153   http://home.wanadoo.nl/hihihi/libk8000.htm
154   http://home.wanadoo.nl/hihihi/libk8005.htm
155   http://struyve.mine.nu:8080/index.php?block=k8000
156   http://sourceforge.net/projects/libk8005/