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 7*8bab661aSEmmanuel 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# 14c66ec88fSEmmanuel Vadot - if: 152eb4d8dcSEmmanuel Vadot anyOf: 162eb4d8dcSEmmanuel Vadot - required: 172eb4d8dcSEmmanuel Vadot - aspeed,lpc-io-reg 182eb4d8dcSEmmanuel Vadot - required: 192eb4d8dcSEmmanuel Vadot - aspeed,lpc-interrupts 202eb4d8dcSEmmanuel 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 632eb4d8dcSEmmanuel Vadot - const: nuvoton,wpcm450-uart 64c66ec88fSEmmanuel Vadot - const: nuvoton,npcm750-uart 65b97ee269SEmmanuel Vadot - const: nuvoton,npcm845-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: 97c66ec88fSEmmanuel Vadot - ralink,mt7620a-uart 98c66ec88fSEmmanuel Vadot - ralink,rt3052-uart 99c66ec88fSEmmanuel Vadot - ralink,rt3883-uart 100c66ec88fSEmmanuel Vadot - const: ralink,rt2880-uart 101c66ec88fSEmmanuel Vadot - enum: 102c66ec88fSEmmanuel Vadot - ns16550 # Deprecated, unless the FIFO really is broken 103c66ec88fSEmmanuel Vadot - ns16550a 104c66ec88fSEmmanuel Vadot - items: 105c66ec88fSEmmanuel Vadot - enum: 106c66ec88fSEmmanuel Vadot - mediatek,mt7622-btif 107c66ec88fSEmmanuel Vadot - mediatek,mt7623-btif 108c66ec88fSEmmanuel Vadot - const: mediatek,mtk-btif 109c66ec88fSEmmanuel Vadot - items: 110c66ec88fSEmmanuel Vadot - const: mrvl,mmp-uart 111c66ec88fSEmmanuel Vadot - const: intel,xscale-uart 112c66ec88fSEmmanuel Vadot - items: 113c66ec88fSEmmanuel Vadot - enum: 114c66ec88fSEmmanuel Vadot - nvidia,tegra30-uart 115c66ec88fSEmmanuel Vadot - nvidia,tegra114-uart 116c66ec88fSEmmanuel Vadot - nvidia,tegra124-uart 117e67e8565SEmmanuel Vadot - nvidia,tegra210-uart 118c66ec88fSEmmanuel Vadot - nvidia,tegra186-uart 119c66ec88fSEmmanuel Vadot - nvidia,tegra194-uart 120e67e8565SEmmanuel Vadot - nvidia,tegra234-uart 121c66ec88fSEmmanuel Vadot - const: nvidia,tegra20-uart 122c66ec88fSEmmanuel Vadot 123c66ec88fSEmmanuel Vadot reg: 124c66ec88fSEmmanuel Vadot maxItems: 1 125c66ec88fSEmmanuel Vadot 126c66ec88fSEmmanuel Vadot interrupts: 127c66ec88fSEmmanuel Vadot maxItems: 1 128c66ec88fSEmmanuel Vadot 129c66ec88fSEmmanuel Vadot clock-frequency: true 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot clocks: 132c66ec88fSEmmanuel Vadot maxItems: 1 133c66ec88fSEmmanuel Vadot 134c66ec88fSEmmanuel Vadot resets: 135c66ec88fSEmmanuel Vadot maxItems: 1 136c66ec88fSEmmanuel Vadot 137c66ec88fSEmmanuel Vadot current-speed: 1385def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 139c66ec88fSEmmanuel Vadot description: The current active speed of the UART. 140c66ec88fSEmmanuel Vadot 141c66ec88fSEmmanuel Vadot reg-offset: 142d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 143c66ec88fSEmmanuel Vadot description: | 144c66ec88fSEmmanuel Vadot Offset to apply to the mapbase from the start of the registers. 145c66ec88fSEmmanuel Vadot 146c66ec88fSEmmanuel Vadot reg-shift: 147c66ec88fSEmmanuel Vadot description: Quantity to shift the register offsets by. 148c66ec88fSEmmanuel Vadot 149c66ec88fSEmmanuel Vadot reg-io-width: 150c66ec88fSEmmanuel Vadot description: | 151c66ec88fSEmmanuel Vadot The size (in bytes) of the IO accesses that should be performed on the 152c66ec88fSEmmanuel Vadot device. There are some systems that require 32-bit accesses to the 153c66ec88fSEmmanuel Vadot UART (e.g. TI davinci). 154c66ec88fSEmmanuel Vadot 155c66ec88fSEmmanuel Vadot used-by-rtas: 156c66ec88fSEmmanuel Vadot type: boolean 157c66ec88fSEmmanuel Vadot description: | 158c66ec88fSEmmanuel Vadot Set to indicate that the port is in use by the OpenFirmware RTAS and 159c66ec88fSEmmanuel Vadot should not be registered. 160c66ec88fSEmmanuel Vadot 161c66ec88fSEmmanuel Vadot no-loopback-test: 162c66ec88fSEmmanuel Vadot type: boolean 163c66ec88fSEmmanuel Vadot description: | 164c66ec88fSEmmanuel Vadot Set to indicate that the port does not implement loopback test mode. 165c66ec88fSEmmanuel Vadot 166c66ec88fSEmmanuel Vadot fifo-size: 1675def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 168c66ec88fSEmmanuel Vadot description: The fifo size of the UART. 169c66ec88fSEmmanuel Vadot 170c66ec88fSEmmanuel Vadot auto-flow-control: 171c66ec88fSEmmanuel Vadot type: boolean 172c66ec88fSEmmanuel Vadot description: | 173c66ec88fSEmmanuel Vadot One way to enable automatic flow control support. The driver is 174c66ec88fSEmmanuel Vadot allowed to detect support for the capability even without this 175c66ec88fSEmmanuel Vadot property. 176c66ec88fSEmmanuel Vadot 177c66ec88fSEmmanuel Vadot tx-threshold: 178c66ec88fSEmmanuel Vadot description: | 179c66ec88fSEmmanuel Vadot Specify the TX FIFO low water indication for parts with programmable 180c66ec88fSEmmanuel Vadot TX FIFO thresholds. 181c66ec88fSEmmanuel Vadot 182c66ec88fSEmmanuel Vadot overrun-throttle-ms: 183c66ec88fSEmmanuel Vadot description: | 184c66ec88fSEmmanuel Vadot How long to pause uart rx when input overrun is encountered. 185c66ec88fSEmmanuel Vadot 186c66ec88fSEmmanuel Vadot rts-gpios: true 187c66ec88fSEmmanuel Vadot cts-gpios: true 188c66ec88fSEmmanuel Vadot dtr-gpios: true 189c66ec88fSEmmanuel Vadot dsr-gpios: true 190c66ec88fSEmmanuel Vadot rng-gpios: true 191c66ec88fSEmmanuel Vadot dcd-gpios: true 192c66ec88fSEmmanuel Vadot 193c66ec88fSEmmanuel Vadot aspeed,sirq-polarity-sense: 194c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 195c66ec88fSEmmanuel Vadot description: | 196c66ec88fSEmmanuel Vadot Phandle to aspeed,ast2500-scu compatible syscon alongside register 197c66ec88fSEmmanuel Vadot offset and bit number to identify how the SIRQ polarity should be 198c66ec88fSEmmanuel Vadot configured. One possible data source is the LPC/eSPI mode bit. Only 199c66ec88fSEmmanuel Vadot applicable to aspeed,ast2500-vuart. 2002eb4d8dcSEmmanuel Vadot deprecated: true 2012eb4d8dcSEmmanuel Vadot 2022eb4d8dcSEmmanuel Vadot aspeed,lpc-io-reg: 2032eb4d8dcSEmmanuel Vadot $ref: '/schemas/types.yaml#/definitions/uint32' 2042eb4d8dcSEmmanuel Vadot description: | 2052eb4d8dcSEmmanuel Vadot The VUART LPC address. Only applicable to aspeed,ast2500-vuart. 2062eb4d8dcSEmmanuel Vadot 2072eb4d8dcSEmmanuel Vadot aspeed,lpc-interrupts: 2082eb4d8dcSEmmanuel Vadot $ref: "/schemas/types.yaml#/definitions/uint32-array" 2092eb4d8dcSEmmanuel Vadot minItems: 2 2102eb4d8dcSEmmanuel Vadot maxItems: 2 2112eb4d8dcSEmmanuel Vadot description: | 2122eb4d8dcSEmmanuel Vadot A 2-cell property describing the VUART SIRQ number and SIRQ 2132eb4d8dcSEmmanuel Vadot polarity (IRQ_TYPE_LEVEL_LOW or IRQ_TYPE_LEVEL_HIGH). Only 2142eb4d8dcSEmmanuel Vadot applicable to aspeed,ast2500-vuart. 215c66ec88fSEmmanuel Vadot 216c66ec88fSEmmanuel Vadotrequired: 217c66ec88fSEmmanuel Vadot - reg 218c66ec88fSEmmanuel Vadot - interrupts 219c66ec88fSEmmanuel Vadot 220c66ec88fSEmmanuel VadotunevaluatedProperties: false 221c66ec88fSEmmanuel Vadot 222c66ec88fSEmmanuel Vadotexamples: 223c66ec88fSEmmanuel Vadot - | 224c66ec88fSEmmanuel Vadot serial@80230000 { 225c66ec88fSEmmanuel Vadot compatible = "ns8250"; 226c66ec88fSEmmanuel Vadot reg = <0x80230000 0x100>; 227c66ec88fSEmmanuel Vadot interrupts = <10>; 228c66ec88fSEmmanuel Vadot reg-shift = <2>; 229c66ec88fSEmmanuel Vadot clock-frequency = <48000000>; 230c66ec88fSEmmanuel Vadot }; 231c66ec88fSEmmanuel Vadot - | 232c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 233c66ec88fSEmmanuel Vadot serial@49042000 { 234c66ec88fSEmmanuel Vadot compatible = "andestech,uart16550", "ns16550a"; 235c66ec88fSEmmanuel Vadot reg = <0x49042000 0x400>; 236c66ec88fSEmmanuel Vadot interrupts = <80>; 237c66ec88fSEmmanuel Vadot clock-frequency = <48000000>; 238c66ec88fSEmmanuel Vadot cts-gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; 239c66ec88fSEmmanuel Vadot rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; 240c66ec88fSEmmanuel Vadot dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; 241c66ec88fSEmmanuel Vadot dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; 242c66ec88fSEmmanuel Vadot dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; 243c66ec88fSEmmanuel Vadot rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; 244c66ec88fSEmmanuel Vadot }; 245c66ec88fSEmmanuel Vadot - | 246c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/aspeed-clock.h> 2472eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 248c66ec88fSEmmanuel Vadot serial@1e787000 { 249c66ec88fSEmmanuel Vadot compatible = "aspeed,ast2500-vuart"; 250c66ec88fSEmmanuel Vadot reg = <0x1e787000 0x40>; 251c66ec88fSEmmanuel Vadot reg-shift = <2>; 252c66ec88fSEmmanuel Vadot interrupts = <8>; 253c66ec88fSEmmanuel Vadot clocks = <&syscon ASPEED_CLK_APB>; 254c66ec88fSEmmanuel Vadot no-loopback-test; 2552eb4d8dcSEmmanuel Vadot aspeed,lpc-io-reg = <0x3f8>; 2562eb4d8dcSEmmanuel Vadot aspeed,lpc-interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 257c66ec88fSEmmanuel Vadot }; 258c66ec88fSEmmanuel Vadot 259c66ec88fSEmmanuel Vadot... 260