From 59a82ab3575baabb8ebb1dcae8317b81a8679624 Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Sat, 2 Nov 2024 16:28:10 +0900 Subject: [PATCH] tests: drivers: gpio: gpio_api_1pin: Add AW9523B test configuration Add test configuration for Awinic AW9523B. This device is a GPIO Expander, and no boards currently implement it. Define the connection that connects it via the Arduino header and define a fixture to enable it. This has been confirmed with nucleo_h503rb. Signed-off-by: TOKITA Hiroshi --- .../boards/aw9523b_on_arduino_header.overlay | 29 +++++++++++++++++++ .../drivers/gpio/gpio_api_1pin/testcase.yaml | 15 ++++++++++ 2 files changed, 44 insertions(+) create mode 100644 tests/drivers/gpio/gpio_api_1pin/boards/aw9523b_on_arduino_header.overlay diff --git a/tests/drivers/gpio/gpio_api_1pin/boards/aw9523b_on_arduino_header.overlay b/tests/drivers/gpio/gpio_api_1pin/boards/aw9523b_on_arduino_header.overlay new file mode 100644 index 000000000000..ab5e9ebc2c46 --- /dev/null +++ b/tests/drivers/gpio/gpio_api_1pin/boards/aw9523b_on_arduino_header.overlay @@ -0,0 +1,29 @@ +&arduino_i2c { + status = "okay"; + aw9523b@58 { + status = "okay"; + reg = <0x58>; + compatible = "awinic,aw9523b"; + + aw9523_gpio: gpio { + compatible = "awinic,aw9523b-gpio"; + gpio-controller; + #gpio-cells = <2>; + port0-push-pull; + int-gpios = <&arduino_header 18 (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>; + reset-gpios = <&arduino_header 19 (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>; + }; + }; +}; + +/ { + leds { + aw9523_led0: aw9523_led0 { + gpios = < &aw9523_gpio 8 0>; + }; + }; + + aliases { + led0 = &aw9523_led0; + }; +}; diff --git a/tests/drivers/gpio/gpio_api_1pin/testcase.yaml b/tests/drivers/gpio/gpio_api_1pin/testcase.yaml index 1c5c6f9eb7f9..4edaaf29acc5 100644 --- a/tests/drivers/gpio/gpio_api_1pin/testcase.yaml +++ b/tests/drivers/gpio/gpio_api_1pin/testcase.yaml @@ -11,3 +11,18 @@ tests: - mps2/an521/cpu0 - neorv32 filter: dt_enabled_alias_with_parent_compat("led0", "gpio-leds") + drivers.gpio.1pin.aw9523b: + tags: + - drivers + - gpio + depends_on: + - gpio + - arduino_gpio + - i2c + min_flash: 48 + harness_config: + fixture: aw9523b_on_arduino_header + filter: dt_enabled_alias_with_parent_compat("led0", "gpio-leds") and + dt_compat_enabled("arduino-header-r3") + extra_dtc_overlay_files: + - "boards/aw9523b_on_arduino_header.overlay"