Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
Schema identifier ($id): "http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Richard Genoud <richard.genoud@bootlin.com>"
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Allowed values (
enum):"atmel,at91rm9200-usart","atmel,at91sam9260-usart"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"atmel,at91rm9200-dbgu"Item 2
Exact value (
const):"atmel,at91rm9200-usart"
Rule 3
Array item rules (
items)Item 1
Exact value (
const):"atmel,at91sam9260-dbgu"Item 2
Exact value (
const):"atmel,at91sam9260-usart"
Rule 4
Array item rules (
items)Item 1
Allowed values (
enum):"microchip,sam9x60-usart","microchip,sam9x7-usart","microchip,sama7d65-usart"Item 2
Exact value (
const):"atmel,at91sam9260-usart"
Rule 5
Array item rules (
items)Item 1
Exact value (
const):"microchip,sam9x60-dbgu"Item 2
Exact value (
const):"microchip,sam9x60-usart"Item 3
Exact value (
const):"atmel,at91sam9260-dbgu"Item 4
Exact value (
const):"atmel,at91sam9260-usart"
Rule 6
Array item rules (
items)Item 1
Exact value (
const):"microchip,sam9x7-dbgu"Item 2
Exact value (
const):"atmel,at91sam9260-dbgu"Item 3
Exact value (
const):"microchip,sam9x7-usart"Item 4
Exact value (
const):"atmel,at91sam9260-usart"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Maximum number of items (maxItems): 1
clock-names — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"usart"
Item 2
Exact value (
const):"gclk"
clocks — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
USART Peripheral Clock
Item 2
USART Generic Clock
dmas — not listed as required here #
Array item rules (items) #
Item 1
TX DMA Channel
Item 2
RX DMA Channel
dma-names — not listed as required here #
Array item rules (items) #
Item 1
Exact value (
const):"tx"
Item 2
Exact value (
const):"rx"
atmel,usart-mode — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Must be either <AT91_USART_MODE_SPI> for SPI or <AT91_USART_MODE_SERIAL> for USART (found in dt-bindings/mfd/at91-usart.h).
atmel,use-dma-rx — not listed as required here #
Value type (type): "boolean"
use of PDC or DMA for receiving data
atmel,use-dma-tx — not listed as required here #
Value type (type): "boolean"
use of PDC or DMA for transmitting data
atmel,fifo-size — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Maximum number of data the RX and TX FIFOs can store for FIFO capable USARTS.
Required in this object (required): "compatible", "reg", "interrupts", "clock-names", "clocks", "atmel,usart-mode"
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #Properties and child nodes (
properties)
atmel,usart-mode— not listed as required hereExact value (
const):1When the condition matches (
then) #All of these rules must match (
allOf)Rule 1
Shared schema rule (
$ref):/schemas/spi/spi-controller.yaml#Properties and child nodes (
properties)
atmel,use-dma-rx— not listed as required here
false— Not permitted by this property rule.
atmel,use-dma-tx— not listed as required here
false— Not permitted by this property rule.
atmel,fifo-size— not listed as required here
false— Not permitted by this property rule.
#size-cells— required hereExact value (
const):0
#address-cells— required hereExact value (
const):1Required in this object (
required):"#size-cells","#address-cells"When the condition does not match (
else) #All of these rules must match (
allOf)Rule 1
Shared schema rule (
$ref):/schemas/serial/serial.yaml#Rule 2
Shared schema rule (
$ref):/schemas/serial/rs485.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/mfd/at91-usart.h>
#include <dt-bindings/dma/at91.h>
/* use PDC */
usart0: serial@fff8c000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xfff8c000 0x4000>;
atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
interrupts = <7>;
clocks = <&usart0_clk>;
clock-names = "usart";
atmel,use-dma-rx;
atmel,use-dma-tx;
rts-gpios = <&pioD 15 GPIO_ACTIVE_LOW>;
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>;
};
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/mfd/at91-usart.h>
#include <dt-bindings/dma/at91.h>
/* use DMA */
usart1: serial@f001c000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xf001c000 0x100>;
atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
clocks = <&usart0_clk>;
clock-names = "usart";
atmel,use-dma-rx;
atmel,use-dma-tx;
dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(3)>,
<&dma0 2 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
dma-names = "tx", "rx";
atmel,fifo-size = <32>;
};
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/mfd/at91-usart.h>
#include <dt-bindings/dma/at91.h>
/* SPI mode */
spi0: spi@f001c000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xf001c000 0x100>;
#address-cells = <1>;
#size-cells = <0>;
atmel,usart-mode = <AT91_USART_MODE_SPI>;
interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
clocks = <&usart0_clk>;
clock-names = "usart";
dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(3)>,
<&dma0 2 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
dma-names = "tx", "rx";
cs-gpios = <&pioB 3 GPIO_ACTIVE_HIGH>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 2: Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries