Skip to content

Commit 3adaa36

Browse files
claudiubezneasre
authored andcommitted
dt-bindings: power: reset: atmel,sama5d2-shdwc: convert to yaml
Convert Microchip AT91 SAMA5D2 shutdown controller to YAML. SAMA7G5 SHDWC DT node (available in arch/arm/boot/dts/sama7g5.dtsi) has syscon along with its compatible. There is no usage of this syscon in the current code but it may be necessary in future as some registers of SHDWC are accessed in different drivers (at91-sama5d2_shdwc.c and arch/arm/mach-at91/pm.c). Thus update the YAML with it to make DT checkers happy. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent c15329b commit 3adaa36

2 files changed

Lines changed: 114 additions & 63 deletions

File tree

Documentation/devicetree/bindings/arm/atmel-sysregs.txt

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -52,69 +52,6 @@ Example:
5252
reg = <0xe3804000 0x1000>;
5353
};
5454

55-
SHDWC SAMA5D2-Compatible Shutdown Controller
56-
57-
1) shdwc node
58-
59-
required properties:
60-
- compatible: should be "atmel,sama5d2-shdwc", "microchip,sam9x60-shdwc" or
61-
"microchip,sama7g5-shdwc"
62-
- reg: should contain registers location and length
63-
- clocks: phandle to input clock.
64-
- #address-cells: should be one. The cell is the wake-up input index.
65-
- #size-cells: should be zero.
66-
67-
optional properties:
68-
69-
- debounce-delay-us: minimum wake-up inputs debouncer period in
70-
microseconds. It's usually a board-related property.
71-
- atmel,wakeup-rtc-timer: boolean to enable Real-Time Clock wake-up.
72-
73-
optional microchip,sam9x60-shdwc or microchip,sama7g5-shdwc properties:
74-
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
75-
76-
The node contains child nodes for each wake-up input that the platform uses.
77-
78-
2) input nodes
79-
80-
Wake-up input nodes are usually described in the "board" part of the Device
81-
Tree. Note also that input 0 is linked to the wake-up pin and is frequently
82-
used.
83-
84-
Required properties:
85-
- reg: should contain the wake-up input index [0 - 15].
86-
87-
Optional properties:
88-
- atmel,wakeup-active-high: boolean, the corresponding wake-up input described
89-
by the child, forces the wake-up of the core power supply on a high level.
90-
The default is to be active low.
91-
92-
Example:
93-
94-
On the SoC side:
95-
shdwc@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-
};
103-
104-
On the board side:
105-
shdwc@f8048010 {
106-
debounce-delay-us = <976>;
107-
108-
input@0 {
109-
reg = <0>;
110-
};
111-
112-
input@1 {
113-
reg = <1>;
114-
atmel,wakeup-active-high;
115-
};
116-
};
117-
11855
Special Function Registers (SFR)
11956

12057
Special Function Registers (SFR) manage specific aspects of the integrated
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
7+
title: Microchip AT91 SAMA5D2 SHDWC Shutdown Controller
8+
9+
maintainers:
10+
- Claudiu Beznea <claudiu.beznea@microchip.com>
11+
12+
description: |
13+
Microchip AT91 SHDWC shutdown controller controls the power supplies VDDIO
14+
and VDDCORE and the wake-up detection on debounced input lines.
15+
16+
properties:
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+
51+
patternProperties:
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+
76+
required:
77+
- compatible
78+
- reg
79+
- clocks
80+
81+
allOf:
82+
- if:
83+
properties:
84+
compatible:
85+
contains:
86+
const: atmel,sama5d2-shdwc
87+
then:
88+
properties:
89+
atmel,wakeup-rtt-timer: false
90+
91+
additionalProperties: false
92+
93+
examples:
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+
...

0 commit comments

Comments
 (0)