Back to home page

OSCL-LXR

 
 

    


0001 NVIDIA Tegra20/Tegra30 high speed (DMA based) UART controller driver.
0002 
0003 Required properties:
0004 - compatible : should be,
0005   "nvidia,tegra20-hsuart" for Tegra20,
0006   "nvidia,tegra30-hsuart" for Tegra30,
0007   "nvidia,tegra186-hsuart" for Tegra186,
0008   "nvidia,tegra194-hsuart" for Tegra194.
0009 
0010 - reg: Should contain UART controller registers location and length.
0011 - interrupts: Should contain UART controller interrupts.
0012 - clocks: Must contain one entry, for the module clock.
0013   See ../clocks/clock-bindings.txt for details.
0014 - resets : Must contain an entry for each entry in reset-names.
0015   See ../reset/reset.txt for details.
0016 - reset-names : Must include the following entries:
0017   - serial
0018 - dmas : Must contain an entry for each entry in dma-names.
0019   See ../dma/dma.txt for details.
0020 - dma-names : Must include the following entries:
0021   - rx
0022   - tx
0023 
0024 Optional properties:
0025 - nvidia,enable-modem-interrupt: Enable modem interrupts. Should be enable
0026                 only if all 8 lines of UART controller are pinmuxed.
0027 - nvidia,adjust-baud-rates: List of entries providing percentage of baud rate
0028   adjustment within a range.
0029   Each entry contains sets of 3 values. Range low/high and adjusted rate.
0030   <range_low range_high adjusted_rate>
0031   When baud rate set on controller falls within the range mentioned in this
0032   field, baud rate will be adjusted by percentage mentioned here.
0033   Ex: <9600 115200 200>
0034   Increase baud rate by 2% when set baud rate falls within range 9600 to 115200
0035 
0036 Baud Rate tolerance:
0037   Standard UART devices are expected to have tolerance for baud rate error by
0038   -4 to +4 %. All Tegra devices till Tegra210 had this support. However,
0039   Tegra186 chip has a known hardware issue. UART Rx baud rate tolerance level
0040   is 0% to +4% in 1-stop config. Otherwise, the received data will have
0041   corruption/invalid framing errors. Parker errata suggests adjusting baud
0042   rate to be higher than the deviations observed in Tx.
0043 
0044   Tx deviation of connected device can be captured over scope (or noted from
0045   its spec) for valid range and Tegra baud rate has to be set above actual
0046   Tx baud rate observed. To do this we use nvidia,adjust-baud-rates
0047 
0048   As an example, consider there is deviation observed in Tx for baud rates as
0049   listed below.
0050   0 to 9600 has 1% deviation
0051   9600 to 115200 2% deviation
0052   This slight deviation is expcted and Tegra UART is expected to handle it. Due
0053   to the issue stated above, baud rate on Tegra UART should be set equal to or
0054   above deviation observed for avoiding frame errors.
0055   Property should be set like this
0056   nvidia,adjust-baud-rates = <0 9600 100>,
0057                              <9600 115200 200>;
0058 
0059 Example:
0060 
0061 serial@70006000 {
0062         compatible = "nvidia,tegra30-hsuart", "nvidia,tegra20-hsuart";
0063         reg = <0x70006000 0x40>;
0064         reg-shift = <2>;
0065         interrupts = <0 36 0x04>;
0066         nvidia,enable-modem-interrupt;
0067         clocks = <&tegra_car 6>;
0068         resets = <&tegra_car 6>;
0069         reset-names = "serial";
0070         dmas = <&apbdma 8>, <&apbdma 8>;
0071         dma-names = "rx", "tx";
0072         nvidia,adjust-baud-rates = <1000000 4000000 136>; /* 1.36% shift */
0073 };