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