diff --git a/tests/drivers/build_all/ethernet/app.overlay b/tests/drivers/build_all/ethernet/app.overlay new file mode 100644 index 00000000000..98c3b89b2ac --- /dev/null +++ b/tests/drivers/build_all/ethernet/app.overlay @@ -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"; + }; + }; + }; + }; +}; diff --git a/tests/drivers/build_all/ethernet/prj.conf b/tests/drivers/build_all/ethernet/prj.conf index 938aa284a43..65c7588e390 100644 --- a/tests/drivers/build_all/ethernet/prj.conf +++ b/tests/drivers/build_all/ethernet/prj.conf @@ -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 diff --git a/tests/drivers/build_all/ethernet/spi_devices.overlay b/tests/drivers/build_all/ethernet/spi_devices.overlay index a80c949e036..3d1285b3c0e 100644 --- a/tests/drivers/build_all/ethernet/spi_devices.overlay +++ b/tests/drivers/build_all/ethernet/spi_devices.overlay @@ -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]; + }; }; }; }; diff --git a/tests/drivers/build_all/ethernet/testcase.yaml b/tests/drivers/build_all/ethernet/testcase.yaml index 623e1cb00ee..f4b66e3c9a9 100644 --- a/tests/drivers/build_all/ethernet/testcase.yaml +++ b/tests/drivers/build_all/ethernet/testcase.yaml @@ -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