Skip to content

Commit 7eb181c

Browse files
kamel-bouharajic23
authored andcommitted
dt-bindings: counter: microchip-tcb-capture counter
Describe the devicetree binding for the Microchip TCB module. Each counter blocks exposes three independent counters. However, when configured in quadrature decoder, both channel <0> and <1> are required for speed/position and rotation capture (yet only the position is captured). Signed-off-by: Kamel Bouhara <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 3f07899 commit 7eb181c

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,20 @@ properties:
5252

5353
patternProperties:
5454
"^timer@[0-2]$":
55-
description: The timer block channels that are used as timers.
55+
description: The timer block channels that are used as timers or counters.
5656
type: object
5757
properties:
5858
compatible:
59-
const: atmel,tcb-timer
59+
items:
60+
- enum:
61+
- atmel,tcb-timer
62+
- microchip,tcb-capture
6063
reg:
6164
description:
62-
List of channels to use for this particular timer.
65+
List of channels to use for this particular timer. In Microchip TCB capture
66+
mode channels are registered as a counter devices, for the qdec mode TCB0's
67+
channel <0> and <1> are required.
68+
6369
minItems: 1
6470
maxItems: 3
6571

@@ -153,3 +159,23 @@ examples:
153159
reg = <1>;
154160
};
155161
};
162+
/* TCB0 Capture with QDEC: */
163+
timer@f800c000 {
164+
compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
165+
#address-cells = <1>;
166+
#size-cells = <0>;
167+
reg = <0xfff7c000 0x100>;
168+
interrupts = <18 4>;
169+
clocks = <&tcb0_clk>, <&clk32k>;
170+
clock-names = "t0_clk", "slow_clk";
171+
172+
timer@0 {
173+
compatible = "microchip,tcb-capture";
174+
reg = <0>, <1>;
175+
};
176+
177+
timer@2 {
178+
compatible = "atmel,tcb-timer";
179+
reg = <2>;
180+
};
181+
};

0 commit comments

Comments
 (0)