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>
This commit is contained in:
parent
c4766f9572
commit
fa5cfbd937
3 changed files with 119 additions and 6 deletions
31
tests/subsys/usb/device_next/build_all.conf
Normal file
31
tests/subsys/usb/device_next/build_all.conf
Normal file
|
@ -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
|
75
tests/subsys/usb/device_next/build_all.overlay
Normal file
75
tests/subsys/usb/device_next/build_all.overlay
Normal file
|
@ -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";
|
||||
};
|
||||
};
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue