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