Apalis T30 - disabling DMA on UART

I have several UART applications that work when compiled for a PC and another embedded system, but do not work on Apalis T30. I strongly suspect that UART timing is part of the problem, likely due to DMA. How do I disable DMA for UARTS in mainline Linux 4.14.y?

I tried this in the device tree, but it didn’t work:

	serial@70006000 {
		status = "okay";
	};

	serial@70006040 {
		status = "okay";
	 	compatible = "nvidia,tegra20-hsuart";
	};

	serial@70006200 {
		status = "okay";
		compatible = "nvidia,tegra20-hsuart";
	};

	serial@70006300 {
		status = "okay";
		compatible = "nvidia,tegra20-hsuart";
	};

I think it should be done like this? But then /dev/ttyS1 doesn’t work as expected? Or maybe only DMA mode is supported for ttyS1,2,3?

diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
index 07b945b..03715e1 100644
--- a/arch/arm/boot/dts/tegra30-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra30-apalis-eval.dts
@@ -55,17 +55,14 @@
 	};
 
 	serial@70006040 {
-		compatible = "nvidia,tegra30-hsuart";
 		status = "okay";
 	};
 
 	serial@70006200 {
-		compatible = "nvidia,tegra30-hsuart";
 		status = "okay";
 	};
 
 	serial@70006300 {
-		compatible = "nvidia,tegra30-hsuart";
 		status = "okay";
 	};

removing compatible = “nvidia,tegra30-hsuart”; in the device tree seems to work, for ttyS2,ttyS3.

I think I have a second problem. Now I need to disable RTS/CTS for ttyS1?

My problem is I can’t get /dev/ttyS1 to work with mainline. The other three serial ports work. I disabled the TEGRA-SOC uart, and removed the high speed uart from device tree.

4.526730] console [ttyS0] disabled
[    4.526816] 70006000.serial: ttyS0 at MMIO 0x70006000 (irq = 75, base_baud = 25500000) is a Tegra
[    5.994185] console [ttyS0] enabled
[    5.998736] 70006040.serial: ttyS1 at MMIO 0x70006040 (irq = 76, base_baud = 25500000) is a Tegra
[    6.008684] 70006200.serial: ttyS2 at MMIO 0x70006200 (irq = 77, base_baud = 25500000) is a Tegra
[    6.019270] 70006300.serial: ttyS3 at MMIO 0x70006300 (irq = 78, base_baud = 25500000) is a Tegra

Something is different about ttyS1. If I try to access it: stty -raw 115200 < /dev/ttyS1 it just crashes lockup. Same thing if I try to use it in any way. If I try
screen /dev/ttyS1 115200 I just get /dev/null/utmp: not a directory followed by a crash.

cat /proc/tty/drivers:

/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster
acm                  /dev/ttyACM   166 0-255 serial
serial               /dev/ttyS       4 64-67 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
unknown              /dev/tty        4 1-63 console

Removing compatible = “nvidia,tegra30-hsuart”; from the device tree, and then disabling NVIDIA SOC serial controller CONFIG_SERIAL_TEGRA disables the tegra DMA implementation. Then you can use /dev/ttyS0 through /dev/ttyS3 to access the serial ports. With DMA enabled, they are /dev/ttyTHS0 through /dev/ttyTHS3.

However, I’ve found that one uart /dev/ttyS1 (MXM134,MXM136) does not work and crashes the system. I will open a new ticket for that.

Yeah, just removing any hsuart compatible from the device tree should do it.