samsung_uart.yaml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/serial/samsung_uart.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Samsung S3C, S5P, Exynos, and S5L (Apple SoC) SoC UART Controller
  7. maintainers:
  8. - Krzysztof Kozlowski <krzk@kernel.org>
  9. - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  10. description: |+
  11. Each Samsung UART should have an alias correctly numbered in the "aliases"
  12. node, according to serialN format, where N is the port number (non-negative
  13. decimal integer) as specified by User's Manual of respective SoC.
  14. properties:
  15. compatible:
  16. oneOf:
  17. - enum:
  18. - apple,s5l-uart
  19. - axis,artpec8-uart
  20. - google,gs101-uart
  21. - samsung,s3c6400-uart
  22. - samsung,s5pv210-uart
  23. - samsung,exynos4210-uart
  24. - samsung,exynos5433-uart
  25. - samsung,exynos850-uart
  26. - items:
  27. - enum:
  28. - samsung,exynos7-uart
  29. - tesla,fsd-uart
  30. - const: samsung,exynos4210-uart
  31. - items:
  32. - enum:
  33. - samsung,exynos7885-uart
  34. - const: samsung,exynos5433-uart
  35. - items:
  36. - enum:
  37. - samsung,exynosautov9-uart
  38. - samsung,exynosautov920-uart
  39. - const: samsung,exynos850-uart
  40. reg:
  41. maxItems: 1
  42. reg-io-width:
  43. description: |
  44. The size (in bytes) of the IO accesses that should be performed
  45. on the device.
  46. enum: [ 1, 4 ]
  47. clocks:
  48. minItems: 2
  49. maxItems: 5
  50. clock-names:
  51. minItems: 2
  52. maxItems: 5
  53. dmas:
  54. items:
  55. - description: DMA controller phandle and request line for RX
  56. - description: DMA controller phandle and request line for TX
  57. dma-names:
  58. items:
  59. - const: rx
  60. - const: tx
  61. interrupts:
  62. description: RX interrupt and optionally TX interrupt.
  63. minItems: 1
  64. maxItems: 2
  65. power-domains:
  66. maxItems: 1
  67. samsung,uart-fifosize:
  68. description: The fifo size supported by the UART channel.
  69. $ref: /schemas/types.yaml#/definitions/uint32
  70. enum: [16, 64, 256]
  71. required:
  72. - compatible
  73. - clocks
  74. - clock-names
  75. - interrupts
  76. - reg
  77. allOf:
  78. - $ref: serial.yaml#
  79. - if:
  80. properties:
  81. compatible:
  82. contains:
  83. enum:
  84. - samsung,s3c6400-uart
  85. then:
  86. properties:
  87. clocks:
  88. minItems: 3
  89. maxItems: 3
  90. clock-names:
  91. items:
  92. - const: uart
  93. - const: clk_uart_baud2
  94. - const: clk_uart_baud3
  95. else:
  96. properties:
  97. clock-names:
  98. minItems: 2
  99. items:
  100. - const: uart
  101. - const: clk_uart_baud0
  102. - const: clk_uart_baud1
  103. - const: clk_uart_baud2
  104. - const: clk_uart_baud3
  105. - if:
  106. properties:
  107. compatible:
  108. contains:
  109. enum:
  110. - samsung,s5pv210-uart
  111. then:
  112. properties:
  113. clocks:
  114. minItems: 3
  115. maxItems: 3
  116. clock-names:
  117. minItems: 3
  118. maxItems: 3
  119. - if:
  120. properties:
  121. compatible:
  122. contains:
  123. enum:
  124. - apple,s5l-uart
  125. - axis,artpec8-uart
  126. - samsung,exynos4210-uart
  127. - samsung,exynos5433-uart
  128. then:
  129. properties:
  130. clocks:
  131. maxItems: 2
  132. clock-names:
  133. maxItems: 2
  134. - if:
  135. properties:
  136. compatible:
  137. contains:
  138. enum:
  139. - google,gs101-uart
  140. then:
  141. required:
  142. - samsung,uart-fifosize
  143. properties:
  144. reg-io-width: false
  145. clocks:
  146. maxItems: 2
  147. clock-names:
  148. maxItems: 2
  149. unevaluatedProperties: false
  150. examples:
  151. - |
  152. #include <dt-bindings/clock/samsung,s3c64xx-clock.h>
  153. uart0: serial@7f005000 {
  154. compatible = "samsung,s3c6400-uart";
  155. reg = <0x7f005000 0x100>;
  156. interrupt-parent = <&vic1>;
  157. interrupts = <5>;
  158. clock-names = "uart", "clk_uart_baud2",
  159. "clk_uart_baud3";
  160. clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
  161. <&clocks SCLK_UART>;
  162. samsung,uart-fifosize = <16>;
  163. };
  164. - |
  165. #include <dt-bindings/clock/google,gs101.h>
  166. #include <dt-bindings/interrupt-controller/arm-gic.h>
  167. #include <dt-bindings/interrupt-controller/irq.h>
  168. serial_0: serial@10a00000 {
  169. compatible = "google,gs101-uart";
  170. reg = <0x10a00000 0xc0>;
  171. clocks = <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP1_PCLK_0>,
  172. <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP1_IPCLK_0>;
  173. clock-names = "uart", "clk_uart_baud0";
  174. interrupts = <GIC_SPI 634 IRQ_TYPE_LEVEL_HIGH 0>;
  175. pinctrl-0 = <&uart0_bus>;
  176. pinctrl-names = "default";
  177. samsung,uart-fifosize = <256>;
  178. };