diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-06-08 09:16:49 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-12-31 09:50:00 -0500 |
commit | 296cc300bd91c13c51f9f0efa7710392532be0b5 (patch) | |
tree | f0c7aacbb5a38d79377447f246c3a5d14df279b5 | |
parent | ed4ced0c00f88966993e658c7e06e8087698a4f6 (diff) |
ARM: at91: Document new TCB bindings
The current binding for the TCB is not flexible enough for some use cases
and prevents proper utilization of all the channels.
Acked-by: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r-- | Documentation/devicetree/bindings/arm/atmel-at91.txt | 32 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/mfd/atmel-tcb.txt | 56 |
2 files changed, 56 insertions, 32 deletions
diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt index 91cb8e4f2a4f..31220b54d85d 100644 --- a/Documentation/devicetree/bindings/arm/atmel-at91.txt +++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt | |||
@@ -90,38 +90,6 @@ System Timer (ST) required properties: | |||
90 | Its subnodes can be: | 90 | Its subnodes can be: |
91 | - watchdog: compatible should be "atmel,at91rm9200-wdt" | 91 | - watchdog: compatible should be "atmel,at91rm9200-wdt" |
92 | 92 | ||
93 | TC/TCLIB Timer required properties: | ||
94 | - compatible: Should be "atmel,<chip>-tcb". | ||
95 | <chip> can be "at91rm9200" or "at91sam9x5" | ||
96 | - reg: Should contain registers location and length | ||
97 | - interrupts: Should contain all interrupts for the TC block | ||
98 | Note that you can specify several interrupt cells if the TC | ||
99 | block has one interrupt per channel. | ||
100 | - clock-names: tuple listing input clock names. | ||
101 | Required elements: "t0_clk", "slow_clk" | ||
102 | Optional elements: "t1_clk", "t2_clk" | ||
103 | - clocks: phandles to input clocks. | ||
104 | |||
105 | Examples: | ||
106 | |||
107 | One interrupt per TC block: | ||
108 | tcb0: timer@fff7c000 { | ||
109 | compatible = "atmel,at91rm9200-tcb"; | ||
110 | reg = <0xfff7c000 0x100>; | ||
111 | interrupts = <18 4>; | ||
112 | clocks = <&tcb0_clk>; | ||
113 | clock-names = "t0_clk"; | ||
114 | }; | ||
115 | |||
116 | One interrupt per TC channel in a TC block: | ||
117 | tcb1: timer@fffdc000 { | ||
118 | compatible = "atmel,at91rm9200-tcb"; | ||
119 | reg = <0xfffdc000 0x100>; | ||
120 | interrupts = <26 4 27 4 28 4>; | ||
121 | clocks = <&tcb1_clk>; | ||
122 | clock-names = "t0_clk"; | ||
123 | }; | ||
124 | |||
125 | RSTC Reset Controller required properties: | 93 | RSTC Reset Controller required properties: |
126 | - compatible: Should be "atmel,<chip>-rstc". | 94 | - compatible: Should be "atmel,<chip>-rstc". |
127 | <chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3" | 95 | <chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3" |
diff --git a/Documentation/devicetree/bindings/mfd/atmel-tcb.txt b/Documentation/devicetree/bindings/mfd/atmel-tcb.txt new file mode 100644 index 000000000000..c4a83e364cb6 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/atmel-tcb.txt | |||
@@ -0,0 +1,56 @@ | |||
1 | * Device tree bindings for Atmel Timer Counter Blocks | ||
2 | - compatible: Should be "atmel,<chip>-tcb", "simple-mfd", "syscon". | ||
3 | <chip> can be "at91rm9200" or "at91sam9x5" | ||
4 | - reg: Should contain registers location and length | ||
5 | - #address-cells: has to be 1 | ||
6 | - #size-cells: has to be 0 | ||
7 | - interrupts: Should contain all interrupts for the TC block | ||
8 | Note that you can specify several interrupt cells if the TC | ||
9 | block has one interrupt per channel. | ||
10 | - clock-names: tuple listing input clock names. | ||
11 | Required elements: "t0_clk", "slow_clk" | ||
12 | Optional elements: "t1_clk", "t2_clk" | ||
13 | - clocks: phandles to input clocks. | ||
14 | |||
15 | The TCB can expose multiple subdevices: | ||
16 | * a timer | ||
17 | - compatible: Should be "atmel,tcb-timer" | ||
18 | - reg: Should contain the TCB channels to be used. If the | ||
19 | counter width is 16 bits (at91rm9200-tcb), two consecutive | ||
20 | channels are needed. Else, only one channel will be used. | ||
21 | |||
22 | Examples: | ||
23 | |||
24 | One interrupt per TC block: | ||
25 | tcb0: timer@fff7c000 { | ||
26 | compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon"; | ||
27 | #address-cells = <1>; | ||
28 | #size-cells = <0>; | ||
29 | reg = <0xfff7c000 0x100>; | ||
30 | interrupts = <18 4>; | ||
31 | clocks = <&tcb0_clk>, <&clk32k>; | ||
32 | clock-names = "t0_clk", "slow_clk"; | ||
33 | |||
34 | timer@0 { | ||
35 | compatible = "atmel,tcb-timer"; | ||
36 | reg = <0>, <1>; | ||
37 | }; | ||
38 | |||
39 | timer@2 { | ||
40 | compatible = "atmel,tcb-timer"; | ||
41 | reg = <2>; | ||
42 | }; | ||
43 | }; | ||
44 | |||
45 | One interrupt per TC channel in a TC block: | ||
46 | tcb1: timer@fffdc000 { | ||
47 | compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon"; | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <0>; | ||
50 | reg = <0xfffdc000 0x100>; | ||
51 | interrupts = <26 4>, <27 4>, <28 4>; | ||
52 | clocks = <&tcb1_clk>, <&clk32k>; | ||
53 | clock-names = "t0_clk", "slow_clk"; | ||
54 | }; | ||
55 | |||
56 | |||