2011-10-12 16:06:56 +00:00
|
|
|
* Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
|
|
|
|
|
|
|
|
Required properties:
|
2015-03-12 14:54:26 +00:00
|
|
|
- compatible: Should be "atmel,<chip>-usart" or "atmel,<chip>-dbgu"
|
2011-10-12 16:06:56 +00:00
|
|
|
The compatible <chip> indicated will be the first SoC to support an
|
|
|
|
additional mode or an USART new feature.
|
2015-03-12 14:54:26 +00:00
|
|
|
For the dbgu UART, use "atmel,<chip>-dbgu", "atmel,<chip>-usart"
|
2011-10-12 16:06:56 +00:00
|
|
|
- reg: Should contain registers location and length
|
|
|
|
- interrupts: Should contain interrupt
|
2013-12-17 16:22:20 +00:00
|
|
|
- clock-names: tuple listing input clock names.
|
|
|
|
Required elements: "usart"
|
|
|
|
- clocks: phandles to input clocks.
|
2011-10-12 16:06:56 +00:00
|
|
|
|
|
|
|
Optional properties:
|
|
|
|
- atmel,use-dma-rx: use of PDC or DMA for receiving data
|
|
|
|
- atmel,use-dma-tx: use of PDC or DMA for transmitting data
|
2014-05-13 18:20:44 +00:00
|
|
|
- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD line respectively.
|
|
|
|
It will use specified PIO instead of the peripheral function pin for the USART feature.
|
|
|
|
If unsure, don't specify this property.
|
2013-07-22 08:30:31 +00:00
|
|
|
- add dma bindings for dma transfer:
|
|
|
|
- dmas: DMA specifier, consisting of a phandle to DMA controller node,
|
|
|
|
memory peripheral interface and USART DMA channel ID, FIFO configuration.
|
|
|
|
Refer to dma.txt and atmel-dma.txt for details.
|
|
|
|
- dma-names: "rx" for RX channel, "tx" for TX channel.
|
ARM: at91/dt: add a new DT property to support FIFOs on Atmel USARTs
This patch adds a new DT property, "atmel,fifo-size", to enable and set
the maximum number of data the RX and TX FIFOs can store on FIFO capable
USARTs.
Please be aware that the VERSION register can not be used to guess the
size of FIFOs. Indeed, for a given hardware version, the USARTs can be
integrated on Atmel SoCs with different FIFO sizes. Also the
"atmel,fifo-size" property is optional as older USARTs don't embed FIFO at
all.
Besides, the FIFO size can not be read or guessed from other registers:
When designing the FIFO feature, no dedicated registers were added to
store this size. Unsed spaces in the I/O register range are limited and
better reserved for future usages. Instead, the FIFO size of each
peripheral is documented in the programmer datasheet.
Finally, on a given SoC, there can be several instances of USART with
different FIFO sizes. This explain why we'd rather use a dedicated DT
property than use the "compatible" property.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-02 13:18:09 +00:00
|
|
|
- atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
|
|
|
|
capable USARTs.
|
2011-10-12 16:06:56 +00:00
|
|
|
|
|
|
|
<chip> compatible description:
|
|
|
|
- at91rm9200: legacy USART support
|
|
|
|
- at91sam9260: generic USART implementation for SAM9 SoCs
|
|
|
|
|
|
|
|
Example:
|
2013-07-22 08:30:31 +00:00
|
|
|
- use PDC:
|
2011-10-12 16:06:56 +00:00
|
|
|
usart0: serial@fff8c000 {
|
|
|
|
compatible = "atmel,at91sam9260-usart";
|
|
|
|
reg = <0xfff8c000 0x4000>;
|
|
|
|
interrupts = <7>;
|
2013-12-17 16:22:20 +00:00
|
|
|
clocks = <&usart0_clk>;
|
|
|
|
clock-names = "usart";
|
2011-10-12 16:06:56 +00:00
|
|
|
atmel,use-dma-rx;
|
|
|
|
atmel,use-dma-tx;
|
2014-05-13 18:20:41 +00:00
|
|
|
rts-gpios = <&pioD 15 GPIO_ACTIVE_LOW>;
|
2014-05-13 18:20:44 +00:00
|
|
|
cts-gpios = <&pioD 16 GPIO_ACTIVE_LOW>;
|
|
|
|
dtr-gpios = <&pioD 17 GPIO_ACTIVE_LOW>;
|
|
|
|
dsr-gpios = <&pioD 18 GPIO_ACTIVE_LOW>;
|
|
|
|
dcd-gpios = <&pioD 20 GPIO_ACTIVE_LOW>;
|
|
|
|
rng-gpios = <&pioD 19 GPIO_ACTIVE_LOW>;
|
2011-10-12 16:06:56 +00:00
|
|
|
};
|
|
|
|
|
2013-07-22 08:30:31 +00:00
|
|
|
- use DMA:
|
|
|
|
usart0: serial@f001c000 {
|
|
|
|
compatible = "atmel,at91sam9260-usart";
|
|
|
|
reg = <0xf001c000 0x100>;
|
|
|
|
interrupts = <12 4 5>;
|
2013-12-17 16:22:20 +00:00
|
|
|
clocks = <&usart0_clk>;
|
|
|
|
clock-names = "usart";
|
2013-07-22 08:30:31 +00:00
|
|
|
atmel,use-dma-rx;
|
|
|
|
atmel,use-dma-tx;
|
|
|
|
dmas = <&dma0 2 0x3>,
|
|
|
|
<&dma0 2 0x204>;
|
|
|
|
dma-names = "tx", "rx";
|
ARM: at91/dt: add a new DT property to support FIFOs on Atmel USARTs
This patch adds a new DT property, "atmel,fifo-size", to enable and set
the maximum number of data the RX and TX FIFOs can store on FIFO capable
USARTs.
Please be aware that the VERSION register can not be used to guess the
size of FIFOs. Indeed, for a given hardware version, the USARTs can be
integrated on Atmel SoCs with different FIFO sizes. Also the
"atmel,fifo-size" property is optional as older USARTs don't embed FIFO at
all.
Besides, the FIFO size can not be read or guessed from other registers:
When designing the FIFO feature, no dedicated registers were added to
store this size. Unsed spaces in the I/O register range are limited and
better reserved for future usages. Instead, the FIFO size of each
peripheral is documented in the programmer datasheet.
Finally, on a given SoC, there can be several instances of USART with
different FIFO sizes. This explain why we'd rather use a dedicated DT
property than use the "compatible" property.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-02 13:18:09 +00:00
|
|
|
atmel,fifo-size = <32>;
|
2013-07-22 08:30:31 +00:00
|
|
|
};
|