Skip to content

Commit 7333185

Browse files
krzkWim Van Sebroeck
authored andcommitted
dt-bindings: watchdog: qcom-wdt: merge MSM timer
Merge Qualcomm MSM timer bindings into watchdog, because the timer compatibles are already included here and the hardware is quite similar. While converting the MSM timer bindings, adjust clock-frequency property to take only one frequency, instead of two, because: 1. DT schema does not allow to frequencies, 2. The Linux timer driver reads only first frequency. Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 7c631cd commit 7333185

File tree

2 files changed

+49
-47
lines changed

2 files changed

+49
-47
lines changed

Documentation/devicetree/bindings/timer/qcom,msm-timer.txt

Lines changed: 0 additions & 47 deletions
This file was deleted.

Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ maintainers:
1010
- Sai Prakash Ranjan <[email protected]>
1111

1212
properties:
13+
$nodename:
14+
pattern: "^(watchdog|timer)@[0-9a-f]+$"
15+
1316
compatible:
1417
oneOf:
1518
- items:
@@ -48,6 +51,20 @@ properties:
4851
clocks:
4952
maxItems: 1
5053

54+
clock-names:
55+
items:
56+
- const: sleep
57+
58+
clock-frequency:
59+
description:
60+
The frequency of the general purpose timer in Hz.
61+
62+
cpu-offset:
63+
$ref: /schemas/types.yaml#/definitions/uint32
64+
description:
65+
Per-CPU offset used when the timer is accessed without the CPU remapping
66+
facilities. The offset is cpu-offset + (0x10000 * cpu-nr).
67+
5168
interrupts:
5269
minItems: 1
5370
maxItems: 5
@@ -67,12 +84,27 @@ allOf:
6784
const: qcom,kpss-wdt
6885
then:
6986
properties:
87+
clock-frequency: false
88+
cpu-offset: false
7089
interrupts:
7190
minItems: 1
7291
items:
7392
- description: Bark
7493
- description: Bite
7594

95+
else:
96+
properties:
97+
interrupts:
98+
minItems: 3
99+
items:
100+
- description: Debug
101+
- description: First general purpose timer
102+
- description: Second general purpose timer
103+
- description: First watchdog
104+
- description: Second watchdog
105+
required:
106+
- clock-frequency
107+
76108
unevaluatedProperties: false
77109

78110
examples:
@@ -86,3 +118,20 @@ examples:
86118
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
87119
timeout-sec = <10>;
88120
};
121+
122+
- |
123+
#include <dt-bindings/interrupt-controller/arm-gic.h>
124+
125+
watchdog@200a000 {
126+
compatible = "qcom,kpss-wdt-ipq8064", "qcom,kpss-timer", "qcom,msm-timer";
127+
interrupts = <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
128+
<GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
129+
<GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
130+
<GIC_PPI 4 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>,
131+
<GIC_PPI 5 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>;
132+
reg = <0x0200a000 0x100>;
133+
clock-frequency = <25000000>;
134+
clocks = <&sleep_clk>;
135+
clock-names = "sleep";
136+
cpu-offset = <0x80000>;
137+
};

0 commit comments

Comments
 (0)