tests: drivers: build_all: ethernet: Add devices build tests

Add build tests for following devices.

- microchip,ksz8081
- realtek,rtl8211f
- nxp,tja1103
- microchip,lan865x

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
TOKITA Hiroshi 2024-09-17 10:00:23 +09:00 committed by Henrik Brix Andersen
parent 96a17e2a0f
commit e78811bcd6
4 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,55 @@
/*
* Copyright (c) 2024 TOKITA Hiroshi
* SPDX-License-Identifier: Apache-2.0
*/
/ {
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_ethernet: ethernet {
compatible = "vnd,ethernet";
test_mdio: mdio {
compatible = "zephyr,mdio-gpio";
mdc-gpios = <&test_gpio 0 0>;
mdio-gpios = <&test_gpio 0 0>;
#address-cells = <1>;
#size-cells = <0>;
ethernet-phy@0 {
reg = <0x0>;
compatible = "realtek,rtl8211f";
status = "okay";
};
ethernet-phy@1 {
reg = <0x1>;
compatible = "nxp,tja1103";
status = "okay";
int-gpios = <&test_gpio 0 0>;
master-slave = "slave";
};
ethernet-phy@2 {
reg = <0x2>;
compatible = "microchip,ksz8081";
status = "okay";
reset-gpios = <&test_gpio 0 0>;
int-gpios = <&test_gpio 0 0>;
microchip,interface-type = "rmii";
};
};
};
};
};

View file

@ -18,6 +18,7 @@ CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096
CONFIG_NET_L2_ETHERNET=n
CONFIG_GPIO=y
CONFIG_MDIO=y
CONFIG_SPI_INIT_PRIORITY=50
CONFIG_ETH_INIT_PRIORITY=50

View file

@ -36,6 +36,7 @@
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>;
test_spi_enc28j60: enc28j60@0 {
@ -120,6 +121,22 @@
};
};
};
test_spi_lan865x: lan865x@5 {
compatible = "microchip,lan865x";
reg = <0x5>;
spi-max-frequency = <0>;
int-gpios = <&test_gpio 0 0>;
rst-gpios = <&test_gpio 0 0>;
plca-node-id = <0>;
plca-node-count = <1>;
plca-burst-count = <1>;
plca-burst-timer = <1>;
plca-to-timer = <1>;
local-mac-address = [00 00 00 01 02 03];
};
};
};
};

View file

@ -12,6 +12,7 @@ tests:
extra_args: DTC_OVERLAY_FILE="spi_devices.overlay"
extra_configs:
- CONFIG_SPI=y
- CONFIG_NET_L2_ETHERNET=y
platform_allow:
- native_sim
- native_sim/native/64