test: device_next: add overlays to build all functions

Add overlays and test case to build all USB device functions.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
diff --git a/tests/subsys/usb/device_next/build_all.conf b/tests/subsys/usb/device_next/build_all.conf
new file mode 100644
index 0000000..1b49631
--- /dev/null
+++ b/tests/subsys/usb/device_next/build_all.conf
@@ -0,0 +1,31 @@
+# Copyright (c) 2024 Nordic Semiconductor ASA
+# SPDX-License-Identifier: Apache-2.0
+
+CONFIG_LOG=y
+CONFIG_ZTEST=y
+
+CONFIG_SHELL=y
+CONFIG_USBD_SHELL=y
+
+CONFIG_NETWORKING=y
+CONFIG_NET_L2_ETHERNET=y
+
+CONFIG_BT=y
+CONFIG_BT_HCI_RAW=y
+
+CONFIG_USB_DEVICE_STACK_NEXT=y
+CONFIG_USBD_LOOPBACK_CLASS=y
+
+CONFIG_SERIAL=y
+CONFIG_UART_INTERRUPT_DRIVEN=y
+CONFIG_UART_LINE_CTRL=y
+CONFIG_USBD_CDC_ACM_CLASS=y
+
+CONFIG_USBD_MSC_CLASS=y
+
+CONFIG_USBD_AUDIO2_CLASS=y
+
+CONFIG_USBD_BT_HCI=y
+
+CONFIG_UHC_DRIVER=y
+CONFIG_USB_HOST_STACK=y
diff --git a/tests/subsys/usb/device_next/build_all.overlay b/tests/subsys/usb/device_next/build_all.overlay
new file mode 100644
index 0000000..2cd037e
--- /dev/null
+++ b/tests/subsys/usb/device_next/build_all.overlay
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2024 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+/delete-node/ &zephyr_udc0;
+
+#include <dt-bindings/usb/audio.h>
+
+/ {
+	uac2_headphones: usb_audio2 {
+		compatible = "zephyr,uac2";
+		status = "okay";
+		audio-function = <AUDIO_FUNCTION_OTHER>;
+
+		uac_aclk: aclk {
+			compatible = "zephyr,uac2-clock-source";
+			clock-type = "internal-programmable";
+			frequency-control = "host-programmable";
+			sampling-frequencies = <48000>;
+		};
+
+		out_terminal: out_terminal {
+			compatible = "zephyr,uac2-input-terminal";
+			clock-source = <&uac_aclk>;
+			terminal-type = <USB_TERMINAL_STREAMING>;
+			front-left;
+			front-right;
+		};
+
+		headphones_output: headphones {
+			compatible = "zephyr,uac2-output-terminal";
+			data-source = <&out_terminal>;
+			clock-source = <&uac_aclk>;
+			terminal-type = <OUTPUT_TERMINAL_HEADPHONES>;
+		};
+
+		as_iso_out: out_interface {
+			compatible = "zephyr,uac2-audio-streaming";
+			linked-terminal = <&out_terminal>;
+			subslot-size = <2>;
+			bit-resolution = <16>;
+		};
+	};
+
+	ramdisk0 {
+		compatible = "zephyr,ram-disk";
+		disk-name = "RAM";
+		sector-size = <512>;
+		sector-count = <192>;
+	};
+
+	cdc_ecm_eth0: cdc_ecm_eth0 {
+		compatible = "zephyr,cdc-ecm-ethernet";
+		remote-mac-address = "00005E005301";
+	};
+
+	zephyr_uhc0: uhc_vrt0 {
+		compatible = "zephyr,uhc-virtual";
+
+		zephyr_udc0: udc_vrt0 {
+			compatible = "zephyr,udc-virtual";
+			num-bidir-endpoints = <16>;
+			maximum-speed = "high-speed";
+		};
+	};
+
+};
+
+&zephyr_udc0 {
+	cdc_acm_uart0 {
+		compatible = "zephyr,cdc-acm-uart";
+	};
+};
diff --git a/tests/subsys/usb/device_next/testcase.yaml b/tests/subsys/usb/device_next/testcase.yaml
index 5a82688..ebc5a32 100644
--- a/tests/subsys/usb/device_next/testcase.yaml
+++ b/tests/subsys/usb/device_next/testcase.yaml
@@ -1,9 +1,16 @@
+common:
+  depends_on: usb_device
+  platform_allow:
+    - native_sim
+    - qemu_cortex_m3
+  integration_platforms:
+    - native_sim
 tests:
   usb.device_next:
-    depends_on: usb_device
     tags: usb
-    platform_allow:
-      - native_sim
-      - qemu_cortex_m3
-    integration_platforms:
-      - native_sim
+  usb.device_next.build_all:
+    tags: usb
+    extra_args:
+      - CONF_FILE="build_all.conf"
+      - EXTRA_DTC_OVERLAY_FILE="build_all.overlay"
+    build_only: true