]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
serial: amba-pl011: Add Tegra264 UART support
authorKartik Rajput <kkartik@nvidia.com>
Wed, 25 Feb 2026 06:59:13 +0000 (12:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2026 14:06:39 +0000 (15:06 +0100)
Add support for the NVIDIA Tegra264 UART controller, which is derived
from the AMBA PL011 design.

On Tegra264, the fractional baud rate divisor (FBRD) register is broken.
Using IBRD alone may not achieve the required baud rate
tolerance. Enable the skip_ibrd_fbrd and set_uartclk_rate flags for
the NVIDIA variant.

Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Link: https://patch.msgid.link/20260225065915.341522-4-kkartik@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c

index e12facb2a16a4b745bdebace84e827da3d3d3ad6..b604274c17910d76612530e0022bceec568a88ca 100644 (file)
@@ -218,6 +218,28 @@ static struct vendor_data vendor_st = {
        .get_fifosize           = get_fifosize_st,
 };
 
+static unsigned int get_fifosize_nvidia(struct amba_device *dev)
+{
+       return 32;
+}
+
+static struct vendor_data vendor_nvidia = {
+       .reg_offset             = pl011_std_offsets,
+       .ifls                   = UART011_IFLS_RX4_8 | UART011_IFLS_TX4_8,
+       .fr_busy                = UART01x_FR_BUSY,
+       .fr_dsr                 = UART01x_FR_DSR,
+       .fr_cts                 = UART01x_FR_CTS,
+       .fr_ri                  = UART011_FR_RI,
+       .oversampling           = false,
+       .dma_threshold          = false,
+       .cts_event_workaround   = false,
+       .always_enabled         = false,
+       .fixed_options          = false,
+       .skip_ibrd_fbrd         = true,
+       .set_uartclk_rate       = true,
+       .get_fifosize           = get_fifosize_nvidia,
+};
+
 /* Deals with DMA transactions */
 
 struct pl011_dmabuf {
@@ -3144,6 +3166,11 @@ static const struct amba_id pl011_ids[] = {
                .mask   = 0x00ffffff,
                .data   = &vendor_st,
        },
+       {
+               .id     = 0x0006b011,
+               .mask   = 0x000fffff,
+               .data   = &vendor_nvidia,
+       },
        { 0, 0 },
 };