tests: drivers: build_all: mdio: add bit bang testsuite

- Add mdio to a build_all testsuite
- Add mdio bit bang to a build_all testsuite

Signed-off-by: Aleksandr Senin <al@meshium.net>
This commit is contained in:
Aleksandr Senin 2023-09-10 18:02:01 +03:00 committed by Chris Friedt
parent a1e2fdcc4d
commit cec9bc29ba
5 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(build_all)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

View file

@ -0,0 +1,42 @@
/*
* Copyright (c) 2023 Aleksandr Senin
*
* SPDX-License-Identifier: Apache-2.0
*
* Application overlay for testing driver builds
*
* Names in this file should be chosen in a way that won't conflict
* with real-world devicetree nodes, to allow these tests to run on
* (and be extended to test) real hardware.
*/
/ {
test {
#address-cells = <1>;
#size-cells = <1>;
test_gpio: gpio@deadbeef {
compatible = "vnd,gpio";
gpio-controller;
reg = <0xdeadbeef 0x1000>;
#gpio-cells = <0x2>;
status = "okay";
};
test_mdio0: mdio@11112222 {
compatible = "zephyr,mdio-gpio";
reg = <0x11112222 1>;
mdc-gpios = <&test_gpio 0 0>;
mdio-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_mdio1: mdio@33334444 {
compatible = "zephyr,mdio-gpio";
reg = <0x33334444 1>;
mdc-gpios = <&test_gpio 0 0>;
mdio-gpios = <&test_gpio 0 0>;
status = "okay";
};
};
};

View file

@ -0,0 +1,5 @@
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_GPIO=y
CONFIG_MDIO=y
CONFIG_MDIO_GPIO=y

View file

@ -0,0 +1,10 @@
/*
* Copyright (c) 2023 Aleksandr Senin
*
* SPDX-License-Identifier: Apache-2.0
*/
int main(void)
{
return 0;
}

View file

@ -0,0 +1,8 @@
common:
build_only: true
tags:
- drivers
- mdio
tests:
drivers.mdio.build:
platform_allow: qemu_cortex_m0