| .. | .. |
|---|
| 1 | 1 | NVIDIA Tegra20/Tegra30 high speed (DMA based) UART controller driver. |
|---|
| 2 | 2 | |
|---|
| 3 | 3 | Required properties: |
|---|
| 4 | | -- compatible : should be "nvidia,tegra30-hsuart", "nvidia,tegra20-hsuart". |
|---|
| 4 | +- compatible : should be, |
|---|
| 5 | + "nvidia,tegra20-hsuart" for Tegra20, |
|---|
| 6 | + "nvidia,tegra30-hsuart" for Tegra30, |
|---|
| 7 | + "nvidia,tegra186-hsuart" for Tegra186, |
|---|
| 8 | + "nvidia,tegra194-hsuart" for Tegra194. |
|---|
| 9 | + |
|---|
| 5 | 10 | - reg: Should contain UART controller registers location and length. |
|---|
| 6 | 11 | - interrupts: Should contain UART controller interrupts. |
|---|
| 7 | 12 | - clocks: Must contain one entry, for the module clock. |
|---|
| .. | .. |
|---|
| 19 | 24 | Optional properties: |
|---|
| 20 | 25 | - nvidia,enable-modem-interrupt: Enable modem interrupts. Should be enable |
|---|
| 21 | 26 | only if all 8 lines of UART controller are pinmuxed. |
|---|
| 27 | +- nvidia,adjust-baud-rates: List of entries providing percentage of baud rate |
|---|
| 28 | + adjustment within a range. |
|---|
| 29 | + Each entry contains sets of 3 values. Range low/high and adjusted rate. |
|---|
| 30 | + <range_low range_high adjusted_rate> |
|---|
| 31 | + When baud rate set on controller falls within the range mentioned in this |
|---|
| 32 | + field, baud rate will be adjusted by percentage mentioned here. |
|---|
| 33 | + Ex: <9600 115200 200> |
|---|
| 34 | + Increase baud rate by 2% when set baud rate falls within range 9600 to 115200 |
|---|
| 35 | + |
|---|
| 36 | +Baud Rate tolerance: |
|---|
| 37 | + Standard UART devices are expected to have tolerance for baud rate error by |
|---|
| 38 | + -4 to +4 %. All Tegra devices till Tegra210 had this support. However, |
|---|
| 39 | + Tegra186 chip has a known hardware issue. UART Rx baud rate tolerance level |
|---|
| 40 | + is 0% to +4% in 1-stop config. Otherwise, the received data will have |
|---|
| 41 | + corruption/invalid framing errors. Parker errata suggests adjusting baud |
|---|
| 42 | + rate to be higher than the deviations observed in Tx. |
|---|
| 43 | + |
|---|
| 44 | + Tx deviation of connected device can be captured over scope (or noted from |
|---|
| 45 | + its spec) for valid range and Tegra baud rate has to be set above actual |
|---|
| 46 | + Tx baud rate observed. To do this we use nvidia,adjust-baud-rates |
|---|
| 47 | + |
|---|
| 48 | + As an example, consider there is deviation observed in Tx for baud rates as |
|---|
| 49 | + listed below. |
|---|
| 50 | + 0 to 9600 has 1% deviation |
|---|
| 51 | + 9600 to 115200 2% deviation |
|---|
| 52 | + This slight deviation is expcted and Tegra UART is expected to handle it. Due |
|---|
| 53 | + to the issue stated above, baud rate on Tegra UART should be set equal to or |
|---|
| 54 | + above deviation observed for avoiding frame errors. |
|---|
| 55 | + Property should be set like this |
|---|
| 56 | + nvidia,adjust-baud-rates = <0 9600 100>, |
|---|
| 57 | + <9600 115200 200>; |
|---|
| 22 | 58 | |
|---|
| 23 | 59 | Example: |
|---|
| 24 | 60 | |
|---|
| .. | .. |
|---|
| 33 | 69 | reset-names = "serial"; |
|---|
| 34 | 70 | dmas = <&apbdma 8>, <&apbdma 8>; |
|---|
| 35 | 71 | dma-names = "rx", "tx"; |
|---|
| 72 | + nvidia,adjust-baud-rates = <1000000 4000000 136>; /* 1.36% shift */ |
|---|
| 36 | 73 | }; |
|---|