i2c-parport.rst 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. =========================
  2. Kernel driver i2c-parport
  3. =========================
  4. Author: Jean Delvare <[email protected]>
  5. This is a unified driver for several i2c-over-parallel-port adapters,
  6. such as the ones made by Philips, Velleman or ELV. This driver is
  7. meant as a replacement for the older, individual drivers:
  8. * i2c-philips-par
  9. * i2c-elv
  10. * i2c-velleman
  11. * video/i2c-parport
  12. (NOT the same as this one, dedicated to home brew teletext adapters)
  13. It currently supports the following devices:
  14. * (type=0) Philips adapter
  15. * (type=1) home brew teletext adapter
  16. * (type=2) Velleman K8000 adapter
  17. * (type=3) ELV adapter
  18. * (type=4) Analog Devices ADM1032 evaluation board
  19. * (type=5) Analog Devices evaluation boards: ADM1025, ADM1030, ADM1031
  20. * (type=6) Barco LPT->DVI (K5800236) adapter
  21. * (type=7) One For All JP1 parallel port adapter
  22. * (type=8) VCT-jig
  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. Earlier kernels defaulted to type=0 (Philips). But now, if the type
  28. parameter is missing, the driver will simply fail to initialize.
  29. SMBus alert support is available on adapters which have this line properly
  30. connected to the parallel port's interrupt pin.
  31. Building your own adapter
  32. -------------------------
  33. If you want to build you own i2c-over-parallel-port adapter, here is
  34. a sample electronics schema (credits go to Sylvain Munaut)::
  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. Remarks:
  65. - This is the exact pinout and electronics used on the Analog Devices
  66. evaluation boards.
  67. - All inverters::
  68. /|
  69. -o |-
  70. \|
  71. must be 74HC05, they must be open collector output.
  72. - All resitors are 10k.
  73. - Pins 18-25 of the parallel port connected to GND.
  74. - Pins 4-9 (D2-D7) could be used as VDD is the driver drives them high.
  75. The ADM1032 evaluation board uses D4-D7. Beware that the amount of
  76. current you can draw from the parallel port is limited. Also note that
  77. all connected lines MUST BE driven at the same state, else you'll short
  78. circuit the output buffers! So plugging the I2C adapter after loading
  79. the i2c-parport module might be a good safety since data line state
  80. prior to init may be unknown.
  81. - This is 5V!
  82. - Obviously you cannot read SCL (so it's not really standard-compliant).
  83. Pretty easy to add, just copy the SDA part and use another input pin.
  84. That would give (ELV compatible pinout)::
  85. Device PC
  86. Side ______________________________Vdd (+) Side
  87. | | | |
  88. --- --- --- ---
  89. | | | | | | | |
  90. |R| |R| |R| |R|
  91. | | | | | | | |
  92. --- --- --- ---
  93. | | | |
  94. | | |\ | |
  95. SCL ----------x--------x--| o---x------------------------ pin 15
  96. | | |/ |
  97. | | |
  98. | | /| |
  99. | ---o |-------------x-------------- pin 2
  100. | \| | |
  101. | | |
  102. | | |
  103. | |\ | |
  104. SDA ---------------x---x--| o--------x------------------- pin 10
  105. | |/ |
  106. | |
  107. | /| |
  108. ---o |------------------x--------- pin 3
  109. \| | |
  110. | |
  111. --- ---
  112. | | | |
  113. |R| |R|
  114. | | | |
  115. --- ---
  116. | |
  117. ### ###
  118. GND GND
  119. If possible, you should use the same pinout configuration as existing
  120. adapters do, so you won't even have to change the code.
  121. Similar (but different) drivers
  122. -------------------------------
  123. This driver is NOT the same as the i2c-pport driver found in the i2c
  124. package. The i2c-pport driver makes use of modern parallel port features so
  125. that you don't need additional electronics. It has other restrictions
  126. however, and was not ported to Linux 2.6 (yet).
  127. This driver is also NOT the same as the i2c-pcf-epp driver found in the
  128. lm_sensors package. The i2c-pcf-epp driver doesn't use the parallel port as
  129. an I2C bus directly. Instead, it uses it to control an external I2C bus
  130. master. That driver was not ported to Linux 2.6 (yet) either.
  131. Legacy documentation for Velleman adapter
  132. -----------------------------------------
  133. Useful links:
  134. - Velleman http://www.velleman.be/
  135. - Velleman K8000 Howto http://howto.htlw16.ac.at/k8000-howto.html
  136. The project has lead to new libs for the Velleman K8000 and K8005:
  137. LIBK8000 v1.99.1 and LIBK8005 v0.21
  138. With these libs, you can control the K8000 interface card and the K8005
  139. stepper motor card with the simple commands which are in the original
  140. Velleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and
  141. many more, using /dev/velleman.
  142. - http://home.wanadoo.nl/hihihi/libk8000.htm
  143. - http://home.wanadoo.nl/hihihi/libk8005.htm
  144. - http://struyve.mine.nu:8080/index.php?block=k8000
  145. - http://sourceforge.net/projects/libk8005/
  146. One For All JP1 parallel port adapter
  147. -------------------------------------
  148. The JP1 project revolves around a set of remote controls which expose
  149. the I2C bus their internal configuration EEPROM lives on via a 6 pin
  150. jumper in the battery compartment. More details can be found at:
  151. http://www.hifi-remote.com/jp1/
  152. Details of the simple parallel port hardware can be found at:
  153. http://www.hifi-remote.com/jp1/hardware.shtml