starfive: add new target for StarFive JH7100/7110 SoC
[openwrt/staging/981213.git] / target / linux / starfive / patches-6.1 / 0059-dt-bindings-timer-Add-timer-for-StarFive-JH7110-SoC.patch
1 From 944b96d734199642e2ede978c48d754109ca334c Mon Sep 17 00:00:00 2001
2 From: Xingyu Wu <xingyu.wu@starfivetech.com>
3 Date: Mon, 20 Mar 2023 21:54:31 +0800
4 Subject: [PATCH 059/122] dt-bindings: timer: Add timer for StarFive JH7110 SoC
5
6 Add bindings for the timer on the JH7110 RISC-V SoC
7 by StarFive Technology Ltd.
8
9 Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
10 Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
11 ---
12 .../bindings/timer/starfive,jh7110-timer.yaml | 95 +++++++++++++++++++
13 1 file changed, 95 insertions(+)
14 create mode 100644 Documentation/devicetree/bindings/timer/starfive,jh7110-timer.yaml
15
16 --- /dev/null
17 +++ b/Documentation/devicetree/bindings/timer/starfive,jh7110-timer.yaml
18 @@ -0,0 +1,95 @@
19 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
20 +%YAML 1.2
21 +---
22 +$id: http://devicetree.org/schemas/timer/starfive,jh7110-timer.yaml#
23 +$schema: http://devicetree.org/meta-schemas/core.yaml#
24 +
25 +title: StarFive JH7110 Timer
26 +maintainers:
27 + - Xingyu Wu <xingyu.wu@starfivetech.com>
28 + - Samin Guo <samin.guo@starfivetech.com>
29 +
30 +description:
31 + This timer has four free-running 32 bit counters in StarFive JH7110 SoC.
32 + And each channel(counter) triggers an interrupt when timeout. They support
33 + one-shot mode and continuous-run mode.
34 +
35 +properties:
36 + compatible:
37 + const: starfive,jh7110-timer
38 +
39 + reg:
40 + maxItems: 1
41 +
42 + interrupts:
43 + items:
44 + - description: channel 0
45 + - description: channel 1
46 + - description: channel 2
47 + - description: channel 3
48 +
49 + clocks:
50 + items:
51 + - description: timer APB
52 + - description: channel 0
53 + - description: channel 1
54 + - description: channel 2
55 + - description: channel 3
56 +
57 + clock-names:
58 + items:
59 + - const: apb
60 + - const: ch0
61 + - const: ch1
62 + - const: ch2
63 + - const: ch3
64 +
65 + resets:
66 + items:
67 + - description: timer APB
68 + - description: channel 0
69 + - description: channel 1
70 + - description: channel 2
71 + - description: channel 3
72 +
73 + reset-names:
74 + items:
75 + - const: apb
76 + - const: ch0
77 + - const: ch1
78 + - const: ch2
79 + - const: ch3
80 +
81 +required:
82 + - compatible
83 + - reg
84 + - interrupts
85 + - clocks
86 + - clock-names
87 + - resets
88 + - reset-names
89 +
90 +additionalProperties: false
91 +
92 +examples:
93 + - |
94 + timer@13050000 {
95 + compatible = "starfive,jh7110-timer";
96 + reg = <0x13050000 0x10000>;
97 + interrupts = <69>, <70>, <71> ,<72>;
98 + clocks = <&clk 124>,
99 + <&clk 125>,
100 + <&clk 126>,
101 + <&clk 127>,
102 + <&clk 128>;
103 + clock-names = "apb", "ch0", "ch1",
104 + "ch2", "ch3";
105 + resets = <&rst 117>,
106 + <&rst 118>,
107 + <&rst 119>,
108 + <&rst 120>,
109 + <&rst 121>;
110 + reset-names = "apb", "ch0", "ch1",
111 + "ch2", "ch3";
112 + };
113 +