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.

Manual handling of the RTS and CTS lines through standard TIOCMGET and TIOCMSET ioctls is not supported.

Kernel configuration

You can manage the MCA UART driver support through the following kernel configuration option:

  • Digi ConnectCore 6UL Micro Controller Assist assist UART (CONFIG_SERIAL_MCA_CC6UL)

This option is enabled as built-in on the default ConnectCore 6UL kernel configuration file.

Kernel driver

The MCA UART driver is located at:

File Description

drivers/tty/serial/mca-cc6ul-uart.c

UART driver for MCA devices

Device tree bindings and customization

The MCA UART device tree binding is documented at Documentation/devicetree/bindings/serial/digi,mca-cc6ul-uart.txt.

Example: MCA UART on the ConnectCore 6UL SBC Pro

UART controller inside the MCA

ConnectCore 6UL device tree
mca_cc6ul: mca@7e {

	...

	mca_uart: uart {
		compatible = "digi,mca-cc6ul-uart";
		status = "disabled";
	};
};

MCA UART enabling

ConnectCore 6UL SBC Pro device tree
/*
 * Uncomment to enable MCA UART:
 *  - MCA_IO1 (TX)
 *  - MCA_IO2 (RX)
 */
&mca_uart {
	status = "okay";

	/* Uncomment to enable CTS and/or RTS in any MCA GPIO-capable line */
	//rts-pin = <3>;
	//cts-pin = <5>;
};

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:

~# echo enabled > /sys/class/tty/ttyMCA0/power/wakeup
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:

~# 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.

This setting does not persist across reset or power cycles, so you must enable it each time.