Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+56 -32
-32
Documentation/devicetree/bindings/arm/atmel-at91.txt
··· 90 90 Its subnodes can be: 91 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 93 RSTC Reset Controller required properties: 126 94 - compatible: Should be "atmel,<chip>-rstc". 127 95 <chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3"
+56
Documentation/devicetree/bindings/mfd/atmel-tcb.txt
··· 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 +