From: Kamel Bouhara <kamel.bouhara@bootlin.com>
To: William Breathitt Gray <vilhelm.gray@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
linux-arm-kernel@lists.infradead.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-iio@vger.kernel.org,
Kamel Bouhara <kamel.bouhara@bootlin.com>
Subject: [PATCH v4 4/5] dt-bindings: counter: microchip-tcb-capture counter
Date: Mon, 11 May 2020 16:05:04 +0200 [thread overview]
Message-ID: <20200511140505.1649111-5-kamel.bouhara@bootlin.com> (raw)
In-Reply-To: <20200511140505.1649111-1-kamel.bouhara@bootlin.com>
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>
---
.../soc/microchip/atmel,at91rm9200-tcb.yaml | 29 +++++++++++++++++--
1 file changed, 26 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 38403760f64d..0bd7b14a1552 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
@@ -148,3 +154,20 @@ examples:
reg = <1>;
};
};
+examples:
+ - |
+ /* TCB Capture with qdec mode: */
+ tcb0: timer@fff7c000 {
+ 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 = "atmel,tcb-capture";
+ reg = <0>, <1>;
+ };
+ };
--
2.25.0
next prev parent reply other threads:[~2020-05-11 14:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 14:05 [PATCH v4 0/5] Microchip TCB Capture driver Kamel Bouhara
2020-05-11 14:05 ` [PATCH v4 1/5] ARM: at91: add atmel tcb capabilities Kamel Bouhara
2020-05-11 14:05 ` [PATCH v4 2/5] dt-bindings: atmel-tcb: convert bindings to json-schema Kamel Bouhara
2020-05-11 14:05 ` [PATCH v4 3/5] dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible Kamel Bouhara
2020-05-11 14:05 ` Kamel Bouhara [this message]
2020-05-11 16:11 ` [PATCH v4 4/5] dt-bindings: counter: microchip-tcb-capture counter Rob Herring
2020-05-12 8:09 ` Kamel Bouhara
2020-05-11 14:05 ` [PATCH v4 5/5] counter: Add microchip TCB capture counter Kamel Bouhara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200511140505.1649111-5-kamel.bouhara@bootlin.com \
--to=kamel.bouhara@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=mark.rutland@arm.com \
--cc=nicolas.ferre@microchip.com \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vilhelm.gray@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).