8250.yaml 6.9 KB

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