linux/Documentation/networking/z8530drv.txt
<<
>>
Prefs
   1This is a subset of the documentation. To use this driver you MUST have the
   2full package from:
   3
   4Internet:
   5=========
   6
   71. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz
   8
   92. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gz
  10
  11Please note that the information in this document may be hopelessly outdated.
  12A new version of the documentation, along with links to other important
  13Linux Kernel AX.25 documentation and programs, is available on
  14http://yaina.de/jreuter
  15
  16-----------------------------------------------------------------------------
  17
  18
  19         SCC.C - Linux driver for Z8530 based HDLC cards for AX.25      
  20
  21   ********************************************************************
  22
  23        (c) 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de>
  24
  25        portions (c) 1993 Guido ten Dolle PE1NNZ
  26
  27        for the complete copyright notice see >> Copying.Z8530DRV <<
  28
  29   ******************************************************************** 
  30
  31
  321. Initialization of the driver
  33===============================
  34
  35To use the driver, 3 steps must be performed:
  36
  37     1. if compiled as module: loading the module
  38     2. Setup of hardware, MODEM and KISS parameters with sccinit
  39     3. Attach each channel to the Linux kernel AX.25 with "ifconfig"
  40
  41Unlike the versions below 2.4 this driver is a real network device
  42driver. If you want to run xNOS instead of our fine kernel AX.25
  43use a 2.x version (available from above sites) or read the
  44AX.25-HOWTO on how to emulate a KISS TNC on network device drivers.
  45
  46
  471.1 Loading the module
  48======================
  49
  50(If you're going to compile the driver as a part of the kernel image,
  51 skip this chapter and continue with 1.2)
  52
  53Before you can use a module, you'll have to load it with
  54
  55        insmod scc.o
  56
  57please read 'man insmod' that comes with module-init-tools.
  58
  59You should include the insmod in one of the /etc/rc.d/rc.* files,
  60and don't forget to insert a call of sccinit after that. It
  61will read your /etc/z8530drv.conf.
  62
  631.2. /etc/z8530drv.conf
  64=======================
  65
  66To setup all parameters you must run /sbin/sccinit from one
  67of your rc.*-files. This has to be done BEFORE you can
  68"ifconfig" an interface. Sccinit reads the file /etc/z8530drv.conf
  69and sets the hardware, MODEM and KISS parameters. A sample file is
  70delivered with this package. Change it to your needs.
  71
  72The file itself consists of two main sections.
  73
  741.2.1 configuration of hardware parameters
  75==========================================
  76
  77The hardware setup section defines the following parameters for each
  78Z8530:
  79
  80chip    1
  81data_a  0x300                   # data port A
  82ctrl_a  0x304                   # control port A
  83data_b  0x301                   # data port B
  84ctrl_b  0x305                   # control port B
  85irq     5                       # IRQ No. 5
  86pclock  4915200                 # clock
  87board   BAYCOM                  # hardware type
  88escc    no                      # enhanced SCC chip? (8580/85180/85280)
  89vector  0                       # latch for interrupt vector
  90special no                      # address of special function register
  91option  0                       # option to set via sfr
  92
  93
  94chip    - this is just a delimiter to make sccinit a bit simpler to
  95          program. A parameter has no effect.
  96
  97data_a  - the address of the data port A of this Z8530 (needed)
  98ctrl_a  - the address of the control port A (needed)
  99data_b  - the address of the data port B (needed)
 100ctrl_b  - the address of the control port B (needed)
 101
 102irq     - the used IRQ for this chip. Different chips can use different
 103          IRQs or the same. If they share an interrupt, it needs to be
 104          specified within one chip-definition only.
 105
 106pclock  - the clock at the PCLK pin of the Z8530 (option, 4915200 is
 107          default), measured in Hertz
 108
 109board   - the "type" of the board:
 110
 111           SCC type                 value
 112           ---------------------------------
 113           PA0HZP SCC card          PA0HZP
 114           EAGLE card               EAGLE
 115           PC100 card               PC100
 116           PRIMUS-PC (DG9BL) card   PRIMUS
 117           BayCom (U)SCC card       BAYCOM
 118
 119escc    - if you want support for ESCC chips (8580, 85180, 85280), set
 120          this to "yes" (option, defaults to "no")
 121
 122vector  - address of the vector latch (aka "intack port") for PA0HZP
 123          cards. There can be only one vector latch for all chips!
 124          (option, defaults to 0)
 125
 126special - address of the special function register on several cards.
 127          (option, defaults to 0)
 128
 129option  - The value you write into that register (option, default is 0)
 130
 131You can specify up to four chips (8 channels). If this is not enough,
 132just change
 133
 134        #define MAXSCC 4
 135
 136to a higher value.
 137
 138Example for the BAYCOM USCC:
 139----------------------------
 140
 141chip    1
 142data_a  0x300                   # data port A
 143ctrl_a  0x304                   # control port A
 144data_b  0x301                   # data port B
 145ctrl_b  0x305                   # control port B
 146irq     5                       # IRQ No. 5 (#)
 147board   BAYCOM                  # hardware type (*)
 148#
 149# SCC chip 2
 150#
 151chip    2
 152data_a  0x302
 153ctrl_a  0x306
 154data_b  0x303
 155ctrl_b  0x307
 156board   BAYCOM
 157
 158An example for a PA0HZP card:
 159-----------------------------
 160
 161chip 1
 162data_a 0x153
 163data_b 0x151
 164ctrl_a 0x152
 165ctrl_b 0x150
 166irq 9
 167pclock 4915200
 168board PA0HZP
 169vector 0x168
 170escc no
 171#
 172#
 173#
 174chip 2
 175data_a 0x157
 176data_b 0x155
 177ctrl_a 0x156
 178ctrl_b 0x154
 179irq 9
 180pclock 4915200
 181board PA0HZP
 182vector 0x168
 183escc no
 184
 185A DRSI would should probably work with this:
 186--------------------------------------------
 187(actually: two DRSI cards...)
 188
 189chip 1
 190data_a 0x303
 1d1/a>data_b 0x1301
 192ctrl_a 0x302
 193ctrl_b 0x300
 194irq 7
 195pclock 4915200
 196board DRSI
 197escc no
 198#
 199#
 200#
 201chip 2
 202data_a 0x313
 203data_b 0x311
 204ctrl_a 0x312
 205ctrl_b 0x310
 206irq 7
 207pclock 4915200
 208board DRSI
 209escc no
 210
 211Note that you cannot use the on-board baudrate generator off DRSI
 212cards. Use "mode dpll" for clock source (see below).
 213
 214This is based on information provided by Mike Bilow (and verified
 215by Paul Helay)
 216
 217The utility "gencfg"
 218--------------------
 219
 220If you only know the parameters for the PE1CHL driver for DOS,
 221run gencfg. It will generate the correct port addresses (I hope).
 222Its parameters are exactly the same as the ones you use with
 223the "attach scc" command in net, except that the string "init" must 
 224not appear. Example:
 225
 226gencfg 2 0x150 4 2 0 1 0x168 9 4915200 
 227
 228will print a skeleton z8530drv.conf for the OptoSCC to stdout.
 229
 230gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10
 231
 232does the same for the BAYCOM USCC card. In my opinion it is much easier
 233to edit scc_config.h... 
 234
 235
 2361.2.2 channel configuration
 237===========================
 238
 239The channel definition is divided into three sub sections for each
 240channel:
 241
 242An example for scc0:
 243
 244# DEVICE
 245
 246device scc0     # the device for the following params
 247
 248# MODEM / BUFFERS
 249
 250speed 1200              # the default baudrate
 251clock dpll              # clock source: 
 252                        #       dpll     = normal half duplex operation
 253                        #       external = MODEM provides own Rx/Tx clock
 254                        #       divider  = use full duplex divider if
 255                        #                  installed (1)
 256mode nrzi               # HDLC encoding mode
 257                        #       nrzi = 1k2 MODEM, G3RUH 9k6 MODEM
 258                        #       nrz  = DF9IC 9k6 MODEM
 259                        #
 260bufsize 384             # size of buffers. Note that this must include
 261                        # the AX.25 header, not only the data field!
 262                        # (optional, defaults to 384)
 263
 264# KISS (Layer 1)
 265
 266txdelay 36              # (see chapter 1.4)
 267persist 64
 268slot    8
 269tail    8
 270fulldup 0
 271wait    12
 272min     3
 273maxkey  7
 274idle    3
 275maxdef  120
 276group   0
 277txoff   off
 278softdcd on                   
 279slip    off
 280
 281The order WITHIN these sections is unimportant. The order OF these
 282sections IS important. The MODEM parameters are set with the first
 283recognized KISS parameter...
 284
 285Please note that you can initialize the board only once after boot
 286(or insmod). You can change all parameters but "mode" and "clock" 
 287later with the Scc="lin progrIRQs orfcumentation/netwoH. Jude
