1c66ec88fSEmmanuel Vadot# Copyright 2020 Lubomir Rintel <lkundrak@v3.sk> 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/serial/8250.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: UART (Universal Asynchronous Receiver/Transmitter) bindings 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - devicetree@vger.kernel.org 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel VadotallOf: 13c66ec88fSEmmanuel Vadot - $ref: /schemas/serial.yaml# 14c66ec88fSEmmanuel Vadot - if: 15*2eb4d8dcSEmmanuel Vadot anyOf: 16*2eb4d8dcSEmmanuel Vadot - required: 17*2eb4d8dcSEmmanuel Vadot - aspeed,lpc-io-reg 18*2eb4d8dcSEmmanuel Vadot - required: 19*2eb4d8dcSEmmanuel Vadot - aspeed,lpc-interrupts 20*2eb4d8dcSEmmanuel Vadot - required: 21c66ec88fSEmmanuel Vadot - aspeed,sirq-polarity-sense 22c66ec88fSEmmanuel Vadot then: 23c66ec88fSEmmanuel Vadot properties: 24c66ec88fSEmmanuel Vadot compatible: 25c66ec88fSEmmanuel Vadot const: aspeed,ast2500-vuart 26c66ec88fSEmmanuel Vadot - if: 27c66ec88fSEmmanuel Vadot properties: 28c66ec88fSEmmanuel Vadot compatible: 29c66ec88fSEmmanuel Vadot const: mrvl,mmp-uart 30c66ec88fSEmmanuel Vadot then: 31c66ec88fSEmmanuel Vadot properties: 32c66ec88fSEmmanuel Vadot reg-shift: 33c66ec88fSEmmanuel Vadot const: 2 34c66ec88fSEmmanuel Vadot required: 35c66ec88fSEmmanuel Vadot - reg-shift 36c66ec88fSEmmanuel Vadot - if: 37c66ec88fSEmmanuel Vadot not: 38c66ec88fSEmmanuel Vadot properties: 39c66ec88fSEmmanuel Vadot compatible: 40c66ec88fSEmmanuel Vadot items: 41c66ec88fSEmmanuel Vadot - enum: 42c66ec88fSEmmanuel Vadot - ns8250 43c66ec88fSEmmanuel Vadot - ns16450 44c66ec88fSEmmanuel Vadot - ns16550 45c66ec88fSEmmanuel Vadot - ns16550a 46c66ec88fSEmmanuel Vadot then: 47c66ec88fSEmmanuel Vadot anyOf: 48c66ec88fSEmmanuel Vadot - required: [ clock-frequency ] 49c66ec88fSEmmanuel Vadot - required: [ clocks ] 50c66ec88fSEmmanuel Vadot 51c66ec88fSEmmanuel Vadotproperties: 52c66ec88fSEmmanuel Vadot compatible: 53c66ec88fSEmmanuel Vadot oneOf: 54c66ec88fSEmmanuel Vadot - const: ns8250 55c66ec88fSEmmanuel Vadot - const: ns16450 56c66ec88fSEmmanuel Vadot - const: ns16550 57c66ec88fSEmmanuel Vadot - const: ns16550a 58c66ec88fSEmmanuel Vadot - const: ns16850 59c66ec88fSEmmanuel Vadot - const: aspeed,ast2400-vuart 60c66ec88fSEmmanuel Vadot - const: aspeed,ast2500-vuart 61c66ec88fSEmmanuel Vadot - const: intel,xscale-uart 62c66ec88fSEmmanuel Vadot - const: mrvl,pxa-uart 63*2eb4d8dcSEmmanuel Vadot - const: nuvoton,wpcm450-uart 64c66ec88fSEmmanuel Vadot - const: nuvoton,npcm750-uart 65c66ec88fSEmmanuel Vadot - const: nvidia,tegra20-uart 66c66ec88fSEmmanuel Vadot - const: nxp,lpc3220-uart 67c66ec88fSEmmanuel Vadot - items: 68c66ec88fSEmmanuel Vadot - enum: 69c66ec88fSEmmanuel Vadot - altr,16550-FIFO32 70c66ec88fSEmmanuel Vadot - altr,16550-FIFO64 71c66ec88fSEmmanuel Vadot - altr,16550-FIFO128 72c66ec88fSEmmanuel Vadot - fsl,16550-FIFO64 73c66ec88fSEmmanuel Vadot - fsl,ns16550 74c66ec88fSEmmanuel Vadot - andestech,uart16550 75c66ec88fSEmmanuel Vadot - nxp,lpc1850-uart 76c66ec88fSEmmanuel Vadot - opencores,uart16550-rtlsvn105 77c66ec88fSEmmanuel Vadot - ti,da830-uart 78c66ec88fSEmmanuel Vadot - const: ns16550a 79c66ec88fSEmmanuel Vadot - items: 80c66ec88fSEmmanuel Vadot - enum: 81c66ec88fSEmmanuel Vadot - ns16750 82c66ec88fSEmmanuel Vadot - cavium,octeon-3860-uart 83c66ec88fSEmmanuel Vadot - xlnx,xps-uart16550-2.00.b 84c66ec88fSEmmanuel Vadot - ralink,rt2880-uart 85c66ec88fSEmmanuel Vadot - enum: 86c66ec88fSEmmanuel Vadot - ns16550 # Deprecated, unless the FIFO really is broken 87c66ec88fSEmmanuel Vadot - ns16550a 88c66ec88fSEmmanuel Vadot - items: 89c66ec88fSEmmanuel Vadot - enum: 90c66ec88fSEmmanuel Vadot - ralink,mt7620a-uart 91c66ec88fSEmmanuel Vadot - ralink,rt3052-uart 92c66ec88fSEmmanuel Vadot - ralink,rt3883-uart 93c66ec88fSEmmanuel Vadot - const: ralink,rt2880-uart 94c66ec88fSEmmanuel Vadot - enum: 95c66ec88fSEmmanuel Vadot - ns16550 # Deprecated, unless the FIFO really is broken 96c66ec88fSEmmanuel Vadot - ns16550a 97c66ec88fSEmmanuel Vadot - items: 98c66ec88fSEmmanuel Vadot - enum: 99c66ec88fSEmmanuel Vadot - mediatek,mt7622-btif 100c66ec88fSEmmanuel Vadot - mediatek,mt7623-btif 101c66ec88fSEmmanuel Vadot - const: mediatek,mtk-btif 102c66ec88fSEmmanuel Vadot - items: 103c66ec88fSEmmanuel Vadot - const: mrvl,mmp-uart 104c66ec88fSEmmanuel Vadot - const: intel,xscale-uart 105c66ec88fSEmmanuel Vadot - items: 106c66ec88fSEmmanuel Vadot - enum: 107c66ec88fSEmmanuel Vadot - nvidia,tegra30-uart 108c66ec88fSEmmanuel Vadot - nvidia,tegra114-uart 109c66ec88fSEmmanuel Vadot - nvidia,tegra124-uart 110c66ec88fSEmmanuel Vadot - nvidia,tegra186-uart 111c66ec88fSEmmanuel Vadot - nvidia,tegra194-uart 112c66ec88fSEmmanuel Vadot - nvidia,tegra210-uart 113c66ec88fSEmmanuel Vadot - const: nvidia,tegra20-uart 114c66ec88fSEmmanuel Vadot 115c66ec88fSEmmanuel Vadot reg: 116c66ec88fSEmmanuel Vadot maxItems: 1 117c66ec88fSEmmanuel Vadot 118c66ec88fSEmmanuel Vadot interrupts: 119c66ec88fSEmmanuel Vadot maxItems: 1 120c66ec88fSEmmanuel Vadot 121c66ec88fSEmmanuel Vadot clock-frequency: true 122c66ec88fSEmmanuel Vadot 123c66ec88fSEmmanuel Vadot clocks: 124c66ec88fSEmmanuel Vadot maxItems: 1 125c66ec88fSEmmanuel Vadot 126c66ec88fSEmmanuel Vadot resets: 127c66ec88fSEmmanuel Vadot maxItems: 1 128c66ec88fSEmmanuel Vadot 129c66ec88fSEmmanuel Vadot current-speed: 1305def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 131c66ec88fSEmmanuel Vadot description: The current active speed of the UART. 132c66ec88fSEmmanuel Vadot 133c66ec88fSEmmanuel Vadot reg-offset: 134c66ec88fSEmmanuel Vadot description: | 135c66ec88fSEmmanuel Vadot Offset to apply to the mapbase from the start of the registers. 136c66ec88fSEmmanuel Vadot 137c66ec88fSEmmanuel Vadot reg-shift: 138c66ec88fSEmmanuel Vadot description: Quantity to shift the register offsets by. 139c66ec88fSEmmanuel Vadot 140c66ec88fSEmmanuel Vadot reg-io-width: 141c66ec88fSEmmanuel Vadot description: | 142c66ec88fSEmmanuel Vadot The size (in bytes) of the IO accesses that should be performed on the 143c66ec88fSEmmanuel Vadot device. There are some systems that require 32-bit accesses to the 144c66ec88fSEmmanuel Vadot UART (e.g. TI davinci). 145c66ec88fSEmmanuel Vadot 146c66ec88fSEmmanuel Vadot used-by-rtas: 147c66ec88fSEmmanuel Vadot type: boolean 148c66ec88fSEmmanuel Vadot description: | 149c66ec88fSEmmanuel Vadot Set to indicate that the port is in use by the OpenFirmware RTAS and 150c66ec88fSEmmanuel Vadot should not be registered. 151c66ec88fSEmmanuel Vadot 152c66ec88fSEmmanuel Vadot no-loopback-test: 153c66ec88fSEmmanuel Vadot type: boolean 154c66ec88fSEmmanuel Vadot description: | 155c66ec88fSEmmanuel Vadot Set to indicate that the port does not implement loopback test mode. 156c66ec88fSEmmanuel Vadot 157c66ec88fSEmmanuel Vadot fifo-size: 1585def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 159c66ec88fSEmmanuel Vadot description: The fifo size of the UART. 160c66ec88fSEmmanuel Vadot 161c66ec88fSEmmanuel Vadot auto-flow-control: 162c66ec88fSEmmanuel Vadot type: boolean 163c66ec88fSEmmanuel Vadot description: | 164c66ec88fSEmmanuel Vadot One way to enable automatic flow control support. The driver is 165c66ec88fSEmmanuel Vadot allowed to detect support for the capability even without this 166c66ec88fSEmmanuel Vadot property. 167c66ec88fSEmmanuel Vadot 168c66ec88fSEmmanuel Vadot tx-threshold: 169c66ec88fSEmmanuel Vadot description: | 170c66ec88fSEmmanuel Vadot Specify the TX FIFO low water indication for parts with programmable 171c66ec88fSEmmanuel Vadot TX FIFO thresholds. 172c66ec88fSEmmanuel Vadot 173c66ec88fSEmmanuel Vadot overrun-throttle-ms: 174c66ec88fSEmmanuel Vadot description: | 175c66ec88fSEmmanuel Vadot How long to pause uart rx when input overrun is encountered. 176c66ec88fSEmmanuel Vadot 177c66ec88fSEmmanuel Vadot rts-gpios: true 178c66ec88fSEmmanuel Vadot cts-gpios: true 179c66ec88fSEmmanuel Vadot dtr-gpios: true 180c66ec88fSEmmanuel Vadot dsr-gpios: true 181c66ec88fSEmmanuel Vadot rng-gpios: true 182c66ec88fSEmmanuel Vadot dcd-gpios: true 183c66ec88fSEmmanuel Vadot 184c66ec88fSEmmanuel Vadot aspeed,sirq-polarity-sense: 185c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 186c66ec88fSEmmanuel Vadot description: | 187c66ec88fSEmmanuel Vadot Phandle to aspeed,ast2500-scu compatible syscon alongside register 188c66ec88fSEmmanuel Vadot offset and bit number to identify how the SIRQ polarity should be 189c66ec88fSEmmanuel Vadot configured. One possible data source is the LPC/eSPI mode bit. Only 190c66ec88fSEmmanuel Vadot applicable to aspeed,ast2500-vuart. 191*2eb4d8dcSEmmanuel Vadot deprecated: true 192*2eb4d8dcSEmmanuel Vadot 193*2eb4d8dcSEmmanuel Vadot aspeed,lpc-io-reg: 194*2eb4d8dcSEmmanuel Vadot $ref: '/schemas/types.yaml#/definitions/uint32' 195*2eb4d8dcSEmmanuel Vadot description: | 196*2eb4d8dcSEmmanuel Vadot The VUART LPC address. Only applicable to aspeed,ast2500-vuart. 197*2eb4d8dcSEmmanuel Vadot 198*2eb4d8dcSEmmanuel Vadot aspeed,lpc-interrupts: 199*2eb4d8dcSEmmanuel Vadot $ref: "/schemas/types.yaml#/definitions/uint32-array" 200*2eb4d8dcSEmmanuel Vadot minItems: 2 201*2eb4d8dcSEmmanuel Vadot maxItems: 2 202*2eb4d8dcSEmmanuel Vadot description: | 203*2eb4d8dcSEmmanuel Vadot A 2-cell property describing the VUART SIRQ number and SIRQ 204*2eb4d8dcSEmmanuel Vadot polarity (IRQ_TYPE_LEVEL_LOW or IRQ_TYPE_LEVEL_HIGH). Only 205*2eb4d8dcSEmmanuel Vadot applicable to aspeed,ast2500-vuart. 206c66ec88fSEmmanuel Vadot 207c66ec88fSEmmanuel Vadotrequired: 208c66ec88fSEmmanuel Vadot - reg 209c66ec88fSEmmanuel Vadot - interrupts 210c66ec88fSEmmanuel Vadot 211c66ec88fSEmmanuel VadotunevaluatedProperties: false 212c66ec88fSEmmanuel Vadot 213c66ec88fSEmmanuel Vadotexamples: 214c66ec88fSEmmanuel Vadot - | 215c66ec88fSEmmanuel Vadot serial@80230000 { 216c66ec88fSEmmanuel Vadot compatible = "ns8250"; 217c66ec88fSEmmanuel Vadot reg = <0x80230000 0x100>; 218c66ec88fSEmmanuel Vadot interrupts = <10>; 219c66ec88fSEmmanuel Vadot reg-shift = <2>; 220c66ec88fSEmmanuel Vadot clock-frequency = <48000000>; 221c66ec88fSEmmanuel Vadot }; 222c66ec88fSEmmanuel Vadot - | 223c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 224c66ec88fSEmmanuel Vadot serial@49042000 { 225c66ec88fSEmmanuel Vadot compatible = "andestech,uart16550", "ns16550a"; 226c66ec88fSEmmanuel Vadot reg = <0x49042000 0x400>; 227c66ec88fSEmmanuel Vadot interrupts = <80>; 228c66ec88fSEmmanuel Vadot clock-frequency = <48000000>; 229c66ec88fSEmmanuel Vadot cts-gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; 230c66ec88fSEmmanuel Vadot rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; 231c66ec88fSEmmanuel Vadot dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; 232c66ec88fSEmmanuel Vadot dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; 233c66ec88fSEmmanuel Vadot dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; 234c66ec88fSEmmanuel Vadot rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; 235c66ec88fSEmmanuel Vadot }; 236c66ec88fSEmmanuel Vadot - | 237c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/aspeed-clock.h> 238*2eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 239c66ec88fSEmmanuel Vadot serial@1e787000 { 240c66ec88fSEmmanuel Vadot compatible = "aspeed,ast2500-vuart"; 241c66ec88fSEmmanuel Vadot reg = <0x1e787000 0x40>; 242c66ec88fSEmmanuel Vadot reg-shift = <2>; 243c66ec88fSEmmanuel Vadot interrupts = <8>; 244c66ec88fSEmmanuel Vadot clocks = <&syscon ASPEED_CLK_APB>; 245c66ec88fSEmmanuel Vadot no-loopback-test; 246*2eb4d8dcSEmmanuel Vadot aspeed,lpc-io-reg = <0x3f8>; 247*2eb4d8dcSEmmanuel Vadot aspeed,lpc-interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 248c66ec88fSEmmanuel Vadot }; 249c66ec88fSEmmanuel Vadot 250c66ec88fSEmmanuel Vadot... 251