tests: gpio_basic_api: using header to unify tests

using arduino header to simplify test settings.
arduino_header D2 and D3 can be used by default.
alt: 118 platforms are enabled for this test.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
This commit is contained in:
Hake Huang 2024-08-28 10:54:33 +00:00 committed by Carles Cufí
commit 826235c5c6
32 changed files with 56 additions and 378 deletions

View file

@ -0,0 +1,16 @@
/*
* Copyright (c) 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/* loopback with arduino header D2 and D3 */
/ {
resources {
compatible = "test-gpio-basic-api";
status = "okay";
out-gpios = <&arduino_header 8 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL | GPIO_PULL_UP)>;
in-gpios = <&arduino_header 9 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL | GPIO_PULL_UP)>;
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2024 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&gpio0 2 0>;
in-gpios = <&gpio0 3 0>;
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 6 0>; /* Arduino D0 */
in-gpios = <&arduino_header 7 0>; /* Arduino D1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&gpioc 16 0>; /* Arduino D0 */
in-gpios = <&gpioc 17 0>; /* Arduino D1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&gpio0 12 0>; /* Arduino A4 */
in-gpios = <&gpio0 13 0>; /* Arduino A5 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019, NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&gpio0 16 0>; /* Arduino A0 */
in-gpios = <&gpio0 23 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&gpio1 23 0>; /* Arduino D0 */
in-gpios = <&gpio1 22 0>; /* Arduino D1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&gpio1 23 0>; /* Arduino D0 */
in-gpios = <&gpio1 22 0>; /* Arduino D1 */
};
};

View file

@ -0,0 +1,16 @@
/*
* Copyright (c) 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/* loopback with arduino header D10 and D11 */
/ {
resources {
compatible = "test-gpio-basic-api";
status = "okay";
out-gpios = <&arduino_header 16 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL | GPIO_PULL_UP)>;
in-gpios = <&arduino_header 17 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL | GPIO_PULL_UP)>;
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2020, NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&gpio0 5 0>; /* Arduino A0 */
in-gpios = <&gpio0 6 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2020 STMicroelectronics.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 4 0>; /* Arduino A4 */
in-gpios = <&arduino_header 5 0>; /* Arduino A5 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 11 0>; /* Arduino D5 */
in-gpios = <&arduino_header 12 0>; /* Arduino D6 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2020 STMicroelectronics.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 6 0>; /* Arduino D0 */
in-gpios = <&arduino_header 7 0>; /* Arduino D1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 6 0>; /* Arduino D0 */
in-gpios = <&arduino_header 7 0>; /* Arduino D1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 4 0>; /* Arduino A4 */
in-gpios = <&arduino_header 5 0>; /* Arduino A5 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2020 STMicroelectronics.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2020 STMicroelectronics.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2020 STMicroelectronics.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 4 0>; /* Arduino A4 */
in-gpios = <&arduino_header 5 0>; /* Arduino A5 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2020 STMicroelectronics.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 6 0>; /* Arduino D0 */
in-gpios = <&arduino_header 7 0>; /* Arduino D1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2022 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 6 0>; /* Arduino D0 */
in-gpios = <&arduino_header 7 0>; /* Arduino D1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 20 0>; /* Arduino D14 */
in-gpios = <&arduino_header 21 0>; /* Arduino D15 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2021 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -1,13 +0,0 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
};
};

View file

@ -10,7 +10,7 @@ common:
tests:
drivers.gpio.2pin:
min_flash: 34
filter: dt_compat_enabled("test-gpio-basic-api")
filter: dt_compat_enabled("test-gpio-basic-api") and not dt_compat_enabled("arduino-header-r3")
drivers.gpio.nrf_sense_edge:
platform_allow: nrf52840dk/nrf52840 nrf52_bsim
@ -30,3 +30,26 @@ tests:
extra_args: "DTC_OVERLAY_FILE=boards/frdm_ke17z_fgpio.overlay"
harness_config:
fixture: fgpio_loopback
drivers.gpio.2pin_arduino:
min_flash: 34
depends_on:
- gpio
- arduino_gpio
filter: dt_compat_enabled("test-gpio-basic-api") and dt_compat_enabled("arduino-header-r3")
extra_args: "DTC_OVERLAY_FILE=arduino.overlay"
integration_platforms:
- frdm_k64f
platform_exclude:
# below boards are mikro bus not arduino
- da14695_dk_usb
- mimxrt595_evk/mimxrt595s/cm33
drivers.gpio.2pin_arduino_customized:
min_flash: 34
depends_on:
- gpio
- arduino_gpio
filter: dt_compat_enabled("test-gpio-basic-api") and dt_compat_enabled("arduino-header-r3")
platform_allow:
- mimxrt595_evk/mimxrt595s/cm33