summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
blob: 932393f8c649af238f459c48a263f06d777b819a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/watchdog/qcom-wdt.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Krait Processor Sub-system (KPSS) Watchdog timer

maintainers:
  - Rajendra Nayak <quic_rjendra@quicinc.com>

properties:
  $nodename:
    pattern: "^(watchdog|timer)@[0-9a-f]+$"

  compatible:
    oneOf:
      - items:
          - enum:
              - qcom,kpss-wdt-ipq4019
              - qcom,apss-wdt-ipq5018
              - qcom,apss-wdt-ipq5332
              - qcom,apss-wdt-ipq9574
              - qcom,apss-wdt-msm8226
              - qcom,apss-wdt-msm8974
              - qcom,apss-wdt-msm8994
              - qcom,apss-wdt-qcm2290
              - qcom,apss-wdt-qcs404
              - qcom,apss-wdt-sa8255p
              - qcom,apss-wdt-sa8775p
              - qcom,apss-wdt-sc7180
              - qcom,apss-wdt-sc7280
              - qcom,apss-wdt-sc8180x
              - qcom,apss-wdt-sc8280xp
              - qcom,apss-wdt-sdm845
              - qcom,apss-wdt-sdx55
              - qcom,apss-wdt-sdx65
              - qcom,apss-wdt-sm6115
              - qcom,apss-wdt-sm6350
              - qcom,apss-wdt-sm8150
              - qcom,apss-wdt-sm8250
          - const: qcom,kpss-wdt
      - const: qcom,kpss-wdt
        deprecated: true
      - items:
          - const: qcom,scss-timer
          - const: qcom,msm-timer
      - items:
          - enum:
              - qcom,kpss-wdt-apq8064
              - qcom,kpss-wdt-ipq8064
              - qcom,kpss-wdt-mdm9615
              - qcom,kpss-wdt-msm8960
          - const: qcom,kpss-timer
          - const: qcom,msm-timer

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: sleep

  clock-frequency:
    description:
      The frequency of the general purpose timer in Hz.

  cpu-offset:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Per-CPU offset used when the timer is accessed without the CPU remapping
      facilities. The offset is cpu-offset + (0x10000 * cpu-nr).

  interrupts:
    minItems: 1
    maxItems: 5

required:
  - compatible
  - reg
  - clocks

allOf:
  - $ref: watchdog.yaml#

  - if:
      properties:
        compatible:
          contains:
            const: qcom,kpss-wdt
    then:
      properties:
        clock-frequency: false
        cpu-offset: false
        interrupts:
          minItems: 1
          items:
            - description: Bark
            - description: Bite

    else:
      properties:
        interrupts:
          minItems: 3
          items:
            - description: Debug
            - description: First general purpose timer
            - description: Second general purpose timer
            - description: First watchdog
            - description: Second watchdog
      required:
        - clock-frequency

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    watchdog@17c10000 {
        compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt";
        reg = <0x17c10000 0x1000>;
        clocks = <&sleep_clk>;
        interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
        timeout-sec = <10>;
    };

  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    watchdog@200a000 {
        compatible = "qcom,kpss-wdt-ipq8064", "qcom,kpss-timer", "qcom,msm-timer";
        interrupts = <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
                     <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
                     <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
                     <GIC_PPI 4 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
                     <GIC_PPI 5 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>;
        reg = <0x0200a000 0x100>;
        clock-frequency = <25000000>;
        clocks = <&sleep_clk>;
        clock-names = "sleep";
        cpu-offset = <0x80000>;
    };