1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/power/reset/atmel,sama5d2-shdwc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Microchip AT91 SAMA5D2 SHDWC Shutdown Controller
8
9maintainers:
10  - Claudiu Beznea <claudiu.beznea@microchip.com>
11
12description: |
13  Microchip AT91 SHDWC shutdown controller controls the power supplies VDDIO
14  and VDDCORE and the wake-up detection on debounced input lines.
15
16properties:
17  compatible:
18    oneOf:
19      - items:
20          - const: microchip,sama7g5-shdwc
21          - const: syscon
22      - enum:
23          - atmel,sama5d2-shdwc
24          - microchip,sam9x60-shdwc
25
26  reg:
27    maxItems: 1
28
29  clocks:
30    maxItems: 1
31
32  "#address-cells":
33    const: 1
34
35  "#size-cells":
36    const: 0
37
38  debounce-delay-us:
39    description:
40      Minimum wake-up inputs debouncer period in microseconds. It is usually a
41      board-related property.
42
43  atmel,wakeup-rtc-timer:
44    description: enable real-time clock wake-up
45    type: boolean
46
47  atmel,wakeup-rtt-timer:
48    description: enable real-time timer wake-up
49    type: boolean
50
51patternProperties:
52  "^input@[0-15]$":
53    description:
54      Wake-up input nodes. These are usually described in the "board" part of
55      the Device Tree. Note also that input 0 is linked to the wake-up pin and
56      is frequently used.
57    type: object
58    properties:
59      reg:
60        description: contains the wake-up input index
61        minimum: 0
62        maximum: 15
63
64      atmel,wakeup-active-high:
65        description:
66          The corresponding wake-up input described by the child forces the
67          wake-up of the core power supply on a high level. The default is to
68          be active low.
69        type: boolean
70
71    required:
72      - reg
73
74    additionalProperties: false
75
76required:
77  - compatible
78  - reg
79  - clocks
80
81allOf:
82  - if:
83      properties:
84        compatible:
85          contains:
86            const: atmel,sama5d2-shdwc
87    then:
88      properties:
89        atmel,wakeup-rtt-timer: false
90
91additionalProperties: false
92
93examples:
94  - |
95    shdwc: poweroff@f8048010 {
96        compatible = "atmel,sama5d2-shdwc";
97        reg = <0xf8048010 0x10>;
98        clocks = <&clk32k>;
99        #address-cells = <1>;
100        #size-cells = <0>;
101        atmel,wakeup-rtc-timer;
102        debounce-delay-us = <976>;
103
104        input@0 {
105            reg = <0>;
106        };
107
108        input@1 {
109            reg = <1>;
110            atmel,wakeup-active-high;
111        };
112    };
113
114...
115