MCA UART serial port
The MCA implements a UART in its firmware (starting from firmware version 1.1). When enabled, the serial port is listed as /dev/ttyMCA0. The configuration options are limited to:
- Baud rates: from 1200 up to 230400 bps. Note that the throughput is limited by the I2C bus speed (100 KHz) so, for higher baudrates than 9600, flow control is recommended.
- Parity: none, even, or odd.
- Stop Bits: 1 or 2.
- Hardware flow-control through CTS and RTS lines.
The RX and TX lines are fixed into MCA_IO1 and MCA_IO2 respectively but the optional RTS and CTS lines can be configured in any other GPIO-capable MCA line through the device tree binding.
Note Manual handling of the RTS and CTS lines through standard TIOCMGET and TIOCMSET ioctls is not supported.
Kernel configuration
Kernel configuration |
CONFIG_SERIAL_MCA_CC6UL |
Kernel driver |
drivers/tty/serial/mca-cc6ul-uart.c |
Device tree binding |
Documentation/devicetree/bindings/serial/digi,mca-cc6ul-uart.txt |
Power management
The MCA UART is capable of waking the system from suspend and from power-off states.
Wake from suspend
To allow the MCA UART to resume the system from suspend when a character is received (and not losing data), run the following command:
root@ccimx6ulsbc:~# echo enabled > /sys/class/tty/ttyMCA0/power/wakeup
CAUTION! An application must be reading from the device or the system will not wake up when a character is received.
Power on the system
To allow the MCA UART to power on the system, you can execute the following command:
root@ccimx6ulsbc:~# echo enabled > /sys/class/tty/ttyMCA0/power_extra_opts/power_on_rx
In this case there is no need for the port to be open. The UART remains with the latest configuration regarding baud rate, parity, and stop bits.
Note This setting does not persist across reset or power cycles, so you must enable it each time.