1/*
2 * Copyright (c) 2025 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include <dt-bindings/usb/audio.h>
8
9/ {
10	uac2_microphone: usb_audio2 {
11		compatible = "zephyr,uac2";
12		status = "okay";
13		full-speed;
14		audio-function = <AUDIO_FUNCTION_MICROPHONE>;
15
16		/* Clock supporting 48KHz
17		 *
18		 * Since the incoming audio may be between 8 and 48 KHz, we always upsample to 48KHz
19		 */
20		uac_aclk: aclk {
21			compatible = "zephyr,uac2-clock-source";
22			clock-type = "internal-programmable";
23			frequency-control = "read-only";
24			sampling-frequencies = <48000>;
25			/* Falsely claim synchronous audio because we
26			 * currently don't calculate feedback value
27			 */
28			sof-synchronized;
29		};
30
31		/* The out_terminal supports the incoming Bluetooth LE Audio over ISO
32		 * and treats it as a microphone towards the USB host
33		 */
34		out_terminal: out_terminal {
35			compatible = "zephyr,uac2-input-terminal";
36			clock-source = <&uac_aclk>;
37			terminal-type = <INPUT_TERMINAL_MICROPHONE>;
38			front-left;
39			front-right;
40		};
41
42		/* USB Audio terminal from USB device to USB host */
43		in_terminal: in_terminal {
44			compatible = "zephyr,uac2-output-terminal";
45			data-source = <&out_terminal>;
46			clock-source = <&uac_aclk>;
47			terminal-type = <USB_TERMINAL_STREAMING>;
48		};
49
50		as_iso_in: in_interface {
51			compatible = "zephyr,uac2-audio-streaming";
52			linked-terminal = <&in_terminal>;
53			subslot-size = <2>;
54			bit-resolution = <16>;
55		};
56	};
57};
58