1dd92b16cSKartik# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2dd92b16cSKartik%YAML 1.2 3dd92b16cSKartik--- 4*975b1e50SRob Herring$id: http://devicetree.org/schemas/timer/nvidia,tegra186-timer.yaml# 5*975b1e50SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml# 6dd92b16cSKartik 7dd92b16cSKartiktitle: NVIDIA Tegra186 timer 8dd92b16cSKartik 9dd92b16cSKartikmaintainers: 10dd92b16cSKartik - Thierry Reding <treding@nvidia.com> 11dd92b16cSKartik 12dd92b16cSKartikdescription: > 13dd92b16cSKartik The Tegra timer provides 29-bit timer counters and a 32-bit timestamp 14dd92b16cSKartik counter. Each NV timer selects its timing reference signal from the 1 MHz 15dd92b16cSKartik reference generated by USEC, TSC or either clk_m or OSC. Each TMR can be 16dd92b16cSKartik programmed to generate one-shot, periodic, or watchdog interrupts. 17dd92b16cSKartik 18dd92b16cSKartik 19dd92b16cSKartikproperties: 20dd92b16cSKartik compatible: 21dd92b16cSKartik oneOf: 22dd92b16cSKartik - const: nvidia,tegra186-timer 23dd92b16cSKartik description: > 24dd92b16cSKartik The Tegra186 timer provides ten 29-bit timer counters. 25dd92b16cSKartik - const: nvidia,tegra234-timer 26dd92b16cSKartik description: > 27dd92b16cSKartik The Tegra234 timer provides sixteen 29-bit timer counters. 28dd92b16cSKartik 29dd92b16cSKartik reg: 30dd92b16cSKartik maxItems: 1 31dd92b16cSKartik 32dd92b16cSKartik interrupts: true 33dd92b16cSKartik 34dd92b16cSKartikallOf: 35dd92b16cSKartik - if: 36dd92b16cSKartik properties: 37dd92b16cSKartik compatible: 38dd92b16cSKartik contains: 39dd92b16cSKartik const: nvidia,tegra186-timer 40dd92b16cSKartik then: 41dd92b16cSKartik properties: 42dd92b16cSKartik interrupts: 43dd92b16cSKartik maxItems: 10 44dd92b16cSKartik description: > 45dd92b16cSKartik One per each timer channels 0 through 9. 46dd92b16cSKartik 47dd92b16cSKartik - if: 48dd92b16cSKartik properties: 49dd92b16cSKartik compatible: 50dd92b16cSKartik contains: 51dd92b16cSKartik const: nvidia,tegra234-timer 52dd92b16cSKartik then: 53dd92b16cSKartik properties: 54dd92b16cSKartik interrupts: 55dd92b16cSKartik maxItems: 16 56dd92b16cSKartik description: > 57dd92b16cSKartik One per each timer channels 0 through 15. 58dd92b16cSKartik 59dd92b16cSKartikrequired: 60dd92b16cSKartik - compatible 61dd92b16cSKartik - reg 62dd92b16cSKartik - interrupts 63dd92b16cSKartik 64dd92b16cSKartikadditionalProperties: false 65dd92b16cSKartik 66dd92b16cSKartikexamples: 67dd92b16cSKartik - | 68dd92b16cSKartik #include <dt-bindings/interrupt-controller/arm-gic.h> 69dd92b16cSKartik #include <dt-bindings/interrupt-controller/irq.h> 70dd92b16cSKartik 71dd92b16cSKartik timer@3010000 { 72dd92b16cSKartik compatible = "nvidia,tegra186-timer"; 73dd92b16cSKartik reg = <0x03010000 0x000e0000>; 74dd92b16cSKartik interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, 75dd92b16cSKartik <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, 76dd92b16cSKartik <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, 77dd92b16cSKartik <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, 78dd92b16cSKartik <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, 79dd92b16cSKartik <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, 80dd92b16cSKartik <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, 81dd92b16cSKartik <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, 82dd92b16cSKartik <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, 83dd92b16cSKartik <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; 84dd92b16cSKartik }; 85dd92b16cSKartik 86dd92b16cSKartik - | 87dd92b16cSKartik #include <dt-bindings/interrupt-controller/arm-gic.h> 88dd92b16cSKartik #include <dt-bindings/interrupt-controller/irq.h> 89dd92b16cSKartik 90dd92b16cSKartik timer@2080000 { 91dd92b16cSKartik compatible = "nvidia,tegra234-timer"; 92dd92b16cSKartik reg = <0x02080000 0x00121000>; 93dd92b16cSKartik interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, 94dd92b16cSKartik <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, 95dd92b16cSKartik <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, 96dd92b16cSKartik <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, 97dd92b16cSKartik <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, 98dd92b16cSKartik <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, 99dd92b16cSKartik <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, 100dd92b16cSKartik <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, 101dd92b16cSKartik <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, 102dd92b16cSKartik <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, 103dd92b16cSKartik <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, 104dd92b16cSKartik <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, 105dd92b16cSKartik <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, 106dd92b16cSKartik <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>, 107dd92b16cSKartik <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, 108dd92b16cSKartik <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; 109dd92b16cSKartik }; 110