Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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