pwm-amlogic.yaml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/pwm/pwm-amlogic.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Amlogic PWM
  7. maintainers:
  8. - Heiner Kallweit <hkallweit1@gmail.com>
  9. properties:
  10. compatible:
  11. oneOf:
  12. - enum:
  13. - amlogic,meson8b-pwm
  14. - amlogic,meson-gxbb-pwm
  15. - amlogic,meson-gxbb-ao-pwm
  16. - amlogic,meson-axg-ee-pwm
  17. - amlogic,meson-axg-ao-pwm
  18. - amlogic,meson-g12a-ee-pwm
  19. - amlogic,meson-g12a-ao-pwm-ab
  20. - amlogic,meson-g12a-ao-pwm-cd
  21. deprecated: true
  22. - items:
  23. - const: amlogic,meson-gx-pwm
  24. - const: amlogic,meson-gxbb-pwm
  25. deprecated: true
  26. - items:
  27. - const: amlogic,meson-gx-ao-pwm
  28. - const: amlogic,meson-gxbb-ao-pwm
  29. deprecated: true
  30. - items:
  31. - const: amlogic,meson8-pwm
  32. - const: amlogic,meson8b-pwm
  33. deprecated: true
  34. - enum:
  35. - amlogic,meson8-pwm-v2
  36. - amlogic,meson-s4-pwm
  37. - items:
  38. - enum:
  39. - amlogic,meson-a1-pwm
  40. - const: amlogic,meson-s4-pwm
  41. - items:
  42. - enum:
  43. - amlogic,meson8b-pwm-v2
  44. - amlogic,meson-gxbb-pwm-v2
  45. - amlogic,meson-axg-pwm-v2
  46. - amlogic,meson-g12-pwm-v2
  47. - const: amlogic,meson8-pwm-v2
  48. reg:
  49. maxItems: 1
  50. clocks:
  51. minItems: 1
  52. maxItems: 4
  53. clock-names:
  54. minItems: 1
  55. maxItems: 2
  56. power-domains:
  57. maxItems: 1
  58. "#pwm-cells":
  59. const: 3
  60. required:
  61. - compatible
  62. - reg
  63. allOf:
  64. - $ref: pwm.yaml#
  65. - if:
  66. properties:
  67. compatible:
  68. contains:
  69. enum:
  70. - amlogic,meson8-pwm
  71. - amlogic,meson8b-pwm
  72. - amlogic,meson-gxbb-pwm
  73. - amlogic,meson-gxbb-ao-pwm
  74. - amlogic,meson-axg-ee-pwm
  75. - amlogic,meson-axg-ao-pwm
  76. - amlogic,meson-g12a-ee-pwm
  77. - amlogic,meson-g12a-ao-pwm-ab
  78. - amlogic,meson-g12a-ao-pwm-cd
  79. then:
  80. # Obsolete historic bindings tied to the driver implementation
  81. # The clocks provided here are meant to be matched with the input
  82. # known (hard-coded) in the driver and used to select pwm clock
  83. # source. Currently, the linux driver ignores this.
  84. # This is kept to maintain ABI backward compatibility.
  85. properties:
  86. clocks:
  87. maxItems: 2
  88. clock-names:
  89. oneOf:
  90. - items:
  91. - enum: [clkin0, clkin1]
  92. - items:
  93. - const: clkin0
  94. - const: clkin1
  95. # Newer binding where clock describe the actual clock inputs of the pwm
  96. # block. These are necessary but some inputs may be grounded.
  97. - if:
  98. properties:
  99. compatible:
  100. contains:
  101. enum:
  102. - amlogic,meson8-pwm-v2
  103. then:
  104. properties:
  105. clocks:
  106. minItems: 1
  107. items:
  108. - description: input clock 0 of the pwm block
  109. - description: input clock 1 of the pwm block
  110. - description: input clock 2 of the pwm block
  111. - description: input clock 3 of the pwm block
  112. clock-names: false
  113. required:
  114. - clocks
  115. # Newer IP block take a single input per channel, instead of 4 inputs
  116. # for both channels
  117. - if:
  118. properties:
  119. compatible:
  120. contains:
  121. enum:
  122. - amlogic,meson-s4-pwm
  123. then:
  124. properties:
  125. clocks:
  126. items:
  127. - description: input clock of PWM channel A
  128. - description: input clock of PWM channel B
  129. clock-names: false
  130. required:
  131. - clocks
  132. - if:
  133. properties:
  134. compatible:
  135. contains:
  136. enum:
  137. - amlogic,meson-a1-pwm
  138. then:
  139. required:
  140. - power-domains
  141. additionalProperties: false
  142. examples:
  143. - |
  144. pwm@8550 {
  145. compatible = "amlogic,meson-gxbb-pwm";
  146. reg = <0x08550 0x10>;
  147. clocks = <&xtal>, <&xtal>;
  148. clock-names = "clkin0", "clkin1";
  149. #pwm-cells = <3>;
  150. };
  151. - |
  152. pwm@2000 {
  153. compatible = "amlogic,meson8-pwm-v2";
  154. reg = <0x1000 0x10>;
  155. clocks = <&xtal>, <0>, <&fdiv4>, <&fdiv5>;
  156. #pwm-cells = <3>;
  157. };
  158. - |
  159. pwm@1000 {
  160. compatible = "amlogic,meson-s4-pwm";
  161. reg = <0x1000 0x10>;
  162. clocks = <&pwm_src_a>, <&pwm_src_b>;
  163. #pwm-cells = <3>;
  164. };