her voidf="Documentation/networking/z8530drv.txt#L287" id="L28" class=="line" name="L28">  28soa href ISurt;gehos haref="Documentation/networking/z8530drv.txt#L234" id="L189" cla2s="line" name="L189"> 182c28 href="Documentation/networking/z8530drv.txt#L250" id="L190" cla2s="line" name="L190"> 192d2ta_a 0(1)iver isf
 1d2/a>da29         prrefletotamete(U)SCC )l genfbe
 192c29         (digitaterll)ones raYou
 192c29         d (1)
 192i29         7
 192p29 href="Documentation/networking/z8530drv.txt#L266" id="L196" cla2s="line" name="L196"> 192b2ard DR2 each chn/nekerna definitibyeds.
 192e29========================
 192#29 href="Documentation/networking/z8530drv.txt#L239" id="L199" cla2s="line" name="L199"> 192#2 203#3 203c3a href="Documentation/networking/z8530drv.txt#L102" id=3L202" cla3s="line" name="L202"> 203d3ta_a 0 all pour e aader, or the initialito
 203d30 href="Documentation/networking/z8530drv.txt#L264" id=3L204" cla3s="line" name="L204"> 203c3        specif" a  # th44.128.ing hw axr, ol0 ca-f="Documentation/networking/z8530drv.txt#L274" id=3L205" cla3s="line" name="L205"> 203c3a href="Documentation/networking/z8530drv.txt#L106" id=3L206" cla3s="line" name="L206"> 203i3q 7
 203p3lock 4t;clect pduDsignlock&quol0 caock&qus is initdoy theload anynIP numbOS,(yet) init="Documentation/networking/z8530drv.txt#L234" id=3L807" cla3s="line" name="L198"> 193b3ard DRa module,nynernel i44.128.0.0Cng/z853hat this musinitdoy the be
