Laurent Pinchart | 1768aa2 | 2014-02-12 17:12:40 +0100 | [diff] [blame] | 1 | * Renesas R-Car Compare Match Timer (CMT) |
| 2 | |
| 3 | The CMT is a multi-channel 16/32/48-bit timer/counter with configurable clock |
| 4 | inputs and programmable compare match. |
| 5 | |
| 6 | Channels share hardware resources but their counter and compare match value |
| 7 | are independent. A particular CMT instance can implement only a subset of the |
| 8 | channels supported by the CMT model. Channel indices represent the hardware |
| 9 | position of the channel in the CMT and don't match the channel numbers in the |
| 10 | datasheets. |
| 11 | |
| 12 | Required Properties: |
| 13 | |
Simon Horman | 01fe3aaa | 2014-08-27 13:36:51 +0900 | [diff] [blame] | 14 | - compatible: must contain one or more of the following: |
Simon Horman | 01fe3aaa | 2014-08-27 13:36:51 +0900 | [diff] [blame] | 15 | - "renesas,cmt-48-sh73a0" for the sh73A0 48-bit CMT |
| 16 | (CMT1) |
| 17 | - "renesas,cmt-48-r8a7740" for the r8a7740 48-bit CMT |
| 18 | (CMT1) |
| 19 | - "renesas,cmt-48" for all non-second generation 48-bit CMT |
Magnus Damm | 46f6c04 | 2016-03-14 23:23:53 +0900 | [diff] [blame] | 20 | (CMT1 on sh73a0 and r8a7740) |
Simon Horman | 01fe3aaa | 2014-08-27 13:36:51 +0900 | [diff] [blame] | 21 | This is a fallback for the above renesas,cmt-48-* entries. |
| 22 | |
Geert Uytterhoeven | e20824e | 2017-09-18 15:46:41 +0200 | [diff] [blame] | 23 | - "renesas,r8a73a4-cmt0" for the 32-bit CMT0 device included in r8a73a4. |
| 24 | - "renesas,r8a73a4-cmt1" for the 48-bit CMT1 device included in r8a73a4. |
| 25 | - "renesas,r8a7790-cmt0" for the 32-bit CMT0 device included in r8a7790. |
| 26 | - "renesas,r8a7790-cmt1" for the 48-bit CMT1 device included in r8a7790. |
| 27 | - "renesas,r8a7791-cmt0" for the 32-bit CMT0 device included in r8a7791. |
| 28 | - "renesas,r8a7791-cmt1" for the 48-bit CMT1 device included in r8a7791. |
| 29 | - "renesas,r8a7793-cmt0" for the 32-bit CMT0 device included in r8a7793. |
| 30 | - "renesas,r8a7793-cmt1" for the 48-bit CMT1 device included in r8a7793. |
| 31 | - "renesas,r8a7794-cmt0" for the 32-bit CMT0 device included in r8a7794. |
| 32 | - "renesas,r8a7794-cmt1" for the 48-bit CMT1 device included in r8a7794. |
Magnus Damm | 7f03a0e | 2016-03-14 23:24:13 +0900 | [diff] [blame] | 33 | |
Magnus Damm | 6f54cc1 | 2016-03-14 23:24:03 +0900 | [diff] [blame] | 34 | - "renesas,rcar-gen2-cmt0" for 32-bit CMT0 devices included in R-Car Gen2. |
| 35 | - "renesas,rcar-gen2-cmt1" for 48-bit CMT1 devices included in R-Car Gen2. |
Magnus Damm | 7f03a0e | 2016-03-14 23:24:13 +0900 | [diff] [blame] | 36 | These are fallbacks for r8a73a4 and all the R-Car Gen2 |
| 37 | entries listed above. |
Magnus Damm | 6f54cc1 | 2016-03-14 23:24:03 +0900 | [diff] [blame] | 38 | |
Laurent Pinchart | 1768aa2 | 2014-02-12 17:12:40 +0100 | [diff] [blame] | 39 | - reg: base address and length of the registers block for the timer module. |
| 40 | - interrupts: interrupt-specifier for the timer, one per channel. |
| 41 | - clocks: a list of phandle + clock-specifier pairs, one for each entry |
| 42 | in clock-names. |
| 43 | - clock-names: must contain "fck" for the functional clock. |
| 44 | |
Laurent Pinchart | 1768aa2 | 2014-02-12 17:12:40 +0100 | [diff] [blame] | 45 | |
Magnus Damm | 63d9e8c | 2016-03-14 23:24:24 +0900 | [diff] [blame] | 46 | Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes |
Laurent Pinchart | 1768aa2 | 2014-02-12 17:12:40 +0100 | [diff] [blame] | 47 | |
| 48 | cmt0: timer@ffca0000 { |
Geert Uytterhoeven | e20824e | 2017-09-18 15:46:41 +0200 | [diff] [blame] | 49 | compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0"; |
Laurent Pinchart | 1768aa2 | 2014-02-12 17:12:40 +0100 | [diff] [blame] | 50 | reg = <0 0xffca0000 0 0x1004>; |
| 51 | interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>, |
| 52 | <0 142 IRQ_TYPE_LEVEL_HIGH>; |
| 53 | clocks = <&mstp1_clks R8A7790_CLK_CMT0>; |
| 54 | clock-names = "fck"; |
Magnus Damm | 63d9e8c | 2016-03-14 23:24:24 +0900 | [diff] [blame] | 55 | }; |
Laurent Pinchart | 1768aa2 | 2014-02-12 17:12:40 +0100 | [diff] [blame] | 56 | |
Magnus Damm | 63d9e8c | 2016-03-14 23:24:24 +0900 | [diff] [blame] | 57 | cmt1: timer@e6130000 { |
Geert Uytterhoeven | e20824e | 2017-09-18 15:46:41 +0200 | [diff] [blame] | 58 | compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1"; |
Magnus Damm | 63d9e8c | 2016-03-14 23:24:24 +0900 | [diff] [blame] | 59 | reg = <0 0xe6130000 0 0x1004>; |
| 60 | interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>, |
| 61 | <0 121 IRQ_TYPE_LEVEL_HIGH>, |
| 62 | <0 122 IRQ_TYPE_LEVEL_HIGH>, |
| 63 | <0 123 IRQ_TYPE_LEVEL_HIGH>, |
| 64 | <0 124 IRQ_TYPE_LEVEL_HIGH>, |
| 65 | <0 125 IRQ_TYPE_LEVEL_HIGH>, |
| 66 | <0 126 IRQ_TYPE_LEVEL_HIGH>, |
| 67 | <0 127 IRQ_TYPE_LEVEL_HIGH>; |
| 68 | clocks = <&mstp3_clks R8A7790_CLK_CMT1>; |
| 69 | clock-names = "fck"; |
Laurent Pinchart | 1768aa2 | 2014-02-12 17:12:40 +0100 | [diff] [blame] | 70 | }; |