specialix.txt 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. specialix.txt -- specialix IO8+ multiport serial driver readme.
  2. Copyright (C) 1997 Roger Wolff (R.E.Wolff@BitWizard.nl)
  3. Specialix pays for the development and support of this driver.
  4. Please DO contact io8-linux@specialix.co.uk if you require
  5. support.
  6. This driver was developed in the BitWizard linux device
  7. driver service. If you require a linux device driver for your
  8. product, please contact devices@BitWizard.nl for a quote.
  9. This code is firmly based on the riscom/8 serial driver,
  10. written by Dmitry Gorodchanin. The specialix IO8+ card
  11. programming information was obtained from the CL-CD1865 Data
  12. Book, and Specialix document number 6200059: IO8+ Hardware
  13. Functional Specification, augmented by document number 6200088:
  14. Merak Hardware Functional Specification. (IO8+/PCI is also
  15. called Merak)
  16. This program is free software; you can redistribute it and/or
  17. modify it under the terms of the GNU General Public License as
  18. published by the Free Software Foundation; either version 2 of
  19. the License, or (at your option) any later version.
  20. This program is distributed in the hope that it will be
  21. useful, but WITHOUT ANY WARRANTY; without even the implied
  22. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  23. PURPOSE. See the GNU General Public License for more details.
  24. You should have received a copy of the GNU General Public
  25. License along with this program; if not, write to the Free
  26. Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  27. USA.
  28. Intro
  29. =====
  30. This file contains some random information, that I like to have online
  31. instead of in a manual that can get lost. Ever misplace your Linux
  32. kernel sources? And the manual of one of the boards in your computer?
  33. Addresses and interrupts
  34. ========================
  35. Address dip switch settings:
  36. The dip switch sets bits 2-9 of the IO address.
  37. 9 8 7 6 5 4 3 2
  38. +-----------------+
  39. 0 | X X X X X X X |
  40. | | = IoBase = 0x100
  41. 1 | X |
  42. +-----------------+ ------ RS232 connectors ---->
  43. | | |
  44. edge connector
  45. | | |
  46. V V V
  47. Base address 0x100 caused a conflict in one of my computers once. I
  48. haven't the foggiest why. My Specialix card is now at 0x180. My
  49. other computer runs just fine with the Specialix card at 0x100....
  50. The card occupies 4 addresses, but actually only two are really used.
  51. The PCI version doesn't have any dip switches. The BIOS assigns
  52. an IO address.
  53. The driver now still autoprobes at 0x100, 0x180, 0x250 and 0x260. If
  54. that causes trouble for you, please report that. I'll remove
  55. autoprobing then.
  56. The driver will tell the card what IRQ to use, so you don't have to
  57. change any jumpers to change the IRQ. Just use a command line
  58. argument (irq=xx) to the insmod program to set the interrupt.
  59. The BIOS assigns the IRQ on the PCI version. You have no say in what
  60. IRQ to use in that case.
  61. If your specialix cards are not at the default locations, you can use
  62. the kernel command line argument "specialix=io0,irq0,io1,irq1...".
  63. Here "io0" is the io address for the first card, and "irq0" is the
  64. irq line that the first card should use. And so on.
  65. Examples.
  66. You use the driver as a module and have three cards at 0x100, 0x250
  67. and 0x180. And some way or another you want them detected in that
  68. order. Moreover irq 12 is taken (e.g. by your PS/2 mouse).
  69. insmod specialix.o iobase=0x100,0x250,0x180 irq=9,11,15
  70. The same three cards, but now in the kernel would require you to
  71. add
  72. specialix=0x100,9,0x250,11,0x180,15
  73. to the command line. This would become
  74. append="specialix=0x100,9,0x250,11,0x180,15"
  75. in your /etc/lilo.conf file if you use lilo.
  76. The Specialix driver is slightly odd: It allows you to have the second
  77. or third card detected without having a first card. This has
  78. advantages and disadvantages. A slot that isn't filled by an ISA card,
  79. might be filled if a PCI card is detected. Thus if you have an ISA
  80. card at 0x250 and a PCI card, you would get:
  81. sx0: specialix IO8+ Board at 0x100 not found.
  82. sx1: specialix IO8+ Board at 0x180 not found.
  83. sx2: specialix IO8+ board detected at 0x250, IRQ 12, CD1865 Rev. B.
  84. sx3: specialix IO8+ Board at 0x260 not found.
  85. sx0: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B.
  86. This would happen if you don't give any probe hints to the driver.
  87. If you would specify:
  88. specialix=0x250,11
  89. you'd get the following messages:
  90. sx0: specialix IO8+ board detected at 0x250, IRQ 11, CD1865 Rev. B.
  91. sx1: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B.
  92. ISA probing is aborted after the IO address you gave is exhausted, and
  93. the PCI card is now detected as the second card. The ISA card is now
  94. also forced to IRQ11....
  95. Baud rates
  96. ==========
  97. The rev 1.2 and below boards use a CL-CD1864. These chips can only
  98. do 64kbit. The rev 1.3 and newer boards use a CL-CD1865. These chips
  99. are officially capable of 115k2.
  100. The Specialix card uses a 25MHz crystal (in times two mode, which in
  101. fact is a divided by two mode). This is not enough to reach the rated
  102. 115k2 on all ports at the same time. With this clock rate you can only
  103. do 37% of this rate. This means that at 115k2 on all ports you are
  104. going to lose characters (The chip cannot handle that many incoming
  105. bits at this clock rate.) (Yes, you read that correctly: there is a
  106. limit to the number of -=bits=- per second that the chip can handle.)
  107. If you near the "limit" you will first start to see a graceful
  108. degradation in that the chip cannot keep the transmitter busy at all
  109. times. However with a central clock this slow, you can also get it to
  110. miss incoming characters. The driver will print a warning message when
  111. you are outside the official specs. The messages usually show up in
  112. the file /var/log/messages .
  113. The specialix card cannot reliably do 115k2. If you use it, you have
  114. to do "extensive testing" (*) to verify if it actually works.
  115. When "mgetty" communicates with my modem at 115k2 it reports:
  116. got: +++[0d]ATQ0V1H0[0d][0d][8a]O[cb][0d][8a]
  117. ^^^^ ^^^^ ^^^^
  118. The three characters that have the "^^^" under them have suffered a
  119. bit error in the highest bit. In conclusion: I've tested it, and found
  120. that it simply DOESN'T work for me. I also suspect that this is also
  121. caused by the baud rate being just a little bit out of tune.
  122. I upgraded the crystal to 66Mhz on one of my Specialix cards. Works
  123. great! Contact me for details. (Voids warranty, requires a steady hand
  124. and more such restrictions....)
  125. (*) Cirrus logic CD1864 databook, page 40.
  126. Cables for the Specialix IO8+
  127. =============================
  128. The pinout of the connectors on the IO8+ is:
  129. pin short direction long name
  130. name
  131. Pin 1 DCD input Data Carrier Detect
  132. Pin 2 RXD input Receive
  133. Pin 3 DTR/RTS output Data Terminal Ready/Ready To Send
  134. Pin 4 GND - Ground
  135. Pin 5 TXD output Transmit
  136. Pin 6 CTS input Clear To Send
  137. -- 6 5 4 3 2 1 --
  138. | |
  139. | |
  140. | |
  141. | |
  142. +----- -----+
  143. |__________|
  144. clip
  145. Front view of an RJ12 connector. Cable moves "into" the paper.
  146. (the plug is ready to plug into your mouth this way...)
  147. NULL cable. I don't know who is going to use these except for
  148. testing purposes, but I tested the cards with this cable. (It
  149. took quite a while to figure out, so I'm not going to delete
  150. it. So there! :-)
  151. This end goes This end needs
  152. straight into the some twists in
  153. RJ12 plug. the wiring.
  154. IO8+ RJ12 IO8+ RJ12
  155. 1 DCD white -
  156. - - 1 DCD
  157. 2 RXD black 5 TXD
  158. 3 DTR/RTS red 6 CTS
  159. 4 GND green 4 GND
  160. 5 TXD yellow 2 RXD
  161. 6 CTS blue 3 DTR/RTS
  162. Same NULL cable, but now sorted on the second column.
  163. 1 DCD white -
  164. - - 1 DCD
  165. 5 TXD yellow 2 RXD
  166. 6 CTS blue 3 DTR/RTS
  167. 4 GND green 4 GND
  168. 2 RXD black 5 TXD
  169. 3 DTR/RTS red 6 CTS
  170. This is a modem cable usable for hardware handshaking:
  171. RJ12 DB25 DB9
  172. 1 DCD white 8 DCD 1 DCD
  173. 2 RXD black 3 RXD 2 RXD
  174. 3 DTR/RTS red 4 RTS 7 RTS
  175. 4 GND green 7 GND 5 GND
  176. 5 TXD yellow 2 TXD 3 TXD
  177. 6 CTS blue 5 CTS 8 CTS
  178. +---- 6 DSR 6 DSR
  179. +---- 20 DTR 4 DTR
  180. This is a modem cable usable for software handshaking:
  181. It allows you to reset the modem using the DTR ioctls.
  182. I (REW) have never tested this, "but xxxxxxxxxxxxx
  183. says that it works." If you test this, please
  184. tell me and I'll fill in your name on the xxx's.
  185. RJ12 DB25 DB9
  186. 1 DCD white 8 DCD 1 DCD
  187. 2 RXD black 3 RXD 2 RXD
  188. 3 DTR/RTS red 20 DTR 4 DTR
  189. 4 GND green 7 GND 5 GND
  190. 5 TXD yellow 2 TXD 3 TXD
  191. 6 CTS blue 5 CTS 8 CTS
  192. +---- 6 DSR 6 DSR
  193. +---- 4 RTS 7 RTS
  194. I bought a 6 wire flat cable. It was colored as indicated.
  195. Check that yours is the same before you trust me on this.
  196. Hardware handshaking issues.
  197. ============================
  198. The driver can be compiled in two different ways. The default
  199. ("Specialix DTR/RTS pin is RTS" is off) the pin behaves as DTR when
  200. hardware handshaking is off. It behaves as the RTS hardware
  201. handshaking signal when hardware handshaking is selected.
  202. When you use this, you have to use the appropriate cable. The
  203. cable will either be compatible with hardware handshaking or with
  204. software handshaking. So switching on the fly is not really an
  205. option.
  206. I actually prefer to use the "Specialix DTR/RTS pin is RTS" option.
  207. This makes the DTR/RTS pin always an RTS pin, and ioctls to
  208. change DTR are always ignored. I have a cable that is configured
  209. for this.
  210. Ports and devices
  211. =================
  212. Port 0 is the one furthest from the card-edge connector.
  213. Devices:
  214. You should make the devices as follows:
  215. bash
  216. cd /dev
  217. for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \
  218. 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  219. do
  220. echo -n "$i "
  221. mknod /dev/ttyW$i c 75 $i
  222. mknod /dev/cuw$i c 76 $i
  223. done
  224. echo ""
  225. If your system doesn't come with these devices preinstalled, bug your
  226. linux-vendor about this. They have had ample time to get this
  227. implemented by now.
  228. You cannot have more than 4 boards in one computer. The card only
  229. supports 4 different interrupts. If you really want this, contact me
  230. about this and I'll give you a few tips (requires soldering iron)....
  231. If you have enough PCI slots, you can probably use more than 4 PCI
  232. versions of the card though....
  233. The PCI version of the card cannot adhere to the mechanical part of
  234. the PCI spec because the 8 serial connectors are simply too large. If
  235. it doesn't fit in your computer, bring back the card.
  236. ------------------------------------------------------------------------
  237. Fixed bugs and restrictions:
  238. - During initialization, interrupts are blindly turned on.
  239. Having a shadow variable would cause an extra memory
  240. access on every IO instruction.
  241. - The interrupt (on the card) should be disabled when we
  242. don't allocate the Linux end of the interrupt. This allows
  243. a different driver/card to use it while all ports are not in
  244. use..... (a la standard serial port)
  245. == An extra _off variant of the sx_in and sx_out macros are
  246. now available. They don't set the interrupt enable bit.
  247. These are used during initialization. Normal operation uses
  248. the old variant which enables the interrupt line.
  249. - RTS/DTR issue needs to be implemented according to
  250. specialix' spec.
  251. I kind of like the "determinism" of the current
  252. implementation. Compile time flag?
  253. == Ok. Compile time flag! Default is how Specialix likes it.
  254. == Now a config time flag! Gets saved in your config file. Neat!
  255. - Can you set the IO address from the lilo command line?
  256. If you need this, bug me about it, I'll make it.
  257. == Hah! No bugging needed. Fixed! :-)
  258. - Cirrus logic hasn't gotten back to me yet why the CD1865 can
  259. and the CD1864 can't do 115k2. I suspect that this is
  260. because the CD1864 is not rated for 33MHz operation.
  261. Therefore the CD1864 versions of the card can't do 115k2 on
  262. all ports just like the CD1865 versions. The driver does
  263. not block 115k2 on CD1864 cards.
  264. == I called the Cirrus Logic representative here in Holland.
  265. The CD1864 databook is identical to the CD1865 databook,
  266. except for an extra warning at the end. Similar Bit errors
  267. have been observed in testing at 115k2 on both an 1865 and
  268. a 1864 chip. I see no reason why I would prohibit 115k2 on
  269. 1864 chips and not do it on 1865 chips. Actually there is
  270. reason to prohibit it on BOTH chips. I print a warning.
  271. If you use 115k2, you're on your own.
  272. - A spiky CD may send spurious HUPs. Also in CLOCAL???
  273. -- A fix for this turned out to be counter productive.
  274. Different fix? Current behaviour is acceptable?
  275. -- Maybe the current implementation is correct. If anybody
  276. gets bitten by this, please report, and it will get fixed.
  277. -- Testing revealed that when in CLOCAL, the problem doesn't
  278. occur. As warned for in the CD1865 manual, the chip may
  279. send modem intr's on a spike. We could filter those out,
  280. but that would be a cludge anyway (You'd still risk getting
  281. a spurious HUP when two spikes occur.).....
  282. Bugs & restrictions:
  283. - This is a difficult card to autoprobe.
  284. You have to WRITE to the address register to even
  285. read-probe a CD186x register. Disable autodetection?
  286. -- Specialix: any suggestions?
  287. - Arbitrary baud rates are not implemented yet.
  288. If you need this, bug me about it.