Skip to content

Commit

Permalink
tests: drivers: build_all: Add adin2111 to ethernet driver build test
Browse files Browse the repository at this point in the history
Ensures that the eth_adin2111 driver builds for both of its supported
devicetree compatibles by adding adi,adin2111 and adi,adin1110
compatible nodes to the ethernet driver build test.

Sets relevant device device driver initialization priorities to be
equal, allowing devicetree dependency ordinals to determine the
initialization sequence.

Signed-off-by: Maureen Helm <[email protected]>
  • Loading branch information
MaureenHelm authored and fabiobaltieri committed Oct 3, 2023
1 parent aab537c commit 00d03fe
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
60 changes: 60 additions & 0 deletions tests/drivers/build_all/ethernet/app.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

/* one entry for every devices at spi.dtsi */
cs-gpios = <&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>;

Expand Down Expand Up @@ -60,6 +62,64 @@
int-gpios = <&test_gpio 0 0>;
reset-gpios = <&test_gpio 0 0>;
};

test_spi_adin1110: adin1110@3 {
compatible = "adi,adin1110";
reg = <0x3>;
spi-max-frequency = <25000000>;
int-gpios = <&test_gpio 0 0>;
reset-gpios = <&test_gpio 0 0>;

port1 {
local-mac-address = [ CA 2F B7 10 23 63 ];
};

mdio {
compatible = "adi,adin2111-mdio";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;

ethernet-phy@1 {
reg = <0x1>;
compatible = "adi,adin2111-phy";
status = "okay";
};
};
};

test_spi_adin2111: adin2111@4 {
compatible = "adi,adin2111";
reg = <0x4>;
spi-max-frequency = <0>;
int-gpios = <&test_gpio 0 0>;
reset-gpios = <&test_gpio 0 0>;

port1 {
local-mac-address = [ CA 2F B7 10 23 63 ];
};
port2 {
local-mac-address = [ 3C 82 D4 A2 29 8E ];
};

mdio {
compatible = "adi,adin2111-mdio";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;

ethernet-phy@1 {
reg = <0x1>;
compatible = "adi,adin2111-phy";
status = "okay";
};
ethernet-phy@2 {
reg = <0x2>;
compatible = "adi,adin2111-phy";
status = "okay";
};
};
};
};
};
};
5 changes: 5 additions & 0 deletions tests/drivers/build_all/ethernet/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_TEST_USERSPACE=y

CONFIG_GPIO=y

CONFIG_SPI_INIT_PRIORITY=50
CONFIG_ETH_INIT_PRIORITY=50
CONFIG_MDIO_INIT_PRIORITY=50
CONFIG_PHY_INIT_PRIORITY=50

0 comments on commit 00d03fe

Please sign in to comment.