renesas,cmt.txt 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. * Renesas R-Car Compare Match Timer (CMT)
  2. The CMT is a multi-channel 16/32/48-bit timer/counter with configurable clock
  3. inputs and programmable compare match.
  4. Channels share hardware resources but their counter and compare match value
  5. are independent. A particular CMT instance can implement only a subset of the
  6. channels supported by the CMT model. Channel indices represent the hardware
  7. position of the channel in the CMT and don't match the channel numbers in the
  8. datasheets.
  9. Required Properties:
  10. - compatible: must contain one or more of the following:
  11. - "renesas,cmt-32-r8a7740" for the r8a7740 32-bit CMT
  12. (CMT0)
  13. - "renesas,cmt-32-sh7372" for the sh7372 32-bit CMT
  14. (CMT0)
  15. - "renesas,cmt-32-sh73a0" for the sh73a0 32-bit CMT
  16. (CMT0)
  17. - "renesas,cmt-32" for all 32-bit CMT without fast clock support
  18. (CMT0 on sh7372, sh73a0 and r8a7740)
  19. This is a fallback for the above renesas,cmt-32-* entries.
  20. - "renesas,cmt-32-fast-r8a7740" for the r8a7740 32-bit CMT with fast
  21. clock support (CMT[234])
  22. - "renesas,cmt-32-fast-sh7372" for the sh7372 32-bit CMT with fast
  23. clock support (CMT[234])
  24. - "renesas,cmt-32-fast-sh73a0" for the sh73A0 32-bit CMT with fast
  25. clock support (CMT[234])
  26. - "renesas,cmt-32-fast" for all 32-bit CMT with fast clock support
  27. (CMT[234] on sh7372, sh73a0 and r8a7740)
  28. This is a fallback for the above renesas,cmt-32-fast-* entries.
  29. - "renesas,cmt-48-sh7372" for the sh7372 48-bit CMT
  30. (CMT1)
  31. - "renesas,cmt-48-sh73a0" for the sh73A0 48-bit CMT
  32. (CMT1)
  33. - "renesas,cmt-48-r8a7740" for the r8a7740 48-bit CMT
  34. (CMT1)
  35. - "renesas,cmt-48" for all non-second generation 48-bit CMT
  36. (CMT1 on sh7372, sh73a0 and r8a7740)
  37. This is a fallback for the above renesas,cmt-48-* entries.
  38. - "renesas,cmt-48-r8a73a4" for the r8a73a4 48-bit CMT
  39. (CMT[01])
  40. - "renesas,cmt-48-r8a7790" for the r8a7790 48-bit CMT
  41. (CMT[01])
  42. - "renesas,cmt-48-r8a7791" for the r8a7791 48-bit CMT
  43. (CMT[01])
  44. - "renesas,cmt-48-gen2" for all second generation 48-bit CMT
  45. (CMT[01] on r8a73a4, r8a7790 and r8a7791)
  46. This is a fallback for the renesas,cmt-48-r8a73a4,
  47. renesas,cmt-48-r8a7790 and renesas,cmt-48-r8a7791 entries.
  48. - reg: base address and length of the registers block for the timer module.
  49. - interrupts: interrupt-specifier for the timer, one per channel.
  50. - clocks: a list of phandle + clock-specifier pairs, one for each entry
  51. in clock-names.
  52. - clock-names: must contain "fck" for the functional clock.
  53. - renesas,channels-mask: bitmask of the available channels.
  54. Example: R8A7790 (R-Car H2) CMT0 node
  55. CMT0 on R8A7790 implements hardware channels 5 and 6 only and names
  56. them channels 0 and 1 in the documentation.
  57. cmt0: timer@ffca0000 {
  58. compatible = "renesas,cmt-48-r8a7790", "renesas,cmt-48-gen2";
  59. reg = <0 0xffca0000 0 0x1004>;
  60. interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
  61. <0 142 IRQ_TYPE_LEVEL_HIGH>;
  62. clocks = <&mstp1_clks R8A7790_CLK_CMT0>;
  63. clock-names = "fck";
  64. renesas,channels-mask = <0x60>;
  65. };