pwm-rockchip.yaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Rockchip PWM controller
  7. maintainers:
  8. - Heiko Stuebner <heiko@sntech.de>
  9. properties:
  10. compatible:
  11. oneOf:
  12. - const: rockchip,rk2928-pwm
  13. - const: rockchip,rk3288-pwm
  14. - const: rockchip,rk3328-pwm
  15. - const: rockchip,vop-pwm
  16. - items:
  17. - const: rockchip,rk3036-pwm
  18. - const: rockchip,rk2928-pwm
  19. - items:
  20. - enum:
  21. - rockchip,rk3128-pwm
  22. - rockchip,rk3368-pwm
  23. - rockchip,rk3399-pwm
  24. - rockchip,rv1108-pwm
  25. - const: rockchip,rk3288-pwm
  26. - items:
  27. - enum:
  28. - rockchip,px30-pwm
  29. - rockchip,rk3308-pwm
  30. - rockchip,rk3568-pwm
  31. - rockchip,rk3588-pwm
  32. - rockchip,rv1126-pwm
  33. - const: rockchip,rk3328-pwm
  34. reg:
  35. maxItems: 1
  36. clocks:
  37. minItems: 1
  38. maxItems: 2
  39. clock-names:
  40. maxItems: 2
  41. "#pwm-cells":
  42. enum: [2, 3]
  43. description:
  44. Must be 2 (rk2928) or 3 (rk3288 and later).
  45. See pwm.yaml for a description of the cell format.
  46. required:
  47. - compatible
  48. - reg
  49. allOf:
  50. - $ref: pwm.yaml#
  51. - if:
  52. properties:
  53. compatible:
  54. contains:
  55. enum:
  56. - rockchip,rk3328-pwm
  57. - rockchip,rv1108-pwm
  58. then:
  59. properties:
  60. clocks:
  61. items:
  62. - description: Used to derive the functional clock for the device.
  63. - description: Used as the APB bus clock.
  64. clock-names:
  65. items:
  66. - const: pwm
  67. - const: pclk
  68. required:
  69. - clocks
  70. - clock-names
  71. else:
  72. properties:
  73. clocks:
  74. maxItems: 1
  75. description:
  76. Used both to derive the functional clock
  77. for the device and as the bus clock.
  78. required:
  79. - clocks
  80. additionalProperties: false
  81. examples:
  82. - |
  83. #include <dt-bindings/clock/rk3188-cru-common.h>
  84. pwm0: pwm@20030000 {
  85. compatible = "rockchip,rk2928-pwm";
  86. reg = <0x20030000 0x10>;
  87. clocks = <&cru PCLK_PWM01>;
  88. #pwm-cells = <2>;
  89. };