1*4882a593Smuzhiyun========================= 2*4882a593SmuzhiyunKernel driver i2c-parport 3*4882a593Smuzhiyun========================= 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunAuthor: Jean Delvare <jdelvare@suse.de> 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThis is a unified driver for several i2c-over-parallel-port adapters, 8*4882a593Smuzhiyunsuch as the ones made by Philips, Velleman or ELV. This driver is 9*4882a593Smuzhiyunmeant as a replacement for the older, individual drivers: 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun * i2c-philips-par 12*4882a593Smuzhiyun * i2c-elv 13*4882a593Smuzhiyun * i2c-velleman 14*4882a593Smuzhiyun * video/i2c-parport 15*4882a593Smuzhiyun (NOT the same as this one, dedicated to home brew teletext adapters) 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunIt currently supports the following devices: 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun * (type=0) Philips adapter 20*4882a593Smuzhiyun * (type=1) home brew teletext adapter 21*4882a593Smuzhiyun * (type=2) Velleman K8000 adapter 22*4882a593Smuzhiyun * (type=3) ELV adapter 23*4882a593Smuzhiyun * (type=4) Analog Devices ADM1032 evaluation board 24*4882a593Smuzhiyun * (type=5) Analog Devices evaluation boards: ADM1025, ADM1030, ADM1031 25*4882a593Smuzhiyun * (type=6) Barco LPT->DVI (K5800236) adapter 26*4882a593Smuzhiyun * (type=7) One For All JP1 parallel port adapter 27*4882a593Smuzhiyun * (type=8) VCT-jig 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunThese devices use different pinout configurations, so you have to tell 30*4882a593Smuzhiyunthe driver what you have, using the type module parameter. There is no 31*4882a593Smuzhiyunway to autodetect the devices. Support for different pinout configurations 32*4882a593Smuzhiyuncan be easily added when needed. 33*4882a593Smuzhiyun 34*4882a593SmuzhiyunEarlier kernels defaulted to type=0 (Philips). But now, if the type 35*4882a593Smuzhiyunparameter is missing, the driver will simply fail to initialize. 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunSMBus alert support is available on adapters which have this line properly 38*4882a593Smuzhiyunconnected to the parallel port's interrupt pin. 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunBuilding your own adapter 42*4882a593Smuzhiyun------------------------- 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunIf you want to build you own i2c-over-parallel-port adapter, here is 45*4882a593Smuzhiyuna sample electronics schema (credits go to Sylvain Munaut):: 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun Device PC 48*4882a593Smuzhiyun Side ___________________Vdd (+) Side 49*4882a593Smuzhiyun | | | 50*4882a593Smuzhiyun --- --- --- 51*4882a593Smuzhiyun | | | | | | 52*4882a593Smuzhiyun |R| |R| |R| 53*4882a593Smuzhiyun | | | | | | 54*4882a593Smuzhiyun --- --- --- 55*4882a593Smuzhiyun | | | 56*4882a593Smuzhiyun | | /| | 57*4882a593Smuzhiyun SCL ----------x--------o |-----------x------------------- pin 2 58*4882a593Smuzhiyun | \| | | 59*4882a593Smuzhiyun | | | 60*4882a593Smuzhiyun | |\ | | 61*4882a593Smuzhiyun SDA ----------x----x---| o---x--------------------------- pin 13 62*4882a593Smuzhiyun | |/ | 63*4882a593Smuzhiyun | | 64*4882a593Smuzhiyun | /| | 65*4882a593Smuzhiyun ---------o |----------------x-------------- pin 3 66*4882a593Smuzhiyun \| | | 67*4882a593Smuzhiyun | | 68*4882a593Smuzhiyun --- --- 69*4882a593Smuzhiyun | | | | 70*4882a593Smuzhiyun |R| |R| 71*4882a593Smuzhiyun | | | | 72*4882a593Smuzhiyun --- --- 73*4882a593Smuzhiyun | | 74*4882a593Smuzhiyun ### ### 75*4882a593Smuzhiyun GND GND 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunRemarks: 78*4882a593Smuzhiyun - This is the exact pinout and electronics used on the Analog Devices 79*4882a593Smuzhiyun evaluation boards. 80*4882a593Smuzhiyun - All inverters:: 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun /| 83*4882a593Smuzhiyun -o |- 84*4882a593Smuzhiyun \| 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun must be 74HC05, they must be open collector output. 87*4882a593Smuzhiyun - All resitors are 10k. 88*4882a593Smuzhiyun - Pins 18-25 of the parallel port connected to GND. 89*4882a593Smuzhiyun - Pins 4-9 (D2-D7) could be used as VDD is the driver drives them high. 90*4882a593Smuzhiyun The ADM1032 evaluation board uses D4-D7. Beware that the amount of 91*4882a593Smuzhiyun current you can draw from the parallel port is limited. Also note that 92*4882a593Smuzhiyun all connected lines MUST BE driven at the same state, else you'll short 93*4882a593Smuzhiyun circuit the output buffers! So plugging the I2C adapter after loading 94*4882a593Smuzhiyun the i2c-parport module might be a good safety since data line state 95*4882a593Smuzhiyun prior to init may be unknown. 96*4882a593Smuzhiyun - This is 5V! 97*4882a593Smuzhiyun - Obviously you cannot read SCL (so it's not really standard-compliant). 98*4882a593Smuzhiyun Pretty easy to add, just copy the SDA part and use another input pin. 99*4882a593Smuzhiyun That would give (ELV compatible pinout):: 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun 102*4882a593Smuzhiyun Device PC 103*4882a593Smuzhiyun Side ______________________________Vdd (+) Side 104*4882a593Smuzhiyun | | | | 105*4882a593Smuzhiyun --- --- --- --- 106*4882a593Smuzhiyun | | | | | | | | 107*4882a593Smuzhiyun |R| |R| |R| |R| 108*4882a593Smuzhiyun | | | | | | | | 109*4882a593Smuzhiyun --- --- --- --- 110*4882a593Smuzhiyun | | | | 111*4882a593Smuzhiyun | | |\ | | 112*4882a593Smuzhiyun SCL ----------x--------x--| o---x------------------------ pin 15 113*4882a593Smuzhiyun | | |/ | 114*4882a593Smuzhiyun | | | 115*4882a593Smuzhiyun | | /| | 116*4882a593Smuzhiyun | ---o |-------------x-------------- pin 2 117*4882a593Smuzhiyun | \| | | 118*4882a593Smuzhiyun | | | 119*4882a593Smuzhiyun | | | 120*4882a593Smuzhiyun | |\ | | 121*4882a593Smuzhiyun SDA ---------------x---x--| o--------x------------------- pin 10 122*4882a593Smuzhiyun | |/ | 123*4882a593Smuzhiyun | | 124*4882a593Smuzhiyun | /| | 125*4882a593Smuzhiyun ---o |------------------x--------- pin 3 126*4882a593Smuzhiyun \| | | 127*4882a593Smuzhiyun | | 128*4882a593Smuzhiyun --- --- 129*4882a593Smuzhiyun | | | | 130*4882a593Smuzhiyun |R| |R| 131*4882a593Smuzhiyun | | | | 132*4882a593Smuzhiyun --- --- 133*4882a593Smuzhiyun | | 134*4882a593Smuzhiyun ### ### 135*4882a593Smuzhiyun GND GND 136*4882a593Smuzhiyun 137*4882a593Smuzhiyun 138*4882a593SmuzhiyunIf possible, you should use the same pinout configuration as existing 139*4882a593Smuzhiyunadapters do, so you won't even have to change the code. 140*4882a593Smuzhiyun 141*4882a593Smuzhiyun 142*4882a593SmuzhiyunSimilar (but different) drivers 143*4882a593Smuzhiyun------------------------------- 144*4882a593Smuzhiyun 145*4882a593SmuzhiyunThis driver is NOT the same as the i2c-pport driver found in the i2c 146*4882a593Smuzhiyunpackage. The i2c-pport driver makes use of modern parallel port features so 147*4882a593Smuzhiyunthat you don't need additional electronics. It has other restrictions 148*4882a593Smuzhiyunhowever, and was not ported to Linux 2.6 (yet). 149*4882a593Smuzhiyun 150*4882a593SmuzhiyunThis driver is also NOT the same as the i2c-pcf-epp driver found in the 151*4882a593Smuzhiyunlm_sensors package. The i2c-pcf-epp driver doesn't use the parallel port as 152*4882a593Smuzhiyunan I2C bus directly. Instead, it uses it to control an external I2C bus 153*4882a593Smuzhiyunmaster. That driver was not ported to Linux 2.6 (yet) either. 154*4882a593Smuzhiyun 155*4882a593Smuzhiyun 156*4882a593SmuzhiyunLegacy documentation for Velleman adapter 157*4882a593Smuzhiyun----------------------------------------- 158*4882a593Smuzhiyun 159*4882a593SmuzhiyunUseful links: 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun- Velleman http://www.velleman.be/ 162*4882a593Smuzhiyun- Velleman K8000 Howto http://howto.htlw16.ac.at/k8000-howto.html 163*4882a593Smuzhiyun 164*4882a593SmuzhiyunThe project has lead to new libs for the Velleman K8000 and K8005: 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun LIBK8000 v1.99.1 and LIBK8005 v0.21 167*4882a593Smuzhiyun 168*4882a593SmuzhiyunWith these libs, you can control the K8000 interface card and the K8005 169*4882a593Smuzhiyunstepper motor card with the simple commands which are in the original 170*4882a593SmuzhiyunVelleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and 171*4882a593Smuzhiyunmany more, using /dev/velleman. 172*4882a593Smuzhiyun 173*4882a593Smuzhiyun - http://home.wanadoo.nl/hihihi/libk8000.htm 174*4882a593Smuzhiyun - http://home.wanadoo.nl/hihihi/libk8005.htm 175*4882a593Smuzhiyun - http://struyve.mine.nu:8080/index.php?block=k8000 176*4882a593Smuzhiyun - http://sourceforge.net/projects/libk8005/ 177*4882a593Smuzhiyun 178*4882a593Smuzhiyun 179*4882a593SmuzhiyunOne For All JP1 parallel port adapter 180*4882a593Smuzhiyun------------------------------------- 181*4882a593Smuzhiyun 182*4882a593SmuzhiyunThe JP1 project revolves around a set of remote controls which expose 183*4882a593Smuzhiyunthe I2C bus their internal configuration EEPROM lives on via a 6 pin 184*4882a593Smuzhiyunjumper in the battery compartment. More details can be found at: 185*4882a593Smuzhiyun 186*4882a593Smuzhiyunhttp://www.hifi-remote.com/jp1/ 187*4882a593Smuzhiyun 188*4882a593SmuzhiyunDetails of the simple parallel port hardware can be found at: 189*4882a593Smuzhiyun 190*4882a593Smuzhiyunhttp://www.hifi-remote.com/jp1/hardware.shtml 191