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";
};
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.
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.