162306a36Sopenharmony_ci========================= 262306a36Sopenharmony_ciKernel driver i2c-parport 362306a36Sopenharmony_ci========================= 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciAuthor: Jean Delvare <jdelvare@suse.de> 662306a36Sopenharmony_ci 762306a36Sopenharmony_ciThis is a unified driver for several i2c-over-parallel-port adapters, 862306a36Sopenharmony_cisuch as the ones made by Philips, Velleman or ELV. This driver is 962306a36Sopenharmony_cimeant as a replacement for the older, individual drivers: 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci * i2c-philips-par 1262306a36Sopenharmony_ci * i2c-elv 1362306a36Sopenharmony_ci * i2c-velleman 1462306a36Sopenharmony_ci * video/i2c-parport 1562306a36Sopenharmony_ci (NOT the same as this one, dedicated to home brew teletext adapters) 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciIt currently supports the following devices: 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci * (type=0) Philips adapter 2062306a36Sopenharmony_ci * (type=1) home brew teletext adapter 2162306a36Sopenharmony_ci * (type=2) Velleman K8000 adapter 2262306a36Sopenharmony_ci * (type=3) ELV adapter 2362306a36Sopenharmony_ci * (type=4) Analog Devices ADM1032 evaluation board 2462306a36Sopenharmony_ci * (type=5) Analog Devices evaluation boards: ADM1025, ADM1030, ADM1031 2562306a36Sopenharmony_ci * (type=6) Barco LPT->DVI (K5800236) adapter 2662306a36Sopenharmony_ci * (type=7) One For All JP1 parallel port adapter 2762306a36Sopenharmony_ci * (type=8) VCT-jig 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciThese devices use different pinout configurations, so you have to tell 3062306a36Sopenharmony_cithe driver what you have, using the type module parameter. There is no 3162306a36Sopenharmony_ciway to autodetect the devices. Support for different pinout configurations 3262306a36Sopenharmony_cican be easily added when needed. 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ciEarlier kernels defaulted to type=0 (Philips). But now, if the type 3562306a36Sopenharmony_ciparameter is missing, the driver will simply fail to initialize. 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciSMBus alert support is available on adapters which have this line properly 3862306a36Sopenharmony_ciconnected to the parallel port's interrupt pin. 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ciBuilding your own adapter 4262306a36Sopenharmony_ci------------------------- 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ciIf you want to build you own i2c-over-parallel-port adapter, here is 4562306a36Sopenharmony_cia sample electronics schema (credits go to Sylvain Munaut):: 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci Device PC 4862306a36Sopenharmony_ci Side ___________________Vdd (+) Side 4962306a36Sopenharmony_ci | | | 5062306a36Sopenharmony_ci --- --- --- 5162306a36Sopenharmony_ci | | | | | | 5262306a36Sopenharmony_ci |R| |R| |R| 5362306a36Sopenharmony_ci | | | | | | 5462306a36Sopenharmony_ci --- --- --- 5562306a36Sopenharmony_ci | | | 5662306a36Sopenharmony_ci | | /| | 5762306a36Sopenharmony_ci SCL ----------x--------o |-----------x------------------- pin 2 5862306a36Sopenharmony_ci | \| | | 5962306a36Sopenharmony_ci | | | 6062306a36Sopenharmony_ci | |\ | | 6162306a36Sopenharmony_ci SDA ----------x----x---| o---x--------------------------- pin 13 6262306a36Sopenharmony_ci | |/ | 6362306a36Sopenharmony_ci | | 6462306a36Sopenharmony_ci | /| | 6562306a36Sopenharmony_ci ---------o |----------------x-------------- pin 3 6662306a36Sopenharmony_ci \| | | 6762306a36Sopenharmony_ci | | 6862306a36Sopenharmony_ci --- --- 6962306a36Sopenharmony_ci | | | | 7062306a36Sopenharmony_ci |R| |R| 7162306a36Sopenharmony_ci | | | | 7262306a36Sopenharmony_ci --- --- 7362306a36Sopenharmony_ci | | 7462306a36Sopenharmony_ci ### ### 7562306a36Sopenharmony_ci GND GND 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ciRemarks: 7862306a36Sopenharmony_ci - This is the exact pinout and electronics used on the Analog Devices 7962306a36Sopenharmony_ci evaluation boards. 8062306a36Sopenharmony_ci - All inverters:: 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci /| 8362306a36Sopenharmony_ci -o |- 8462306a36Sopenharmony_ci \| 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci must be 74HC05, they must be open collector output. 8762306a36Sopenharmony_ci - All resitors are 10k. 8862306a36Sopenharmony_ci - Pins 18-25 of the parallel port connected to GND. 8962306a36Sopenharmony_ci - Pins 4-9 (D2-D7) could be used as VDD is the driver drives them high. 9062306a36Sopenharmony_ci The ADM1032 evaluation board uses D4-D7. Beware that the amount of 9162306a36Sopenharmony_ci current you can draw from the parallel port is limited. Also note that 9262306a36Sopenharmony_ci all connected lines MUST BE driven at the same state, else you'll short 9362306a36Sopenharmony_ci circuit the output buffers! So plugging the I2C adapter after loading 9462306a36Sopenharmony_ci the i2c-parport module might be a good safety since data line state 9562306a36Sopenharmony_ci prior to init may be unknown. 9662306a36Sopenharmony_ci - This is 5V! 9762306a36Sopenharmony_ci - Obviously you cannot read SCL (so it's not really standard-compliant). 9862306a36Sopenharmony_ci Pretty easy to add, just copy the SDA part and use another input pin. 9962306a36Sopenharmony_ci That would give (ELV compatible pinout):: 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci Device PC 10362306a36Sopenharmony_ci Side ______________________________Vdd (+) Side 10462306a36Sopenharmony_ci | | | | 10562306a36Sopenharmony_ci --- --- --- --- 10662306a36Sopenharmony_ci | | | | | | | | 10762306a36Sopenharmony_ci |R| |R| |R| |R| 10862306a36Sopenharmony_ci | | | | | | | | 10962306a36Sopenharmony_ci --- --- --- --- 11062306a36Sopenharmony_ci | | | | 11162306a36Sopenharmony_ci | | |\ | | 11262306a36Sopenharmony_ci SCL ----------x--------x--| o---x------------------------ pin 15 11362306a36Sopenharmony_ci | | |/ | 11462306a36Sopenharmony_ci | | | 11562306a36Sopenharmony_ci | | /| | 11662306a36Sopenharmony_ci | ---o |-------------x-------------- pin 2 11762306a36Sopenharmony_ci | \| | | 11862306a36Sopenharmony_ci | | | 11962306a36Sopenharmony_ci | | | 12062306a36Sopenharmony_ci | |\ | | 12162306a36Sopenharmony_ci SDA ---------------x---x--| o--------x------------------- pin 10 12262306a36Sopenharmony_ci | |/ | 12362306a36Sopenharmony_ci | | 12462306a36Sopenharmony_ci | /| | 12562306a36Sopenharmony_ci ---o |------------------x--------- pin 3 12662306a36Sopenharmony_ci \| | | 12762306a36Sopenharmony_ci | | 12862306a36Sopenharmony_ci --- --- 12962306a36Sopenharmony_ci | | | | 13062306a36Sopenharmony_ci |R| |R| 13162306a36Sopenharmony_ci | | | | 13262306a36Sopenharmony_ci --- --- 13362306a36Sopenharmony_ci | | 13462306a36Sopenharmony_ci ### ### 13562306a36Sopenharmony_ci GND GND 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_ciIf possible, you should use the same pinout configuration as existing 13962306a36Sopenharmony_ciadapters do, so you won't even have to change the code. 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ciSimilar (but different) drivers 14362306a36Sopenharmony_ci------------------------------- 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ciThis driver is NOT the same as the i2c-pport driver found in the i2c 14662306a36Sopenharmony_cipackage. The i2c-pport driver makes use of modern parallel port features so 14762306a36Sopenharmony_cithat you don't need additional electronics. It has other restrictions 14862306a36Sopenharmony_cihowever, and was not ported to Linux 2.6 (yet). 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ciThis driver is also NOT the same as the i2c-pcf-epp driver found in the 15162306a36Sopenharmony_cilm_sensors package. The i2c-pcf-epp driver doesn't use the parallel port as 15262306a36Sopenharmony_cian I2C bus directly. Instead, it uses it to control an external I2C bus 15362306a36Sopenharmony_cimaster. That driver was not ported to Linux 2.6 (yet) either. 15462306a36Sopenharmony_ci 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ciLegacy documentation for Velleman adapter 15762306a36Sopenharmony_ci----------------------------------------- 15862306a36Sopenharmony_ci 15962306a36Sopenharmony_ciUseful links: 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci- Velleman http://www.velleman.be/ 16262306a36Sopenharmony_ci- Velleman K8000 Howto http://howto.htlw16.ac.at/k8000-howto.html 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ciThe project has lead to new libs for the Velleman K8000 and K8005: 16562306a36Sopenharmony_ci 16662306a36Sopenharmony_ci LIBK8000 v1.99.1 and LIBK8005 v0.21 16762306a36Sopenharmony_ci 16862306a36Sopenharmony_ciWith these libs, you can control the K8000 interface card and the K8005 16962306a36Sopenharmony_cistepper motor card with the simple commands which are in the original 17062306a36Sopenharmony_ciVelleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and 17162306a36Sopenharmony_cimany more, using /dev/velleman. 17262306a36Sopenharmony_ci 17362306a36Sopenharmony_ci - http://home.wanadoo.nl/hihihi/libk8000.htm 17462306a36Sopenharmony_ci - http://home.wanadoo.nl/hihihi/libk8005.htm 17562306a36Sopenharmony_ci - http://struyve.mine.nu:8080/index.php?block=k8000 17662306a36Sopenharmony_ci - http://sourceforge.net/projects/libk8005/ 17762306a36Sopenharmony_ci 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ciOne For All JP1 parallel port adapter 18062306a36Sopenharmony_ci------------------------------------- 18162306a36Sopenharmony_ci 18262306a36Sopenharmony_ciThe JP1 project revolves around a set of remote controls which expose 18362306a36Sopenharmony_cithe I2C bus their internal configuration EEPROM lives on via a 6 pin 18462306a36Sopenharmony_cijumper in the battery compartment. More details can be found at: 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_cihttp://www.hifi-remote.com/jp1/ 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_ciDetails of the simple parallel port hardware can be found at: 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_cihttp://www.hifi-remote.com/jp1/hardware.shtml 191