-
Support Model List:
- V2403C-KL1-T
- V2403C-KL3-T
- V2403C-KL5-T
- V2403C-KL7-T
-
Support Linux Dist:
-
Necessary drivers for controlling Super IO:
- moxa-it87-serial-driver
- moxa-it87-gpio-driver
- moxa-it87-wdt-driver
- For Debian 9 (kernel ver < 4.19): moxa-it87-wdt-driver(4.9.x)
After make && make install
the upon drivers,
please run depmod -a
command to generate modules.dep and map files in /lib/modules/version.
UART modes are controled by 3 gpio pins and it87_serial:
- Super IO (IT8786) PIN table
Device Node | GPIO#0 | GPIO#1 | GPIO#2 | it87_serial |
---|---|---|---|---|
/dev/ttyS0 | GP14 | GP11 | GP12 | 1 |
/dev/ttyS1 | GP30 | GP15 | GP16 | 2 |
/dev/ttyS2 | GP36 | GP32 | GP33 | 3 |
/dev/ttyS3 | GP50 | GP37 | GP47 | 4 |
- GPIO value of UART modes
UART mode | GPIO#0 | GPIO#1 | GPIO#2 | it87_serial |
---|---|---|---|---|
RS232 | 1 | 0 | 0 | 0 |
RS485-2W | 0 | 1 | 0 | 1 |
RS422/RS485-4W | 0 | 0 | 1 | 1 |
-
Example code
- select port 1 (/dev/ttyS0) as RS232 mode
mx-gpio-ctl set 14 1 mx-gpio-ctl set 11 0 mx-gpio-ctl set 12 0 echo 0 > /sys/class/misc/it87_serial/serial1/serial1_rs485
- select port 2 (/dev/ttyS1) as RS485-2W mode
mx-gpio-ctl set 30 0 mx-gpio-ctl set 15 1 mx-gpio-ctl set 16 0 echo 1 > /sys/class/misc/it87_serial/serial2/serial2_rs485
- get port 2 (/dev/ttyS1) mode
mx-gpio-ctl get 30 mx-gpio-ctl get 15 mx-gpio-ctl get 16 cat /sys/class/misc/it87_serial/serial2/serial2_rs485
Result:
0 1 0 1
Then look up the table, port 2 is on RS485-2W mode.
- Super IO (IT8786) PIN table
DIO index | GPIO PIN |
---|---|
DI 0 | GP70 |
DI 1 | GP71 |
DI 2 | GP72 |
DI 3 | GP73 |
DO 0 | GP74 |
DO 1 | GP75 |
DO 2 | GP76 |
DO 3 | GP77 |
- Example code
- set DO 0 value as low:
mx-gpio-ctl set 74 0
- get DI 0 value:
mx-gpio-ctl get 70
- set DO 0 value as low:
- Set GPIO Low = Power off
- Set GPIO High = Power on
MPCIE PWR CTL | GPIO PIN |
---|---|
mPCIe Slot #1 | GP81 |
mPCIe Slot #2 | GP83 |
- Example code
- Power on slot #1:
mx-gpio-ctl set 81 1
- Power off slot #1:
mx-gpio-ctl set 81 0
- Get power status on slot #1:
mx-gpio-ctl get 81
- Power on slot #1:
Default status is on Side A (value high)
- Set GPIO High = Select Side A on SIM Slot
- Set GPIO Low = Select Side B on SIM Slot
MPCIE PWR CTL | GPIO PIN |
---|---|
SIM Slot #1 | GP80 |
SIM Slot #2 | GP82 |
- Example code
- Select Slot (Side) A on Slot 1:
mx-gpio-ctl set 80 1
- Select Slot (Side) B on Slot 1:
mx-gpio-ctl set 80 0
- Get Slot (Side) on Slot 1:
mx-gpio-ctl get 80
- Get Slot (Side) on Slot 2:
mx-gpio-ctl get 82
- Select Slot (Side) A on Slot 1:
LAN Slot | NIC | renamed NIC |
---|---|---|
LAN #1 | eth0 | enp0s31f6 |
LAN #2 | eth1 | enp6s0 |
LAN #3 | eth2 | enp7s0 |
LAN #4 | eth3 | enp8s0 |
https://github.com/Moxa-Linux/moxa-it87-power-igtd
- Build
moxa-it87-wdt-driver
on your host
- Edit
/lib/modprobe.d/watchdog.conf
# timeout:Watchdog timeout in seconds, default=60 (int)
# nowayout:Watchdog cannot be stopped once started, default=0 (bool)
options it87_wdt nowayout=1 timeout=60
- Edit
/lib/modprobe.d/iTCO-blacklist.conf
blacklist iTCO_wdt
blacklist iTCO_vendor_support
- First edit the /etc/default/grub file as root and then add nmi_watchdog=0 to the line starting with GRUB_CMDLINE_LINUX_DEFAULT
GRUB_CMDLINE_LINUX_DEFAULT="nmi_watchdog=0"
- After adding the kernel parameter, don't forget to update the GRUB
sudo update-grub
- Install package
sudo apt-get update
sudo apt-get install watchdog
- Edit
/etc/default/watchdog
# Start watchdog at boot time? 0 or 1
run_watchdog=1
# Start wd_keepalive after stopping watchdog? 0 or 1
run_wd_keepalive=0
# Load module before starting watchdog
watchdog_module="it87_wdt"
# Specify additional watchdog options here (see manpage).
- Add device node to config, edit
/etc/watchdog.conf
watchdog-device = /dev/watchdog
https://github.com/torvalds/linux/tree/master/tools/testing/selftests/watchdog
- Line out audio port: Support 'output modes' only
- Line in audio port: Support 'output modes' & 'input modes'
-
output modes
- LINE_OUT="0x01014010"
- SPEAKER="0x90170150"
- HEADPHONE="0x02211010"
-
input modes
- LINE_IN="0x02811020"
- MICROPHONE="0x03a19020"
# This file was added by the program 'mx-audio-retask'.
# If you want to revert the changes made by this program, you can simply erase this file and reboot your computer.
options snd-hda-intel patch=mx-audio-retask.fw
[codec]
0x10ec0888 0x00000000 0
[pincfg]
0x14 0x02211010
0x18 0x03a19020