Back to home page

OSCL-LXR

 
 

    


0001 =========================
0002 Kernel driver i2c-parport
0003 =========================
0004 
0005 Author: Jean Delvare <jdelvare@suse.de>
0006 
0007 This is a unified driver for several i2c-over-parallel-port adapters,
0008 such as the ones made by Philips, Velleman or ELV. This driver is
0009 meant as a replacement for the older, individual drivers:
0010 
0011  * i2c-philips-par
0012  * i2c-elv
0013  * i2c-velleman
0014  * video/i2c-parport
0015    (NOT the same as this one, dedicated to home brew teletext adapters)
0016 
0017 It currently supports the following devices:
0018 
0019  * (type=0) Philips adapter
0020  * (type=1) home brew teletext adapter
0021  * (type=2) Velleman K8000 adapter
0022  * (type=3) ELV adapter
0023  * (type=4) Analog Devices ADM1032 evaluation board
0024  * (type=5) Analog Devices evaluation boards: ADM1025, ADM1030, ADM1031
0025  * (type=6) Barco LPT->DVI (K5800236) adapter
0026  * (type=7) One For All JP1 parallel port adapter
0027  * (type=8) VCT-jig
0028 
0029 These devices use different pinout configurations, so you have to tell
0030 the driver what you have, using the type module parameter. There is no
0031 way to autodetect the devices. Support for different pinout configurations
0032 can be easily added when needed.
0033 
0034 Earlier kernels defaulted to type=0 (Philips).  But now, if the type
0035 parameter is missing, the driver will simply fail to initialize.
0036 
0037 SMBus alert support is available on adapters which have this line properly
0038 connected to the parallel port's interrupt pin.
0039 
0040 
0041 Building your own adapter
0042 -------------------------
0043 
0044 If you want to build you own i2c-over-parallel-port adapter, here is
0045 a sample electronics schema (credits go to Sylvain Munaut)::
0046 
0047   Device                                                      PC
0048   Side          ___________________Vdd (+)                    Side
0049                  |    |         |
0050                 ---  ---       ---
0051                 | |  | |       | |
0052                 |R|  |R|       |R|
0053                 | |  | |       | |
0054                 ---  ---       ---
0055                  |    |         |
0056                  |    |    /|   |
0057   SCL  ----------x--------o |-----------x-------------------  pin 2
0058                       |    \|   |       |
0059                       |         |       |
0060                       |   |\    |       |
0061   SDA  ----------x----x---| o---x---------------------------  pin 13
0062                  |        |/            |
0063                  |                      |
0064                  |         /|           |
0065                  ---------o |----------------x--------------  pin 3
0066                            \|           |    |
0067                                         |    |
0068                                        ---  ---
0069                                        | |  | |
0070                                        |R|  |R|
0071                                        | |  | |
0072                                        ---  ---
0073                                         |    |
0074                                        ###  ###
0075                                        GND  GND
0076 
0077 Remarks:
0078  - This is the exact pinout and electronics used on the Analog Devices
0079    evaluation boards.
0080  - All inverters::
0081 
0082                    /|
0083                  -o |-
0084                    \|
0085 
0086    must be 74HC05, they must be open collector output.
0087  - All resitors are 10k.
0088  - Pins 18-25 of the parallel port connected to GND.
0089  - Pins 4-9 (D2-D7) could be used as VDD is the driver drives them high.
0090    The ADM1032 evaluation board uses D4-D7. Beware that the amount of
0091    current you can draw from the parallel port is limited. Also note that
0092    all connected lines MUST BE driven at the same state, else you'll short
0093    circuit the output buffers! So plugging the I2C adapter after loading
0094    the i2c-parport module might be a good safety since data line state
0095    prior to init may be unknown.
0096  - This is 5V!
0097  - Obviously you cannot read SCL (so it's not really standard-compliant).
0098    Pretty easy to add, just copy the SDA part and use another input pin.
0099    That would give (ELV compatible pinout)::
0100 
0101 
0102       Device                                                      PC
0103       Side          ______________________________Vdd (+)         Side
0104                      |    |            |    |
0105                     ---  ---          ---  ---
0106                     | |  | |          | |  | |
0107                     |R|  |R|          |R|  |R|
0108                     | |  | |          | |  | |
0109                     ---  ---          ---  ---
0110                      |    |            |    |
0111                      |    |      |\    |    |
0112       SCL  ----------x--------x--| o---x------------------------  pin 15
0113                           |   |  |/         |
0114                           |   |             |
0115                           |   |   /|        |
0116                           |   ---o |-------------x--------------  pin 2
0117                           |       \|        |    |
0118                           |                 |    |
0119                           |                 |    |
0120                           |      |\         |    |
0121       SDA  ---------------x---x--| o--------x-------------------  pin 10
0122                               |  |/              |
0123                               |                  |
0124                               |   /|             |
0125                               ---o |------------------x---------  pin 3
0126                                   \|             |    |
0127                                                  |    |
0128                                                 ---  ---
0129                                                 | |  | |
0130                                                 |R|  |R|
0131                                                 | |  | |
0132                                                 ---  ---
0133                                                  |    |
0134                                                 ###  ###
0135                                                 GND  GND
0136 
0137 
0138 If possible, you should use the same pinout configuration as existing
0139 adapters do, so you won't even have to change the code.
0140 
0141 
0142 Similar (but different) drivers
0143 -------------------------------
0144 
0145 This driver is NOT the same as the i2c-pport driver found in the i2c
0146 package. The i2c-pport driver makes use of modern parallel port features so
0147 that you don't need additional electronics. It has other restrictions
0148 however, and was not ported to Linux 2.6 (yet).
0149 
0150 This driver is also NOT the same as the i2c-pcf-epp driver found in the
0151 lm_sensors package. The i2c-pcf-epp driver doesn't use the parallel port as
0152 an I2C bus directly. Instead, it uses it to control an external I2C bus
0153 master. That driver was not ported to Linux 2.6 (yet) either.
0154 
0155 
0156 Legacy documentation for Velleman adapter
0157 -----------------------------------------
0158 
0159 Useful links:
0160 
0161 - Velleman                http://www.velleman.be/
0162 - Velleman K8000 Howto    http://howto.htlw16.ac.at/k8000-howto.html
0163 
0164 The project has lead to new libs for the Velleman K8000 and K8005:
0165 
0166   LIBK8000 v1.99.1 and LIBK8005 v0.21
0167 
0168 With these libs, you can control the K8000 interface card and the K8005
0169 stepper motor card with the simple commands which are in the original
0170 Velleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and
0171 many more, using /dev/velleman.
0172 
0173   - http://home.wanadoo.nl/hihihi/libk8000.htm
0174   - http://home.wanadoo.nl/hihihi/libk8005.htm
0175   - http://struyve.mine.nu:8080/index.php?block=k8000
0176   - http://sourceforge.net/projects/libk8005/
0177 
0178 
0179 One For All JP1 parallel port adapter
0180 -------------------------------------
0181 
0182 The JP1 project revolves around a set of remote controls which expose
0183 the I2C bus their internal configuration EEPROM lives on via a 6 pin
0184 jumper in the battery compartment. More details can be found at:
0185 
0186 http://www.hifi-remote.com/jp1/
0187 
0188 Details of the simple parallel port hardware can be found at:
0189 
0190 http://www.hifi-remote.com/jp1/hardware.shtml