diff --git a/samples/net/sockets/echo_server/boards/nucleo_g431rb.conf b/samples/net/sockets/echo_server/boards/nucleo_g431rb.conf new file mode 100644 index 000000000000000..028f9cffe0c1f3f --- /dev/null +++ b/samples/net/sockets/echo_server/boards/nucleo_g431rb.conf @@ -0,0 +1,52 @@ +# Generic networking options +CONFIG_NETWORKING=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=n +CONFIG_NET_IPV6=n +CONFIG_NET_IPV4=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_SOCKETS_POSIX_NAMES=y +CONFIG_POSIX_MAX_FDS=4 +CONFIG_NET_CONNECTION_MANAGER=y + +# Kernel options +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_ENTROPY_GENERATOR=y +CONFIG_TEST_RANDOM_GENERATOR=y +CONFIG_INIT_STACKS=y + +# Logging +CONFIG_NET_LOG=n +CONFIG_LOG=n +CONFIG_NET_STATISTICS=n +CONFIG_PRINTK=n + +# Network buffers +CONFIG_NET_PKT_RX_COUNT=4 +CONFIG_NET_PKT_TX_COUNT=4 +CONFIG_NET_BUF_RX_COUNT=24 +CONFIG_NET_BUF_TX_COUNT=24 +CONFIG_NET_CONTEXT_NET_PKT_POOL=y + +# IP address options +CONFIG_NET_MAX_CONTEXTS=2 +CONFIG_NET_MAX_CONN=2 + +# Network shell +CONFIG_NET_SHELL=n +CONFIG_SHELL=n + +# Network application options and configuration +CONFIG_NET_CONFIG_SETTINGS=y +CONFIG_NET_CONFIG_NEED_IPV4=y +CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.3.3" +CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.168.3.1" + +# How many client can connect to echo-server simultaneously +CONFIG_NET_SAMPLE_NUM_HANDLERS=1 + +# LAN865x T1S driver specific +CONFIG_NET_L2_ETHERNET=y +# CONFIG_NET_PROMISCUOUS_MODE=y +CONFIG_ETH_LAN865X=y +CONFIG_NET_BUF_DATA_SIZE=64 diff --git a/samples/net/sockets/echo_server/boards/nucleo_g431rb.overlay b/samples/net/sockets/echo_server/boards/nucleo_g431rb.overlay new file mode 100644 index 000000000000000..12b66dc16e6ffbd --- /dev/null +++ b/samples/net/sockets/echo_server/boards/nucleo_g431rb.overlay @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2023 DENX Software Engineering GmbH + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&spi1 { + eth0: lan865x@0{ + compatible = "microchip,lan865x"; + reg = <0>; + + int-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>; /* D7 */ + rst-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>; /* D8 */ + + local-mac-address = [00 19 05 00 00 01]; + + spi-max-frequency = <25000000>; + + /* PLCA settings */ + plca-enable; + plca-node-id = <1>; + plca-node-count = <8>; + plca-burst-count = <0x0>; + plca-burst-timer = <0x80>; + plca-to-timer = <0x20>; + + status = "okay"; + }; +};