xref: /freebsd/sys/contrib/device-tree/Bindings/timer/loongson,ls1x-pwmtimer.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*f126890aSEmmanuel Vadot%YAML 1.2
3*f126890aSEmmanuel Vadot---
4*f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/timer/loongson,ls1x-pwmtimer.yaml#
5*f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*f126890aSEmmanuel Vadot
7*f126890aSEmmanuel Vadottitle: Loongson-1 PWM timer
8*f126890aSEmmanuel Vadot
9*f126890aSEmmanuel Vadotmaintainers:
10*f126890aSEmmanuel Vadot  - Keguang Zhang <keguang.zhang@gmail.com>
11*f126890aSEmmanuel Vadot
12*f126890aSEmmanuel Vadotdescription:
13*f126890aSEmmanuel Vadot  Loongson-1 PWM timer can be used for system clock source
14*f126890aSEmmanuel Vadot  and clock event timers.
15*f126890aSEmmanuel Vadot
16*f126890aSEmmanuel Vadotproperties:
17*f126890aSEmmanuel Vadot  compatible:
18*f126890aSEmmanuel Vadot    const: loongson,ls1b-pwmtimer
19*f126890aSEmmanuel Vadot
20*f126890aSEmmanuel Vadot  reg:
21*f126890aSEmmanuel Vadot    maxItems: 1
22*f126890aSEmmanuel Vadot
23*f126890aSEmmanuel Vadot  clocks:
24*f126890aSEmmanuel Vadot    maxItems: 1
25*f126890aSEmmanuel Vadot
26*f126890aSEmmanuel Vadot  interrupts:
27*f126890aSEmmanuel Vadot    maxItems: 1
28*f126890aSEmmanuel Vadot
29*f126890aSEmmanuel Vadotrequired:
30*f126890aSEmmanuel Vadot  - compatible
31*f126890aSEmmanuel Vadot  - reg
32*f126890aSEmmanuel Vadot  - clocks
33*f126890aSEmmanuel Vadot  - interrupts
34*f126890aSEmmanuel Vadot
35*f126890aSEmmanuel VadotadditionalProperties: false
36*f126890aSEmmanuel Vadot
37*f126890aSEmmanuel Vadotexamples:
38*f126890aSEmmanuel Vadot  - |
39*f126890aSEmmanuel Vadot    #include <dt-bindings/clock/loongson,ls1x-clk.h>
40*f126890aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
41*f126890aSEmmanuel Vadot    clocksource: timer@1fe5c030 {
42*f126890aSEmmanuel Vadot        compatible = "loongson,ls1b-pwmtimer";
43*f126890aSEmmanuel Vadot        reg = <0x1fe5c030 0x10>;
44*f126890aSEmmanuel Vadot
45*f126890aSEmmanuel Vadot        clocks = <&clkc LS1X_CLKID_APB>;
46*f126890aSEmmanuel Vadot        interrupt-parent = <&intc0>;
47*f126890aSEmmanuel Vadot        interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
48*f126890aSEmmanuel Vadot    };
49