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