diff --git a/samples/boards/st/power_mgmt/wkup_pins/boards/nucleo_g031k8.overlay b/samples/boards/st/power_mgmt/wkup_pins/boards/nucleo_g031k8.overlay new file mode 100644 index 00000000000..0855169993e --- /dev/null +++ b/samples/boards/st/power_mgmt/wkup_pins/boards/nucleo_g031k8.overlay @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 A Labs GmbH + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/ { + /* the board has no actual button, you need to connect PA0 to GND with a jumper wire */ + gpio_keys { + compatible = "gpio-keys"; + user_button: button { + label = "User"; + gpios = <&gpioa 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + zephyr,code = ; + }; + }; + + aliases { + wkup-src = &user_button; + }; +}; + +&pwr { + status = "okay"; +}; diff --git a/samples/boards/st/power_mgmt/wkup_pins/sample.yaml b/samples/boards/st/power_mgmt/wkup_pins/sample.yaml index 2924e8694c0..821f9d8d047 100644 --- a/samples/boards/st/power_mgmt/wkup_pins/sample.yaml +++ b/samples/boards/st/power_mgmt/wkup_pins/sample.yaml @@ -6,6 +6,7 @@ tests: filter: dt_enabled_alias_with_parent_compat("wkup-src", "gpio-keys") and dt_compat_enabled("st,stm32-pwr") platform_allow: + - nucleo_g031k8 - nucleo_l4r5zi - nucleo_u575zi_q - nucleo_u5a5zj_q