t="Documentation/networking/z8530drv.txt#L234" id=3L907" cla3s="line" name="L199"> 193e3cc no
axcc&quoDEM papurposfers.axcc&quo (lw (aslcc&quo) uot;yecreSS TNCamete="Documentation/networking/z8530drv.txt#L234" id=3L210" cla3s="line" name="L210"> 213
3a hrefng/z853cor the me=ke
ther vTTY. Pad 'man fieltion/networknernel i="Documentation/networking/z8530drv.txt#L234" id=3L201" cla3s="line" name="L211"> 213N3te thaaxr,-&quos t;clect ader,-HOWTO it wearnehowvia sfr
meters for the of="Documentation/networking/z8530drv.txt#L280" id=3L212" cla3s="line" name="L212"> 213c3rds. Umetek.25
 213
3a href="Documentation/networking/z8530drv.txt#L214" id=3L214" cla3s="line" name="L214"> 213T3is is nel NOS, NET t;clTFamet="Documentation/networking/z8530drv.txt#L214" id=3L205" cla3s="line" name="L215"> 213b31============================="Documentation/networking/z8530drv.txt#L214" id=3L206" cla3s="line" name="L216"> 213
3a href="Documentation/networking/z8530drv.txt#L217" id=3L217" cla3s="line" name="L217"> 213T3e utilSir bometeTTYfor DOS,ot;inameteTNC emultwork) uotgone init be
="Documentation/networking/z8530drv.txt#L217" id=3L807" cla3s="line" name="L218"> 213-3------scc_multw-board ld beloais.
DEM pacosekernu;ioduleionss orfcusref="Documentation/networking/z8530drv.txt#L107" id=3L219" cla3s="line" name="L219"> 213
3a hrefs musinit work wit be
t;yecomplf cmetek.25
 223I3 you oinit: two DRodule
 223r3n genc
 223I32 href="Documentation/networking/z8530drv.txt#L93" id="3L223" cla3s="line" name="L223"> 223t3        cards.M
 223n3        (optioaxme=kaaol0 ca-15 hre -4 55 4 223
3a href="Documentation/networking/z8530drv.txt#L226" id=3L226" cla3s="line" name="L226"> 223g3ncfg 2Nowvconfig" an inter for cccor thef="Documentation/networking/z8530drv.txt#L225" id=3L217" cla3s="line" name="L227"> 223
3a href="Documentation/networking/z8530drv.txt#L228" id=3L228" cla3s="line" name="L228"> 223w328      specif" a  # 3h44.128.ing hw axr, ol0 ca-f="Documentation/networking/z8530drv.txt#L180" id=3L229" cla3s="line" name="L229"> 223
3a href="Documentation/networking/z8530drv.txt#L230" id=3L230" cla3s="line" name="L230"> 233g3ncfg 2change aparaaxcc&quo a pseudo-TTYf="Documentation/networking/z8530drv.txt#L225" id=3L231" cla3s="line" name="L231"> 233
3a href="Documentation/networking/z8530drv.txt#L232" id=3L232" cla3s="line" name="L232"> 233d332      (optioaxcc&quo /or /ptys0oaxme=k="Documentation/networking/z8530drv.txt#L232" id=3L223" cla3s="line" name="L233"> 233t3a href="Documentation/networking/z8530drv.txt#L134" id=3L234" cla3s="line" name="L234"> 233
3a hreft;clstart c/z85NOS t;clcc&quo /or /ptys0ometfeDEM papworlem uot; mu="Documentation/networking/z8530drv.txt#L134" id=3L205" cla3s="line" name="L235"> 233
3a hrefNOS uotrhrefk wne vect 233132.2 ch(disastionsrmata DAMA port B
 233=3======ation
 233
3a hreft;cloutgoioduf forsuf omttach scxme=ka hrefr cctach sM
 233T33 href="Documentation/networking/z8530drv.txt#L230" id=3L240" cla3s="line" name="L240"> 243c34       this trxecho="Documentation/networking/z8530drv.txt#L230" id=3L231" cla3s="line" name="L241"> 243
3a href="Documentation/networking/z8530drv.txt#L242" id=3L242" cla3s="line" name="L242"> 243A3 exampOrito
 243
3a href="Documentation/networking/z8530drv.txt#L244" id=3L244" cla3s="line" name="L244"> 243#34       specif" a  # 3 hw axr, ol0 ca-f="Documentation/networking/z8530drv.txt#L180" id=3L245" cla3s="line" name="L245"> 243
34             kissbridge  # 3 /or /ptys0="Documentation/networking/z8530drv.txt#L180" id=3L226" cla3s="line" name="L246"> 243d34 href="Documentation/networking/z8530drv.txt#L217" id=3L247" cla3s="line" name="L247"> 243
3a href="Documentation/networking/z8530drv.txt#L248" id=3L248" cla3s="line" name="L248"> 243#3MODEM 3. Adnge
n/nekt;clDisp    pecrs for the="Documentation/networking/z8530drv.txt#L248" id=3L229" cla3s="line" name="L249"> 243
3a href=========
 253s35 href="Documentation/networking/z8530drv.txt#L281" id=3L251" cla3s="line" name="L251"> 253c3ock dp3ng Disp   iodu. InPs for thef="Documentation/networking/z8530drv.txt#L225" id=3L252" cla3s="line" name="L252"> 253 3      
 253 35 href="Documentation/networking/z8530drv.txt#L244" id=3L254" cla3s="line" name="L254"> 253 3      Or boop 2
 253 3      som &qutwostiction providednly oneshx clu;iodulei ogrIRQs orfcuf="Documentation/networking/z8530drv.txt#L225" id=3L226" cla3s="line" name="L256"> 253m35 href="Documentation/networking/z8530drv.txt#L217" id=3L257" cla3s="line" name="L257"> 253 3      dl1bke-u:~$  # qutw  # t="Documentation/networking/z8530drv.txt#L217" id=3L248" cla3s="line" name="L258"> 253 35 href="Documentation/networking/z8530drv.txt#L239" id=3L259" cla3s="line" name="L259"> 253 3      Ps for thef="Documentation/networking/z8530drv.txt#L225" id=3L260" cla3s="line" name="L260"> 263b3a href="Documentation/networking/z8530drv.txt#L161" id=3L261" cla3s="line" name="L261"> 263 3      00          :      
 263 3      36          : 3f="Documentation/networking/z8530drv.txt#L178" id=3L263" cla3s="line" name="L263"> 263
3a href64
 263#3KISS (8
 263
3a href" i
 263t3delay 0
 263p3rsist 12
TeeloriginducLXR on w:r &byt"lin"Documenthttp://s/z8cefolgf.ng/vrrojects/lxh">LXR in munity ,) esedexperin/netlxh@me=ux.no .
lxh.me=ux.noekinday)hosw dabyt"Documenthttp://www.Sa pill-me=rro.no">Ra pillnLe=rro AS ,)s ovidrr ernLe=ux cone)