16be33864SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 26be33864SEmmanuel Vadot%YAML 1.2 36be33864SEmmanuel Vadot--- 46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/timer/arm,sp804.yaml# 56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 66be33864SEmmanuel Vadot 76be33864SEmmanuel Vadottitle: ARM sp804 Dual Timers 86be33864SEmmanuel Vadot 96be33864SEmmanuel Vadotmaintainers: 106be33864SEmmanuel Vadot - Haojian Zhuang <haojian.zhuang@linaro.org> 116be33864SEmmanuel Vadot 126be33864SEmmanuel Vadotdescription: |+ 136be33864SEmmanuel Vadot The Arm SP804 IP implements two independent timers, configurable for 146be33864SEmmanuel Vadot 16 or 32 bit operation and capable of running in one-shot, periodic, or 156be33864SEmmanuel Vadot free-running mode. The input clock is shared, but can be gated and prescaled 166be33864SEmmanuel Vadot independently for each timer. 176be33864SEmmanuel Vadot 186be33864SEmmanuel Vadot There is a viriant of Arm SP804: Hisilicon 64-bit SP804 timer. Some Hisilicon 196be33864SEmmanuel Vadot SoCs, such as Hi1212, should use the dedicated compatible: "hisilicon,sp804". 206be33864SEmmanuel Vadot 216be33864SEmmanuel Vadot# Need a custom select here or 'arm,primecell' will match on lots of nodes 226be33864SEmmanuel Vadotselect: 236be33864SEmmanuel Vadot properties: 246be33864SEmmanuel Vadot compatible: 256be33864SEmmanuel Vadot contains: 26*354d7675SEmmanuel Vadot enum: 27*354d7675SEmmanuel Vadot - arm,sp804 28*354d7675SEmmanuel Vadot - hisilicon,sp804 296be33864SEmmanuel Vadot required: 306be33864SEmmanuel Vadot - compatible 316be33864SEmmanuel Vadot 326be33864SEmmanuel Vadotproperties: 336be33864SEmmanuel Vadot compatible: 346be33864SEmmanuel Vadot items: 356be33864SEmmanuel Vadot - enum: 366be33864SEmmanuel Vadot - arm,sp804 376be33864SEmmanuel Vadot - hisilicon,sp804 386be33864SEmmanuel Vadot - const: arm,primecell 396be33864SEmmanuel Vadot 406be33864SEmmanuel Vadot interrupts: 416be33864SEmmanuel Vadot description: | 426be33864SEmmanuel Vadot If two interrupts are listed, those are the interrupts for timer 436be33864SEmmanuel Vadot 1 and 2, respectively. If there is only a single interrupt, it is 446be33864SEmmanuel Vadot either a combined interrupt or the sole interrupt of one timer, as 456be33864SEmmanuel Vadot specified by the "arm,sp804-has-irq" property. 466be33864SEmmanuel Vadot minItems: 1 476be33864SEmmanuel Vadot maxItems: 2 486be33864SEmmanuel Vadot 496be33864SEmmanuel Vadot reg: 506be33864SEmmanuel Vadot description: The physical base address of the SP804 IP. 516be33864SEmmanuel Vadot maxItems: 1 526be33864SEmmanuel Vadot 536be33864SEmmanuel Vadot clocks: 546be33864SEmmanuel Vadot description: | 556be33864SEmmanuel Vadot Clocks driving the dual timer hardware. This list should 566be33864SEmmanuel Vadot be 1 or 3 clocks. With 3 clocks, the order is timer0 clock, timer1 576be33864SEmmanuel Vadot clock, apb_pclk. A single clock can also be specified if the same 586be33864SEmmanuel Vadot clock is used for all clock inputs. 596be33864SEmmanuel Vadot oneOf: 606be33864SEmmanuel Vadot - items: 616be33864SEmmanuel Vadot - description: clock for timer 1 626be33864SEmmanuel Vadot - description: clock for timer 2 636be33864SEmmanuel Vadot - description: bus clock 646be33864SEmmanuel Vadot - items: 656be33864SEmmanuel Vadot - description: unified clock for both timers and the bus 666be33864SEmmanuel Vadot 676be33864SEmmanuel Vadot clock-names: true 686be33864SEmmanuel Vadot # The original binding did not specify any clock names, and there is no 696be33864SEmmanuel Vadot # consistent naming used in the existing DTs. The primecell binding 706be33864SEmmanuel Vadot # requires the "apb_pclk" name, so we need this property. 716be33864SEmmanuel Vadot # Use "timer0clk", "timer1clk", "apb_pclk" for new DTs. 726be33864SEmmanuel Vadot 736be33864SEmmanuel Vadot arm,sp804-has-irq: 746be33864SEmmanuel Vadot description: If only one interrupt line is connected to the interrupt 756be33864SEmmanuel Vadot controller, this property specifies which timer is connected to this 766be33864SEmmanuel Vadot line. 776be33864SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 786be33864SEmmanuel Vadot minimum: 1 796be33864SEmmanuel Vadot maximum: 2 806be33864SEmmanuel Vadot 816be33864SEmmanuel Vadotrequired: 826be33864SEmmanuel Vadot - compatible 836be33864SEmmanuel Vadot - interrupts 846be33864SEmmanuel Vadot - reg 856be33864SEmmanuel Vadot - clocks 866be33864SEmmanuel Vadot 876be33864SEmmanuel VadotadditionalProperties: false 886be33864SEmmanuel Vadot 896be33864SEmmanuel Vadotexamples: 906be33864SEmmanuel Vadot - | 916be33864SEmmanuel Vadot timer0: timer@fc800000 { 926be33864SEmmanuel Vadot compatible = "arm,sp804", "arm,primecell"; 936be33864SEmmanuel Vadot reg = <0xfc800000 0x1000>; 946be33864SEmmanuel Vadot interrupts = <0 0 4>, <0 1 4>; 956be33864SEmmanuel Vadot clocks = <&timclk1>, <&timclk2>, <&pclk>; 966be33864SEmmanuel Vadot clock-names = "timer1", "timer2", "apb_pclk"; 976be33864SEmmanuel Vadot }; 98