st,stm32f1-pwr-wkupctrl
Description
STM32F1-like wake-up pins controller
Control logic for wake-up pins found in STM32F1 and other series.
On series such as STM32F1, enabling a pin as wake-up pin forces it
into "input pull-down" mode and the polarity of wake-up pins is
fixed to "rising edge detection", unlike the implementation found
in other series where these parameters (PU/PD and polarity) can be
configured arbitrarily by software.
Note that the term "wake-up pin" is used instead of "wake-up line" in
this binding because each wake-up line in these series is hardwired
to a specific GPIO pin (no source selection is possible).
Examples
/* Example: STM32WBA series */
power@46020800 {
/* ...PWR properties omitted for brevity... */
wakeup-controller {
compatible = "st,stm32-pwr-wkupctrl";
#address-cells = <1>;
#size-cells = <0>;
st,max-wkup-line-idx = <8>;
st,has-multi-source-lines;
wkup@1 {
/*
* Wake-up line 1, triggerable by two different GPIOs:
* - source 0: PA0
* - source 1: PB2
*/
reg = <0x1>;
wkup-gpios = <&gpioa 0 STM32_PWR_WKUP_EVT_SRC_0>,
<&gpiob 2 STM32_PWR_WKUP_EVT_SRC_1>;
};
wkup@2 {
/*
* Wake-up line 2, triggerable by only one GPIO: PC13.
* Regardless, the appropriate `STM32_PWR_WKUP_EVT_SRC_n`
* value must still be set in the `flags` cell.
*/
reg = <0x2>;
wkup-gpios = <&gpioc 13 STM32_PWR_WKUP_EVT_SRC_1>;
};
/* ...other lines omitted for brevity... */
};
};
/* Example: STM32F1 series */
pwr: power@40007000 {
/* ...PWR properties omitted for brevity... */
wakeup-controller {
compatible = "st,stm32f1-pwr-wkupctrl", "st,stm32-pwr-wkupctrl";
#address-cells = <1>;
#size-cells = <0>;
st,max-wkup-line-idx = <1>;
/* Note the absence of `st,has-multi-source-lines` property... */
wkup@1 {
/* ...and use of the `STM32_PWR_WKUP_PIN_NOT_MUXED` value. */
reg = <0x1>;
wkup-gpios = <&gpioa 0 STM32_PWR_WKUP_PIN_NOT_MUXED>;
};
};
Properties
Top level properties
These property descriptions apply to “st,stm32f1-pwr-wkupctrl” nodes themselves. This page also describes child node properties in the following sections.
Properties not inherited from the base binding file.
Name |
Type |
Details |
|---|---|---|
|
|
Index of the highest wake-up line `WKUPn` supported by the SoC.
NOTE: only wake-up lines connected to a GPIO pin, which are usually
named `WKUPn`, should be taken into account for this property, and
lines connected only to internal sources should be ignored.
For example, this property should be set equal to 8 on a series where
WKUP8 is the highest wake-up line connected to a GPIO pin.
This property is required. |
|
|
If present, indicates that the Power Controller is capable of managing
the internal pull-up/pull-down resistors of all GPIO pins in the SoC.
This feature can be identified by the presence of a pair of registers
(`PWR_PUCRx`/`PWR_PDCRx`, `x` = A/B/C/...) in the PWR register map for
each GPIO port in the SoC. Note that there are some series where some
of these registers exist, but not for all GPIO ports: in this case,
the property must NOT be present.
|
Deprecated properties not inherited from the base binding file.
(None)
Properties inherited from the base binding file, which defines common properties that may be set on many nodes. Not all of these may apply to the “st,stm32f1-pwr-wkupctrl” compatible.
(None)
Child node properties
Name |
Type |
Details |
|---|---|---|
|
|
Wake-up line index
This property is required. See Important properties for more information. |
|
|
Specifies which GPIO pin(s) can trigger this wake-up line.
The `flags` cell of each entry in this property has a particular meaning:
- if the property `st,has-multi-source-lines` is present in the parent node,
it indicates which of the line's wake-up sources corresponds to the
specific GPIO pin (`STM32_PWR_WKUP_EVT_SRC_n`)
- otherwise, it must be set to `STM32_PWR_WKUP_PIN_NOT_MUXED` to indicate
that the wake-up source selection is hardwired.
Refer to `include/zephyr/dt-bindings/power/stm32_pwr.h` for more details
and see the examples below for an overview of the different use cases.
|