14b88c673SAlexandre Belloni# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
24b88c673SAlexandre Belloni%YAML 1.2
34b88c673SAlexandre Belloni---
44b88c673SAlexandre Belloni$id: "http://devicetree.org/schemas/soc/microchip/atmel,at91rm9200-tcb.yaml#"
54b88c673SAlexandre Belloni$schema: "http://devicetree.org/meta-schemas/core.yaml#"
64b88c673SAlexandre Belloni
74b88c673SAlexandre Bellonititle: Atmel Timer Counter Block
84b88c673SAlexandre Belloni
94b88c673SAlexandre Bellonimaintainers:
104b88c673SAlexandre Belloni  - Alexandre Belloni <alexandre.belloni@bootlin.com>
114b88c673SAlexandre Belloni
124b88c673SAlexandre Bellonidescription: |
134b88c673SAlexandre Belloni  The Atmel (now Microchip) SoCs have timers named Timer Counter Block. Each
144b88c673SAlexandre Belloni  timer has three channels with two counters each.
154b88c673SAlexandre Belloni
164b88c673SAlexandre Belloniproperties:
174b88c673SAlexandre Belloni  compatible:
184b88c673SAlexandre Belloni    items:
194b88c673SAlexandre Belloni      - enum:
204b88c673SAlexandre Belloni          - atmel,at91rm9200-tcb
214b88c673SAlexandre Belloni          - atmel,at91sam9x5-tcb
224b88c673SAlexandre Belloni      - const: simple-mfd
234b88c673SAlexandre Belloni      - const: syscon
244b88c673SAlexandre Belloni
254b88c673SAlexandre Belloni  reg:
264b88c673SAlexandre Belloni    maxItems: 1
274b88c673SAlexandre Belloni
284b88c673SAlexandre Belloni  interrupts:
294b88c673SAlexandre Belloni    description:
304b88c673SAlexandre Belloni      List of interrupts. One interrupt per TCB channel if available or one
314b88c673SAlexandre Belloni      interrupt for the TC block
324b88c673SAlexandre Belloni    minItems: 1
334b88c673SAlexandre Belloni    maxItems: 3
344b88c673SAlexandre Belloni
354b88c673SAlexandre Belloni  clock-names:
364b88c673SAlexandre Belloni    description:
374b88c673SAlexandre Belloni      List of clock names. Always includes t0_clk and slow clk. Also includes
384b88c673SAlexandre Belloni      t1_clk and t2_clk if a clock per channel is available.
394b88c673SAlexandre Belloni    oneOf:
404b88c673SAlexandre Belloni      - items:
414b88c673SAlexandre Belloni        - const: t0_clk
424b88c673SAlexandre Belloni        - const: slow_clk
434b88c673SAlexandre Belloni      - items:
444b88c673SAlexandre Belloni        - const: t0_clk
454b88c673SAlexandre Belloni        - const: t1_clk
464b88c673SAlexandre Belloni        - const: t2_clk
474b88c673SAlexandre Belloni        - const: slow_clk
484b88c673SAlexandre Belloni    minItems: 2
494b88c673SAlexandre Belloni    maxItems: 4
504b88c673SAlexandre Belloni
514b88c673SAlexandre Belloni  clocks:
524b88c673SAlexandre Belloni    minItems: 2
534b88c673SAlexandre Belloni    maxItems: 4
544b88c673SAlexandre Belloni
554b88c673SAlexandre Belloni  '#address-cells':
564b88c673SAlexandre Belloni    const: 1
574b88c673SAlexandre Belloni
584b88c673SAlexandre Belloni  '#size-cells':
594b88c673SAlexandre Belloni    const: 0
604b88c673SAlexandre Belloni
614b88c673SAlexandre BellonipatternProperties:
624b88c673SAlexandre Belloni  "^timer@[0-2]$":
634b88c673SAlexandre Belloni    description: The timer block channels that are used as timers.
644b88c673SAlexandre Belloni    type: object
654b88c673SAlexandre Belloni    properties:
664b88c673SAlexandre Belloni      compatible:
674b88c673SAlexandre Belloni        const: atmel,tcb-timer
684b88c673SAlexandre Belloni      reg:
694b88c673SAlexandre Belloni        description:
704b88c673SAlexandre Belloni          List of channels to use for this particular timer.
714b88c673SAlexandre Belloni        minItems: 1
724b88c673SAlexandre Belloni        maxItems: 3
734b88c673SAlexandre Belloni
744b88c673SAlexandre Belloni    required:
754b88c673SAlexandre Belloni      - compatible
764b88c673SAlexandre Belloni      - reg
774b88c673SAlexandre Belloni
784b88c673SAlexandre Bellonirequired:
794b88c673SAlexandre Belloni  - compatible
804b88c673SAlexandre Belloni  - reg
814b88c673SAlexandre Belloni  - interrupts
824b88c673SAlexandre Belloni  - clocks
834b88c673SAlexandre Belloni  - clock-names
844b88c673SAlexandre Belloni  - '#address-cells'
854b88c673SAlexandre Belloni  - '#size-cells'
864b88c673SAlexandre Belloni
874b88c673SAlexandre BelloniadditionalProperties: false
884b88c673SAlexandre Belloni
894b88c673SAlexandre Belloniexamples:
904b88c673SAlexandre Belloni  - |
914b88c673SAlexandre Belloni    /* One interrupt per TC block: */
924b88c673SAlexandre Belloni        tcb0: timer@fff7c000 {
934b88c673SAlexandre Belloni                compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
944b88c673SAlexandre Belloni                #address-cells = <1>;
954b88c673SAlexandre Belloni                #size-cells = <0>;
964b88c673SAlexandre Belloni                reg = <0xfff7c000 0x100>;
974b88c673SAlexandre Belloni                interrupts = <18 4>;
984b88c673SAlexandre Belloni                clocks = <&tcb0_clk>, <&clk32k>;
994b88c673SAlexandre Belloni                clock-names = "t0_clk", "slow_clk";
1004b88c673SAlexandre Belloni
1014b88c673SAlexandre Belloni                timer@0 {
1024b88c673SAlexandre Belloni                        compatible = "atmel,tcb-timer";
1034b88c673SAlexandre Belloni                        reg = <0>, <1>;
1044b88c673SAlexandre Belloni                };
1054b88c673SAlexandre Belloni
1064b88c673SAlexandre Belloni                timer@2 {
1074b88c673SAlexandre Belloni                        compatible = "atmel,tcb-timer";
1084b88c673SAlexandre Belloni                        reg = <2>;
1094b88c673SAlexandre Belloni                };
1104b88c673SAlexandre Belloni        };
1114b88c673SAlexandre Belloni
1124b88c673SAlexandre Belloni    /* One interrupt per TC channel in a TC block: */
1134b88c673SAlexandre Belloni        tcb1: timer@fffdc000 {
1144b88c673SAlexandre Belloni                compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
1154b88c673SAlexandre Belloni                #address-cells = <1>;
1164b88c673SAlexandre Belloni                #size-cells = <0>;
1174b88c673SAlexandre Belloni                reg = <0xfffdc000 0x100>;
1184b88c673SAlexandre Belloni                interrupts = <26 4>, <27 4>, <28 4>;
1194b88c673SAlexandre Belloni                clocks = <&tcb1_clk>, <&clk32k>;
1204b88c673SAlexandre Belloni                clock-names = "t0_clk", "slow_clk";
1214b88c673SAlexandre Belloni
1224b88c673SAlexandre Belloni                timer@0 {
1234b88c673SAlexandre Belloni                        compatible = "atmel,tcb-timer";
1244b88c673SAlexandre Belloni                        reg = <0>;
1254b88c673SAlexandre Belloni                };
1264b88c673SAlexandre Belloni
1274b88c673SAlexandre Belloni                timer@1 {
1284b88c673SAlexandre Belloni                        compatible = "atmel,tcb-timer";
1294b88c673SAlexandre Belloni                        reg = <1>;
1304b88c673SAlexandre Belloni                };
1314b88c673SAlexandre Belloni        };
132