From 403299c40bee91e8f9bf0f5c1e14b60f7a2876cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Tue, 29 Apr 2025 23:04:47 +0200 Subject: [PATCH] samples: boards: st: power_mgmt: wkup_pins: add nucleo_g031k8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add overlay for above board for testing. As the board does not have an actual button, PA0 has to be connected to GND for wake-up. Signed-off-by: Martin Jäger --- .../wkup_pins/boards/nucleo_g031k8.overlay | 27 +++++++++++++++++++ .../st/power_mgmt/wkup_pins/sample.yaml | 1 + 2 files changed, 28 insertions(+) create mode 100644 samples/boards/st/power_mgmt/wkup_pins/boards/nucleo_g031k8.overlay 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