xref: /linux/Documentation/driver-api/tty/moxa-smartio.rst (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1*5b437ae9SJiri Slaby=============================================================
2*5b437ae9SJiri SlabyMOXA Smartio/Industio Family Device Driver Installation Guide
3*5b437ae9SJiri Slaby=============================================================
4*5b437ae9SJiri Slaby
5*5b437ae9SJiri SlabyCopyright (C) 2008, Moxa Inc.
6*5b437ae9SJiri SlabyCopyright (C) 2021, Jiri Slaby
7*5b437ae9SJiri Slaby
8*5b437ae9SJiri Slaby.. Content
9*5b437ae9SJiri Slaby
10*5b437ae9SJiri Slaby   1. Introduction
11*5b437ae9SJiri Slaby   2. System Requirement
12*5b437ae9SJiri Slaby   3. Installation
13*5b437ae9SJiri Slaby      3.1 Hardware installation
14*5b437ae9SJiri Slaby      3.2 Device naming convention
15*5b437ae9SJiri Slaby   4. Utilities
16*5b437ae9SJiri Slaby   5. Setserial
17*5b437ae9SJiri Slaby   6. Troubleshooting
18*5b437ae9SJiri Slaby
19*5b437ae9SJiri Slaby1. Introduction
20*5b437ae9SJiri Slaby^^^^^^^^^^^^^^^
21*5b437ae9SJiri Slaby
22*5b437ae9SJiri Slaby   The Smartio/Industio/UPCI family Linux driver supports following multiport
23*5b437ae9SJiri Slaby   boards:
24*5b437ae9SJiri Slaby
25*5b437ae9SJiri Slaby    - 2 ports multiport board
26*5b437ae9SJiri Slaby	CP-102U, CP-102UL, CP-102UF
27*5b437ae9SJiri Slaby	CP-132U-I, CP-132UL,
28*5b437ae9SJiri Slaby	CP-132, CP-132I, CP132S, CP-132IS,
29*5b437ae9SJiri Slaby	(CP-102, CP-102S)
30*5b437ae9SJiri Slaby
31*5b437ae9SJiri Slaby    - 4 ports multiport board
32*5b437ae9SJiri Slaby	CP-104EL,
33*5b437ae9SJiri Slaby	CP-104UL, CP-104JU,
34*5b437ae9SJiri Slaby	CP-134U, CP-134U-I,
35*5b437ae9SJiri Slaby	C104H/PCI, C104HS/PCI,
36*5b437ae9SJiri Slaby	CP-114, CP-114I, CP-114S, CP-114IS, CP-114UL,
37*5b437ae9SJiri Slaby	(C114HI, CT-114I),
38*5b437ae9SJiri Slaby	POS-104UL,
39*5b437ae9SJiri Slaby	CB-114,
40*5b437ae9SJiri Slaby	CB-134I
41*5b437ae9SJiri Slaby
42*5b437ae9SJiri Slaby    - 8 ports multiport board
43*5b437ae9SJiri Slaby	CP-118EL, CP-168EL,
44*5b437ae9SJiri Slaby	CP-118U, CP-168U,
45*5b437ae9SJiri Slaby	C168H/PCI,
46*5b437ae9SJiri Slaby	CB-108
47*5b437ae9SJiri Slaby
48*5b437ae9SJiri Slaby   If a compatibility problem occurs, please contact Moxa at
49*5b437ae9SJiri Slaby   support@moxa.com.tw.
50*5b437ae9SJiri Slaby
51*5b437ae9SJiri Slaby   In addition to device driver, useful utilities are also provided in this
52*5b437ae9SJiri Slaby   version. They are:
53*5b437ae9SJiri Slaby
54*5b437ae9SJiri Slaby    - msdiag
55*5b437ae9SJiri Slaby		 Diagnostic program for displaying installed Moxa
56*5b437ae9SJiri Slaby                 Smartio/Industio boards.
57*5b437ae9SJiri Slaby    - msmon
58*5b437ae9SJiri Slaby		 Monitor program to observe data count and line status signals.
59*5b437ae9SJiri Slaby    - msterm     A simple terminal program which is useful in testing serial
60*5b437ae9SJiri Slaby	         ports.
61*5b437ae9SJiri Slaby
62*5b437ae9SJiri Slaby   All the drivers and utilities are published in form of source code under
63*5b437ae9SJiri Slaby   GNU General Public License in this version. Please refer to GNU General
64*5b437ae9SJiri Slaby   Public License announcement in each source code file for more detail.
65*5b437ae9SJiri Slaby
66*5b437ae9SJiri Slaby   In Moxa's Web sites, you may always find the latest driver at
67*5b437ae9SJiri Slaby   https://www.moxa.com/.
68*5b437ae9SJiri Slaby
69*5b437ae9SJiri Slaby   This version of driver can be installed as a Loadable Module (Module driver)
70*5b437ae9SJiri Slaby   or built-in into kernel (Static driver). Before you install the driver,
71*5b437ae9SJiri Slaby   please refer to hardware installation procedure in the User's Manual.
72*5b437ae9SJiri Slaby
73*5b437ae9SJiri Slaby   We assume the user should be familiar with following documents:
74*5b437ae9SJiri Slaby
75*5b437ae9SJiri Slaby   - Serial-HOWTO
76*5b437ae9SJiri Slaby   - Kernel-HOWTO
77*5b437ae9SJiri Slaby
78*5b437ae9SJiri Slaby2. System Requirement
79*5b437ae9SJiri Slaby^^^^^^^^^^^^^^^^^^^^^
80*5b437ae9SJiri Slaby
81*5b437ae9SJiri Slaby   - Maximum 4 boards can be installed in combination
82*5b437ae9SJiri Slaby
83*5b437ae9SJiri Slaby3. Installation
84*5b437ae9SJiri Slaby^^^^^^^^^^^^^^^
85*5b437ae9SJiri Slaby
86*5b437ae9SJiri Slaby3.1 Hardware installation
87*5b437ae9SJiri Slaby=========================
88*5b437ae9SJiri Slaby
89*5b437ae9SJiri SlabyPCI/UPCI board
90*5b437ae9SJiri Slaby--------------
91*5b437ae9SJiri Slaby
92*5b437ae9SJiri Slaby   You may need to adjust IRQ usage in BIOS to avoid IRQ conflict with other
93*5b437ae9SJiri Slaby   ISA devices. Please refer to hardware installation procedure in User's
94*5b437ae9SJiri Slaby   Manual in advance.
95*5b437ae9SJiri Slaby
96*5b437ae9SJiri SlabyPCI IRQ Sharing
97*5b437ae9SJiri Slaby---------------
98*5b437ae9SJiri Slaby
99*5b437ae9SJiri Slaby   Each port within the same multiport board shares the same IRQ. Up to
100*5b437ae9SJiri Slaby   4 Moxa Smartio/Industio PCI Family multiport boards can be installed
101*5b437ae9SJiri Slaby   together on one system and they can share the same IRQ.
102*5b437ae9SJiri Slaby
103*5b437ae9SJiri Slaby
104*5b437ae9SJiri Slaby
105*5b437ae9SJiri Slaby3.2 Device naming convention
106*5b437ae9SJiri Slaby============================
107*5b437ae9SJiri Slaby
108*5b437ae9SJiri Slaby   The device node is named "ttyMxx".
109*5b437ae9SJiri Slaby
110*5b437ae9SJiri SlabyDevice naming when more than 2 boards installed
111*5b437ae9SJiri Slaby-----------------------------------------------
112*5b437ae9SJiri Slaby
113*5b437ae9SJiri Slaby   Naming convention for each Smartio/Industio multiport board is
114*5b437ae9SJiri Slaby   pre-defined as below.
115*5b437ae9SJiri Slaby
116*5b437ae9SJiri Slaby   ============ ===============
117*5b437ae9SJiri Slaby   Board Num.	Device node
118*5b437ae9SJiri Slaby   1st board	ttyM0  - ttyM7
119*5b437ae9SJiri Slaby   2nd board	ttyM8  - ttyM15
120*5b437ae9SJiri Slaby   3rd board	ttyM16 - ttyM23
121*5b437ae9SJiri Slaby   4th board	ttyM24 - ttyM31
122*5b437ae9SJiri Slaby   ============ ===============
123*5b437ae9SJiri Slaby
124*5b437ae9SJiri Slaby4. Utilities
125*5b437ae9SJiri Slaby^^^^^^^^^^^^
126*5b437ae9SJiri Slaby
127*5b437ae9SJiri Slaby   There are 3 utilities contained in this driver. They are msdiag, msmon and
128*5b437ae9SJiri Slaby   msterm. These 3 utilities are released in form of source code. They should
129*5b437ae9SJiri Slaby   be compiled into executable file and copied into /usr/bin.
130*5b437ae9SJiri Slaby
131*5b437ae9SJiri Slabymsdiag - Diagnostic
132*5b437ae9SJiri Slaby===================
133*5b437ae9SJiri Slaby
134*5b437ae9SJiri Slaby   This utility provides the function to display what Moxa Smartio/Industio
135*5b437ae9SJiri Slaby   board was found by the driver in the system.
136*5b437ae9SJiri Slaby
137*5b437ae9SJiri Slabymsmon - Port Monitoring
138*5b437ae9SJiri Slaby=======================
139*5b437ae9SJiri Slaby
140*5b437ae9SJiri Slaby   This utility gives the user a quick view about all the MOXA ports'
141*5b437ae9SJiri Slaby   activities. One can easily learn each port's total received/transmitted
142*5b437ae9SJiri Slaby   (Rx/Tx) character count since the time when the monitoring is started.
143*5b437ae9SJiri Slaby
144*5b437ae9SJiri Slaby   Rx/Tx throughputs per second are also reported in interval basis (e.g.
145*5b437ae9SJiri Slaby   the last 5 seconds) and in average basis (since the time the monitoring
146*5b437ae9SJiri Slaby   is started). You can reset all ports' count by <HOME> key. <+> <->
147*5b437ae9SJiri Slaby   (plus/minus) keys to change the displaying time interval. Press <ENTER>
148*5b437ae9SJiri Slaby   on the port, that cursor stay, to view the port's communication
149*5b437ae9SJiri Slaby   parameters, signal status, and input/output queue.
150*5b437ae9SJiri Slaby
151*5b437ae9SJiri Slabymsterm - Terminal Emulation
152*5b437ae9SJiri Slaby===========================
153*5b437ae9SJiri Slaby
154*5b437ae9SJiri Slaby   This utility provides data sending and receiving ability of all tty ports,
155*5b437ae9SJiri Slaby   especially for MOXA ports. It is quite useful for testing simple
156*5b437ae9SJiri Slaby   application, for example, sending AT command to a modem connected to the
157*5b437ae9SJiri Slaby   port or used as a terminal for login purpose. Note that this is only a
158*5b437ae9SJiri Slaby   dumb terminal emulation without handling full screen operation.
159*5b437ae9SJiri Slaby
160*5b437ae9SJiri Slaby5. Setserial
161*5b437ae9SJiri Slaby^^^^^^^^^^^^
162*5b437ae9SJiri Slaby
163*5b437ae9SJiri Slaby   Supported Setserial parameters are listed as below.
164*5b437ae9SJiri Slaby
165*5b437ae9SJiri Slaby   ============== =============================================================
166*5b437ae9SJiri Slaby   uart		  set UART type(16450 --> disable FIFO, 16550A --> enable FIFO)
167*5b437ae9SJiri Slaby   close_delay	  set the amount of time (in 1/100 of a second) that DTR
168*5b437ae9SJiri Slaby		  should be kept low while being closed.
169*5b437ae9SJiri Slaby   closing_wait   set the amount of time (in 1/100 of a second) that the
170*5b437ae9SJiri Slaby		  serial port should wait for data to be drained while
171*5b437ae9SJiri Slaby		  being closed, before the receiver is disabled.
172*5b437ae9SJiri Slaby   spd_hi	  Use 57.6kb when the application requests 38.4kb.
173*5b437ae9SJiri Slaby   spd_vhi	  Use 115.2kb when the application requests 38.4kb.
174*5b437ae9SJiri Slaby   spd_shi	  Use 230.4kb when the application requests 38.4kb.
175*5b437ae9SJiri Slaby   spd_warp	  Use 460.8kb when the application requests 38.4kb.
176*5b437ae9SJiri Slaby   spd_normal	  Use 38.4kb when the application requests 38.4kb.
177*5b437ae9SJiri Slaby   spd_cust	  Use the custom divisor to set the speed when the
178*5b437ae9SJiri Slaby		  application requests 38.4kb.
179*5b437ae9SJiri Slaby   divisor	  This option sets the custom division.
180*5b437ae9SJiri Slaby   baud_base	  This option sets the base baud rate.
181*5b437ae9SJiri Slaby   ============== =============================================================
182*5b437ae9SJiri Slaby
183*5b437ae9SJiri Slaby6. Troubleshooting
184*5b437ae9SJiri Slaby^^^^^^^^^^^^^^^^^^
185*5b437ae9SJiri Slaby
186*5b437ae9SJiri Slaby   The boot time error messages and solutions are stated as clearly as
187*5b437ae9SJiri Slaby   possible. If all the possible solutions fail, please contact our technical
188*5b437ae9SJiri Slaby   support team to get more help.
189*5b437ae9SJiri Slaby
190*5b437ae9SJiri Slaby
191*5b437ae9SJiri Slaby   Error msg:
192*5b437ae9SJiri Slaby	      More than 4 Moxa Smartio/Industio family boards found. Fifth board
193*5b437ae9SJiri Slaby              and after are ignored.
194*5b437ae9SJiri Slaby
195*5b437ae9SJiri Slaby   Solution:
196*5b437ae9SJiri Slaby   To avoid this problem, please unplug fifth and after board, because Moxa
197*5b437ae9SJiri Slaby   driver supports up to 4 boards.
198