summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKamel Bouhara <kamel.bouhara@bootlin.com>2020-07-06 13:43:46 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-07-20 13:03:40 +0100
commit7eb181cf06372311f58b237ce9e7434c427b56b7 (patch)
treef25520511971f03e2ab19484939918f5e38c6620
parent3f07899fc363c99b0d1ef00d8c60a380465690b5 (diff)
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 <kamel.bouhara@bootlin.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml32
1 files changed, 29 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml b/Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml
index d226fd7d5258..3cd0b70cd6cf 100644
--- a/Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml
+++ b/Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml
@@ -52,14 +52,20 @@ properties:
patternProperties:
"^timer@[0-2]$":
- description: The timer block channels that are used as timers.
+ description: The timer block channels that are used as timers or counters.
type: object
properties:
compatible:
- const: atmel,tcb-timer
+ items:
+ - enum:
+ - atmel,tcb-timer
+ - microchip,tcb-capture
reg:
description:
- List of channels to use for this particular timer.
+ List of channels to use for this particular timer. In Microchip TCB capture
+ mode channels are registered as a counter devices, for the qdec mode TCB0's
+ channel <0> and <1> are required.
+
minItems: 1
maxItems: 3
@@ -153,3 +159,23 @@ examples:
reg = <1>;
};
};
+ /* TCB0 Capture with QDEC: */
+ timer@f800c000 {
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0xfff7c000 0x100>;
+ interrupts = <18 4>;
+ clocks = <&tcb0_clk>, <&clk32k>;
+ clock-names = "t0_clk", "slow_clk";
+
+ timer@0 {
+ compatible = "microchip,tcb-capture";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };