3.6.3.4. PRU-ICSS Serial UART

Introduction

Linux supports the PRU HW UART peripheral within the Programmable Real-Time Unit Subsystem and Industrial Communication Subsystem (PRU-ICSS), which is based on the industry standard TL16C550.

The kernel driver is at drivers/tty/serial/8250/8250_pruss.c.

Supported Driver Features

  • Baud rates up to 12Mbps

  • Hardware flow control

Unsupported Driver Features

  • DMA support

Kernel Config

The PRUSS UART Linux kernel driver depends on the PRU-ICSS kernel drivers. So the following kernel Kconfig options should be enabled to use the PRUSS UART module.

Device Drivers  --->
   SOC (System On Chip) specific Drivers  --->
      [*] TI SOC drivers support  --->
         <M> TI PRU-ICSS Subsystem Platform drivers

Device Drivers  --->
   IRQ chip support  --->
      <M> TI PRU-ICSS Interrupt Controller

Device Drivers  --->
   Character devices  --->
      Serial drivers  --->
         <M> TI PRU-ICSS UART support

Example DT configuration

From am335x-evmsk.dts

&pruss_uart {
   prus = <&pru0>;
   ti,pru-interrupt-map = <0 6 2 2>;
   pinctrl-names = "default";
   pinctrl-0 = <&prussuart_pins>;
   status = "okay";
};

Driver Usage

Once the driver is probed, kernel log shows the following message.

[   28.617700] 4a328000.serial: ttyS1 at MMIO 0x4a328000 (irq = 77, base_baud = 12000000) is a 16550A

Therefore the device node /dev/ttyS1 is associated with PRUSS UART and user-space applications can read/write to this serial port. For details, please refer to kernel uart driver usage.

Note

The index in ttyS1 could vary depending on the serial alias configuration in the device tree.

Note

PRU cores do not need to be initialized in order for Linux to use the HW UART.