1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/timer/nvidia,tegra-timer.yaml# 5*fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: NVIDIA Tegra timer 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Stephen Warren <swarren@nvidia.com> 11c9ccf3a3SEmmanuel Vadot 12c9ccf3a3SEmmanuel VadotallOf: 13c9ccf3a3SEmmanuel Vadot - if: 14c9ccf3a3SEmmanuel Vadot properties: 15c9ccf3a3SEmmanuel Vadot compatible: 16c9ccf3a3SEmmanuel Vadot contains: 17c9ccf3a3SEmmanuel Vadot const: nvidia,tegra210-timer 18c9ccf3a3SEmmanuel Vadot then: 19c9ccf3a3SEmmanuel Vadot properties: 20c9ccf3a3SEmmanuel Vadot interrupts: 21c9ccf3a3SEmmanuel Vadot # Either a single combined interrupt or up to 14 individual interrupts 22c9ccf3a3SEmmanuel Vadot minItems: 1 23c9ccf3a3SEmmanuel Vadot maxItems: 14 24c9ccf3a3SEmmanuel Vadot description: > 25c9ccf3a3SEmmanuel Vadot A list of 14 interrupts; one per each timer channels 0 through 13 26c9ccf3a3SEmmanuel Vadot 27c9ccf3a3SEmmanuel Vadot - if: 28c9ccf3a3SEmmanuel Vadot properties: 29c9ccf3a3SEmmanuel Vadot compatible: 30c9ccf3a3SEmmanuel Vadot oneOf: 31c9ccf3a3SEmmanuel Vadot - items: 32c9ccf3a3SEmmanuel Vadot - enum: 33c9ccf3a3SEmmanuel Vadot - nvidia,tegra114-timer 34c9ccf3a3SEmmanuel Vadot - nvidia,tegra124-timer 35c9ccf3a3SEmmanuel Vadot - nvidia,tegra132-timer 36c9ccf3a3SEmmanuel Vadot - const: nvidia,tegra30-timer 37c9ccf3a3SEmmanuel Vadot - items: 38c9ccf3a3SEmmanuel Vadot - const: nvidia,tegra30-timer 39c9ccf3a3SEmmanuel Vadot - const: nvidia,tegra20-timer 40c9ccf3a3SEmmanuel Vadot then: 41c9ccf3a3SEmmanuel Vadot properties: 42c9ccf3a3SEmmanuel Vadot interrupts: 43c9ccf3a3SEmmanuel Vadot # Either a single combined interrupt or up to 6 individual interrupts 44c9ccf3a3SEmmanuel Vadot minItems: 1 45c9ccf3a3SEmmanuel Vadot maxItems: 6 46c9ccf3a3SEmmanuel Vadot description: > 47c9ccf3a3SEmmanuel Vadot A list of 6 interrupts; one per each of timer channels 1 through 5, 48c9ccf3a3SEmmanuel Vadot and one for the shared interrupt for the remaining channels. 49c9ccf3a3SEmmanuel Vadot 50c9ccf3a3SEmmanuel Vadot - if: 51c9ccf3a3SEmmanuel Vadot properties: 52c9ccf3a3SEmmanuel Vadot compatible: 53c9ccf3a3SEmmanuel Vadot const: nvidia,tegra20-timer 54c9ccf3a3SEmmanuel Vadot then: 55c9ccf3a3SEmmanuel Vadot properties: 56c9ccf3a3SEmmanuel Vadot interrupts: 57c9ccf3a3SEmmanuel Vadot # Either a single combined interrupt or up to 4 individual interrupts 58c9ccf3a3SEmmanuel Vadot minItems: 1 59c9ccf3a3SEmmanuel Vadot maxItems: 4 60c9ccf3a3SEmmanuel Vadot description: | 61c9ccf3a3SEmmanuel Vadot A list of 4 interrupts; one per timer channel. 62c9ccf3a3SEmmanuel Vadot 63c9ccf3a3SEmmanuel Vadotproperties: 64c9ccf3a3SEmmanuel Vadot compatible: 65c9ccf3a3SEmmanuel Vadot oneOf: 66c9ccf3a3SEmmanuel Vadot - const: nvidia,tegra210-timer 67c9ccf3a3SEmmanuel Vadot description: > 68c9ccf3a3SEmmanuel Vadot The Tegra210 timer provides fourteen 29-bit timer counters and one 32-bit 69c9ccf3a3SEmmanuel Vadot timestamp counter. The TMRs run at either a fixed 1 MHz clock rate derived 70c9ccf3a3SEmmanuel Vadot from the oscillator clock (TMR0-TMR9) or directly at the oscillator clock 71c9ccf3a3SEmmanuel Vadot (TMR10-TMR13). Each TMR can be programmed to generate one-shot, periodic, 72c9ccf3a3SEmmanuel Vadot or watchdog interrupts. 73c9ccf3a3SEmmanuel Vadot - items: 74c9ccf3a3SEmmanuel Vadot - enum: 75c9ccf3a3SEmmanuel Vadot - nvidia,tegra114-timer 76c9ccf3a3SEmmanuel Vadot - nvidia,tegra124-timer 77c9ccf3a3SEmmanuel Vadot - nvidia,tegra132-timer 78c9ccf3a3SEmmanuel Vadot - const: nvidia,tegra30-timer 79c9ccf3a3SEmmanuel Vadot - items: 80c9ccf3a3SEmmanuel Vadot - const: nvidia,tegra30-timer 81c9ccf3a3SEmmanuel Vadot - const: nvidia,tegra20-timer 82c9ccf3a3SEmmanuel Vadot description: > 83c9ccf3a3SEmmanuel Vadot The Tegra30 timer provides ten 29-bit timer channels, a single 32-bit free 84c9ccf3a3SEmmanuel Vadot running counter, and 5 watchdog modules. The first two channels may also 85c9ccf3a3SEmmanuel Vadot trigger a legacy watchdog reset. 86c9ccf3a3SEmmanuel Vadot - const: nvidia,tegra20-timer 87c9ccf3a3SEmmanuel Vadot description: > 88c9ccf3a3SEmmanuel Vadot The Tegra20 timer provides four 29-bit timer channels and a single 32-bit free 89c9ccf3a3SEmmanuel Vadot running counter. The first two channels may also trigger a watchdog reset. 90c9ccf3a3SEmmanuel Vadot 91c9ccf3a3SEmmanuel Vadot reg: 92c9ccf3a3SEmmanuel Vadot maxItems: 1 93c9ccf3a3SEmmanuel Vadot 94c9ccf3a3SEmmanuel Vadot interrupts: true 95c9ccf3a3SEmmanuel Vadot 96c9ccf3a3SEmmanuel Vadot clocks: 97c9ccf3a3SEmmanuel Vadot maxItems: 1 98c9ccf3a3SEmmanuel Vadot 99c9ccf3a3SEmmanuel Vadot clock-names: 100c9ccf3a3SEmmanuel Vadot items: 101c9ccf3a3SEmmanuel Vadot - const: timer 102c9ccf3a3SEmmanuel Vadot 103c9ccf3a3SEmmanuel Vadot 104c9ccf3a3SEmmanuel Vadotrequired: 105c9ccf3a3SEmmanuel Vadot - compatible 106c9ccf3a3SEmmanuel Vadot - reg 107c9ccf3a3SEmmanuel Vadot - interrupts 108c9ccf3a3SEmmanuel Vadot - clocks 109c9ccf3a3SEmmanuel Vadot 110c9ccf3a3SEmmanuel VadotadditionalProperties: false 111c9ccf3a3SEmmanuel Vadot 112c9ccf3a3SEmmanuel Vadotexamples: 113c9ccf3a3SEmmanuel Vadot - | 114c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 115c9ccf3a3SEmmanuel Vadot timer@60005000 { 116c9ccf3a3SEmmanuel Vadot compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer"; 117c9ccf3a3SEmmanuel Vadot reg = <0x60005000 0x400>; 118c9ccf3a3SEmmanuel Vadot interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>, 119c9ccf3a3SEmmanuel Vadot <0 1 IRQ_TYPE_LEVEL_HIGH>, 120c9ccf3a3SEmmanuel Vadot <0 41 IRQ_TYPE_LEVEL_HIGH>, 121c9ccf3a3SEmmanuel Vadot <0 42 IRQ_TYPE_LEVEL_HIGH>, 122c9ccf3a3SEmmanuel Vadot <0 121 IRQ_TYPE_LEVEL_HIGH>, 123c9ccf3a3SEmmanuel Vadot <0 122 IRQ_TYPE_LEVEL_HIGH>; 124c9ccf3a3SEmmanuel Vadot clocks = <&tegra_car 214>; 125c9ccf3a3SEmmanuel Vadot }; 126c9ccf3a3SEmmanuel Vadot - | 127c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/tegra210-car.h> 128c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 129c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 130c9ccf3a3SEmmanuel Vadot 131c9ccf3a3SEmmanuel Vadot timer@60005000 { 132c9ccf3a3SEmmanuel Vadot compatible = "nvidia,tegra210-timer"; 133c9ccf3a3SEmmanuel Vadot reg = <0x60005000 0x400>; 134c9ccf3a3SEmmanuel Vadot interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>, 135c9ccf3a3SEmmanuel Vadot <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, 136c9ccf3a3SEmmanuel Vadot <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, 137c9ccf3a3SEmmanuel Vadot <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>, 138c9ccf3a3SEmmanuel Vadot <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, 139c9ccf3a3SEmmanuel Vadot <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, 140c9ccf3a3SEmmanuel Vadot <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>, 141c9ccf3a3SEmmanuel Vadot <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>, 142c9ccf3a3SEmmanuel Vadot <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>, 143c9ccf3a3SEmmanuel Vadot <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>, 144c9ccf3a3SEmmanuel Vadot <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>, 145c9ccf3a3SEmmanuel Vadot <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>, 146c9ccf3a3SEmmanuel Vadot <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>, 147c9ccf3a3SEmmanuel Vadot <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>; 148c9ccf3a3SEmmanuel Vadot clocks = <&tegra_car TEGRA210_CLK_TIMER>; 149c9ccf3a3SEmmanuel Vadot clock-names = "timer"; 150c9ccf3a3SEmmanuel Vadot }; 151