NVIDIA Tegra20/Tegra30 high speed (DMA based) UART controller driver

Schema identifier ($id): "http://devicetree.org/schemas/serial/nvidia,tegra20-hsuart.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Thierry Reding <thierry.reding@gmail.com>", "Jon Hunter <jonathanh@nvidia.com>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "nvidia,tegra20-hsuart", "nvidia,tegra30-hsuart", "nvidia,tegra186-hsuart", "nvidia,tegra194-hsuart"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "nvidia,tegra124-hsuart"

Item 2

Exact value (const): "nvidia,tegra30-hsuart"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Array item rules (items) #

Item 1

module clock

resets — required here #

Array item rules (items) #

Item 1

module reset

reset-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "serial"

dmas — required here #

Array item rules (items) #

Item 1

DMA channel used for reception

Item 2

DMA channel used for transmission

dma-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "rx"

Item 2

Exact value (const): "tx"

nvidia,enable-modem-interrupt — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

Enable modem interrupts. Should be enable only if all 8 lines of UART controller are pinmuxed.

nvidia,adjust-baud-rates — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-matrix

List of entries providing percentage of baud rate adjustment within a range. Each entry contains a set of 3 values: range low/high and adjusted rate. When the baud rate set on the controller falls within the range mentioned in this field, the baud rate will be adjusted by percentage mentioned here.

Example: <9600 115200 200>

Increase baud rate by 2% when set baud rate falls within range 9600 to 115200.

Standard UART devices are expected to have tolerance for baud rate error by -4 to +4 %. All Tegra devices till Tegra210 had this support. However, Tegra186 chip has a known hardware issue. UART RX baud rate tolerance level is 0% to +4% in 1-stop config. Otherwise, the received data will have corruption/invalid framing errors. Parker errata suggests adjusting baud rate to be higher than the deviations observed in TX.

TX deviation of connected device can be captured over scope (or noted from its spec) for valid range and Tegra baud rate has to be set above actual TX baud rate observed. To do this we use nvidia,adjust-baud-rates.

As an example, consider there is deviation observed in TX for baud rates as listed below. 0 to 9600 has 1% deviation 9600 to 115200 2% deviation. This slight deviation is expected and Tegra UART is expected to handle it. Due to the issue stated above, baud rate on Tegra UART should be set equal to or above deviation observed for avoiding frame errors. Property should be set like this:

  nvidia,adjust-baud-rates = <0 9600 100>,
                             <9600 115200 200>;

Array item rules (items) #

Array item rules (items)

Item 1

range lower bound

Item 2

range upper bound

Item 3

adjustment (in permyriad, i.e. 0.01%)

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "resets", "reset-names", "dmas", "dma-names"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): serial.yaml

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/tegra30-car.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

serial@70006000 {
    compatible = "nvidia,tegra30-hsuart";
    reg = <0x70006000 0x40>;
    interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
    nvidia,enable-modem-interrupt;
    clocks = <&tegra_car TEGRA30_CLK_UARTA>;
    resets = <&tegra_car 6>;
    reset-names = "serial";
    dmas = <&apbdma 8>, <&apbdma 8>;
    dma-names = "rx", "tx";
    nvidia,adjust-baud-rates = <1000000 4000000 136>; /* 1.36% shift */
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page