1/* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <dt-bindings/usb/audio.h> 8 9/ { 10 uac2_headset: usb_audio2 { 11 compatible = "zephyr,uac2"; 12 status = "okay"; 13 full-speed; 14 audio-function = <AUDIO_FUNCTION_HEADSET>; 15 16 uac_aclk: aclk { 17 compatible = "zephyr,uac2-clock-source"; 18 clock-type = "internal-programmable"; 19 frequency-control = "host-programmable"; 20 sampling-frequencies = <48000>; 21 }; 22 23 out_terminal: out_terminal { 24 compatible = "zephyr,uac2-input-terminal"; 25 clock-source = <&uac_aclk>; 26 terminal-type = <USB_TERMINAL_STREAMING>; 27 front-left; 28 front-right; 29 }; 30 31 headphones_output: headphones { 32 compatible = "zephyr,uac2-output-terminal"; 33 data-source = <&out_terminal>; 34 clock-source = <&uac_aclk>; 35 terminal-type = <BIDIRECTIONAL_TERMINAL_HEADSET>; 36 assoc-terminal = <&mic_input>; 37 }; 38 39 mic_input: microphone { 40 compatible = "zephyr,uac2-input-terminal"; 41 clock-source = <&uac_aclk>; 42 terminal-type = <BIDIRECTIONAL_TERMINAL_HEADSET>; 43 /* Circular reference, macros will figure it out and 44 * provide correct associated terminal ID because the 45 * terminals associations are always 1-to-1. 46 * 47 * assoc-terminal = <&headphones_output>; 48 */ 49 front-left; 50 }; 51 52 in_terminal: in_terminal { 53 compatible = "zephyr,uac2-output-terminal"; 54 data-source = <&mic_input>; 55 clock-source = <&uac_aclk>; 56 terminal-type = <USB_TERMINAL_STREAMING>; 57 }; 58 59 as_iso_out: out_interface { 60 compatible = "zephyr,uac2-audio-streaming"; 61 linked-terminal = <&out_terminal>; 62 implicit-feedback; 63 subslot-size = <2>; 64 bit-resolution = <16>; 65 }; 66 67 as_iso_in: in_interface { 68 compatible = "zephyr,uac2-audio-streaming"; 69 linked-terminal = <&in_terminal>; 70 implicit-feedback; 71 subslot-size = <2>; 72 bit-resolution = <16>; 73 }; 74 }; 75}; 76