sprd,sc9860-timer.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/timer/sprd,sc9860-timer.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Spreadtrum SC9860 timer
  7. maintainers:
  8. - Orson Zhai <orsonzhai@gmail.com>
  9. - Baolin Wang <baolin.wang7@gmail.com>
  10. - Chunyan Zhang <zhang.lyra@gmail.com>
  11. description:
  12. The Spreadtrum SC9860 platform provides 3 general-purpose timers.
  13. These timers can support 32bit or 64bit counter, as well as supporting
  14. period mode or one-shot mode, and they can be a wakeup source
  15. during deep sleep.
  16. properties:
  17. compatible:
  18. enum:
  19. - sprd,sc9860-timer
  20. - sprd,sc9860-suspend-timer
  21. reg:
  22. maxItems: 1
  23. interrupts:
  24. maxItems: 1
  25. clocks:
  26. maxItems: 1
  27. required:
  28. - compatible
  29. - reg
  30. - clocks
  31. allOf:
  32. - if:
  33. properties:
  34. compatible:
  35. contains:
  36. const: sprd,sc9860-timer
  37. then:
  38. required:
  39. - interrupts
  40. additionalProperties: false
  41. examples:
  42. - |
  43. #include <dt-bindings/interrupt-controller/arm-gic.h>
  44. #include <dt-bindings/interrupt-controller/irq.h>
  45. soc {
  46. #address-cells = <2>;
  47. #size-cells = <2>;
  48. timer@40050000 {
  49. compatible = "sprd,sc9860-timer";
  50. reg = <0 0x40050000 0 0x20>;
  51. interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
  52. clocks = <&ext_32k>;
  53. };
  54. };
  55. ...