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          - enum:
21              - microchip,sama7d65-shdwc
22          - const: microchip,sama7g5-shdwc
23          - const: syscon
24      - items:
25          - const: microchip,sama7g5-shdwc
26          - const: syscon
27      - enum:
28          - atmel,sama5d2-shdwc
29          - microchip,sam9x60-shdwc
30      - items:
31          - const: microchip,sam9x7-shdwc
32          - const: microchip,sam9x60-shdwc
33
34  reg:
35    maxItems: 1
36
37  clocks:
38    maxItems: 1
39
40  "#address-cells":
41    const: 1
42
43  "#size-cells":
44    const: 0
45
46  debounce-delay-us:
47    description:
48      Minimum wake-up inputs debouncer period in microseconds. It is usually a
49      board-related property.
50
51  atmel,wakeup-rtc-timer:
52    description: enable real-time clock wake-up
53    type: boolean
54
55  atmel,wakeup-rtt-timer:
56    description: enable real-time timer wake-up
57    type: boolean
58
59patternProperties:
60  "^input@[0-15]$":
61    description:
62      Wake-up input nodes. These are usually described in the "board" part of
63      the Device Tree. Note also that input 0 is linked to the wake-up pin and
64      is frequently used.
65    type: object
66    properties:
67      reg:
68        description: contains the wake-up input index
69        minimum: 0
70        maximum: 15
71
72      atmel,wakeup-active-high:
73        description:
74          The corresponding wake-up input described by the child forces the
75          wake-up of the core power supply on a high level. The default is to
76          be active low.
77        type: boolean
78
79    required:
80      - reg
81
82    additionalProperties: false
83
84required:
85  - compatible
86  - reg
87  - clocks
88
89allOf:
90  - if:
91      properties:
92        compatible:
93          contains:
94            const: atmel,sama5d2-shdwc
95    then:
96      properties:
97        atmel,wakeup-rtt-timer: false
98
99additionalProperties: false
100
101examples:
102  - |
103    shdwc: poweroff@f8048010 {
104        compatible = "atmel,sama5d2-shdwc";
105        reg = <0xf8048010 0x10>;
106        clocks = <&clk32k>;
107        #address-cells = <1>;
108        #size-cells = <0>;
109        atmel,wakeup-rtc-timer;
110        debounce-delay-us = <976>;
111
112        input@0 {
113            reg = <0>;
114        };
115
116        input@1 {
117            reg = <1>;
118            atmel,wakeup-active-high;
119        };
120    };
121
122...
123