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 v5 4/5] dt-bindings: counter: microchip-tcb-capture counter Date: Tue, 19 May 2020 10:37:15 +0200 [thread overview] Message-ID: <20200519083716.938384-5-kamel.bouhara@bootlin.com> (raw) In-Reply-To: <20200519083716.938384-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 | 32 +++++++++++++++++-- 1 file 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 38403760f64d..e3319c4501c1 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,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>; + }; + }; -- 2.25.0
WARNING: multiple messages have this Message-ID (diff)
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: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Kamel Bouhara <kamel.bouhara@bootlin.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, linux-input@vger.kernel.org Subject: [PATCH v5 4/5] dt-bindings: counter: microchip-tcb-capture counter Date: Tue, 19 May 2020 10:37:15 +0200 [thread overview] Message-ID: <20200519083716.938384-5-kamel.bouhara@bootlin.com> (raw) In-Reply-To: <20200519083716.938384-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 | 32 +++++++++++++++++-- 1 file 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 38403760f64d..e3319c4501c1 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,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>; + }; + }; -- 2.25.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-19 8:37 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-19 8:37 [PATCH v5 0/5] Microchip TCB Capture driver Kamel Bouhara 2020-05-19 8:37 ` Kamel Bouhara 2020-05-19 8:37 ` [PATCH v5 1/5] ARM: at91: add atmel tcb capabilities Kamel Bouhara 2020-05-19 8:37 ` Kamel Bouhara 2020-05-19 8:37 ` [PATCH v5 2/5] dt-bindings: atmel-tcb: convert bindings to json-schema Kamel Bouhara 2020-05-19 8:37 ` Kamel Bouhara 2020-05-26 22:49 ` Rob Herring 2020-05-26 22:49 ` Rob Herring 2020-05-19 8:37 ` [PATCH v5 3/5] dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible Kamel Bouhara 2020-05-19 8:37 ` [PATCH v5 3/5] dt-bindings: microchip: atmel, at91rm9200-tcb: " Kamel Bouhara 2020-05-26 22:50 ` Rob Herring 2020-05-26 22:50 ` Rob Herring 2020-05-19 8:37 ` Kamel Bouhara [this message] 2020-05-19 8:37 ` [PATCH v5 4/5] dt-bindings: counter: microchip-tcb-capture counter Kamel Bouhara 2020-05-26 22:51 ` Rob Herring 2020-05-26 22:51 ` Rob Herring 2020-05-19 8:37 ` [PATCH v5 5/5] counter: Add microchip TCB capture counter Kamel Bouhara 2020-05-19 8:37 ` Kamel Bouhara 2020-05-24 15:16 ` Jonathan Cameron 2020-05-24 15:16 ` Jonathan Cameron 2020-05-24 15:35 ` William Breathitt Gray 2020-05-24 15:35 ` William Breathitt Gray
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=20200519083716.938384-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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.