DART-6UL UART

From Variscite Wiki
DART-6UL - External UART

Test

By default, Variscite configured UART1, ttymxc2. to test:

Use minicom to connect.
Set the serial to ttymxc2.
You can use a loopback or connect to anther computer.
The pin's are coming out from J9 connector.

Example: configure UART4, ttymxc3

In the kernel source code, edit the following device tree file:
arch/arm/boot/dts/imx6ul-imx6ull-var-dart-common.dtsi
(In earlier releases the file is named: arch/arm/boot/dts/imx6ul-var-dart.dtsi)

Look for:

/* ttymxc2 UART */
&uart3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart3>;
	fsl,uart-has-rtscts;
	status = "okay";
};

Duplicate it and change the name and the pinctrl name. For Example:

&uart4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart4>;
	fsl,uart-has-rtscts;
	status = "okay";
};

Duplicate the corresponding pinctrl. Copy :

		pinctrl_uart2: uart2grp {
			fsl,pins = <
				MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX	0x1b0b1
				MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX	0x1b0b1
				MX6UL_PAD_UART2_CTS_B__UART2_DCE_CTS	0x1b0b1
				MX6UL_PAD_UART2_RTS_B__UART2_DCE_RTS	0x1b0b1
			>;
		};

Into:

		pinctrl_uart4: uart4grp {
			fsl,pins = <
                                MX6UL_PAD_UART4_TX_DATA__UART4_DCE_TX   0x1b0b1
                                MX6UL_PAD_UART4_RX_DATA__UART4_DCE_RX   0x1b0b1
				MX6UL_PAD_ENET1_RX_DATA1__UART4_DCE_CTS	0x1b0b1
				MX6UL_PAD_ENET1_RX_DATA0__UART4_DCE_RTS	0x1b0b1
			>;
		};

Note: The pins here were set arbitrarily. You should set them based on your hardware design, and make sure they are not conflicting with other devices in the device tree.

Continue following the "Build Linux from source code" guide to build only the device trees and to copy them to your SD card.