1# Copyright (c) 2023 STMicroelectronics
2# SPDX-License-Identifier: Apache-2.0
3
4description: STM32 power controller
5
6compatible: "st,stm32-pwr"
7
8include: base.yaml
9
10properties:
11  reg:
12    required: true
13
14  wkup-pins-nb:
15    type: int
16    description: |
17      Max nbr of system wake-up pins.
18      For example wkup-pins-nb = <8>; on the stm32u5
19
20  wkup-pin-srcs:
21    type: int
22    description: |
23      Number of wake-up GPIO sources to select from for each wake-up pin.
24      If not specified, that means there is only 1 GPIO source for each
25      wake-up pin.
26
27      For example, each wake-up pin on STM32U5 is associated with
28      4 wake-up sources, 3 of them correspond to GPIOs.
29
30  wkup-pins-pol:
31    type: boolean
32    description: |
33      True if SoC has a wake-up pins polarity config register
34
35  wkup-pins-pupd:
36    type: boolean
37    description: |
38      True if SoC has pull-up/down config register(s) for GPIO ports
39      that are associated with wake-up pins.
40
41  "#address-cells":
42    const: 1
43
44  "#size-cells":
45    const: 0
46
47child-binding:
48  description: |
49    STM32 wake-up pin node.
50
51    All nodes using this binding must be named "wkup-pin@[index]"
52    index starts from 1
53
54  properties:
55    reg:
56      type: array
57      required: true
58      description: Wake-up pin identifier, same as "index" in node name
59
60    wkup-gpios:
61      type: phandle-array
62      description: |
63        Specifies the GPIOs, if any, that are associated with the wake-up pin.
64
65        For example, for GPIO B2 associated with wakeup source 1 on wake-up
66        pin 1 on STM32U5 SoCs:
67        wkup-gpios = <&gpiob 2 STM32_PWR_WKUP_PIN_SRC_1>, <...>;
68