Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / mfd / atmel-usart.txt
1 * Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
2
3 Required properties for USART:
4 - compatible: Should be "atmel,<chip>-usart" or "atmel,<chip>-dbgu"
5   The compatible <chip> indicated will be the first SoC to support an
6   additional mode or an USART new feature.
7   For the dbgu UART, use "atmel,<chip>-dbgu", "atmel,<chip>-usart"
8 - reg: Should contain registers location and length
9 - interrupts: Should contain interrupt
10 - clock-names: tuple listing input clock names.
11         Required elements: "usart"
12 - clocks: phandles to input clocks.
13
14 Required properties for USART in SPI mode:
15 - #size-cells      : Must be <0>
16 - #address-cells   : Must be <1>
17 - cs-gpios: chipselects (internal cs not supported)
18 - atmel,usart-mode : Must be <AT91_USART_MODE_SPI> (found in dt-bindings/mfd/at91-usart.h)
19
20 Optional properties in serial mode:
21 - atmel,use-dma-rx: use of PDC or DMA for receiving data
22 - atmel,use-dma-tx: use of PDC or DMA for transmitting data
23 - {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD line respectively.
24   It will use specified PIO instead of the peripheral function pin for the USART feature.
25   If unsure, don't specify this property.
26 - add dma bindings for dma transfer:
27         - dmas: DMA specifier, consisting of a phandle to DMA controller node,
28                 memory peripheral interface and USART DMA channel ID, FIFO configuration.
29                 Refer to dma.txt and atmel-dma.txt for details.
30         - dma-names: "rx" for RX channel, "tx" for TX channel.
31 - atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
32   capable USARTs.
33 - rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt
34
35 <chip> compatible description:
36 - at91rm9200:  legacy USART support
37 - at91sam9260: generic USART implementation for SAM9 SoCs
38
39 Example:
40 - use PDC:
41         usart0: serial@fff8c000 {
42                 compatible = "atmel,at91sam9260-usart";
43                 reg = <0xfff8c000 0x4000>;
44                 interrupts = <7>;
45                 clocks = <&usart0_clk>;
46                 clock-names = "usart";
47                 atmel,use-dma-rx;
48                 atmel,use-dma-tx;
49                 rts-gpios = <&pioD 15 GPIO_ACTIVE_LOW>;
50                 cts-gpios = <&pioD 16 GPIO_ACTIVE_LOW>;
51                 dtr-gpios = <&pioD 17 GPIO_ACTIVE_LOW>;
52                 dsr-gpios = <&pioD 18 GPIO_ACTIVE_LOW>;
53                 dcd-gpios = <&pioD 20 GPIO_ACTIVE_LOW>;
54                 rng-gpios = <&pioD 19 GPIO_ACTIVE_LOW>;
55         };
56
57 - use DMA:
58         usart0: serial@f001c000 {
59                 compatible = "atmel,at91sam9260-usart";
60                 reg = <0xf001c000 0x100>;
61                 interrupts = <12 4 5>;
62                 clocks = <&usart0_clk>;
63                 clock-names = "usart";
64                 atmel,use-dma-rx;
65                 atmel,use-dma-tx;
66                 dmas = <&dma0 2 0x3>,
67                        <&dma0 2 0x204>;
68                 dma-names = "tx", "rx";
69                 atmel,fifo-size = <32>;
70         };
71
72 - SPI mode:
73         #include <dt-bindings/mfd/at91-usart.h>
74
75         spi0: spi@f001c000 {
76                 #address-cells = <1>;
77                 #size-cells = <0>;
78                 compatible = "atmel,at91rm9200-usart", "atmel,at91sam9260-usart";
79                 atmel,usart-mode = <AT91_USART_MODE_SPI>;
80                 reg = <0xf001c000 0x100>;
81                 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
82                 clocks = <&usart0_clk>;
83                 clock-names = "usart";
84                 cs-gpios = <&pioB 3 0>;
85         };