diff --git a/include/nvidia-oot/dt-bindings/sound/tegra-asoc-dais.h b/include/nvidia-oot/dt-bindings/sound/tegra-asoc-dais.h index 07a0ab7..6ef1388 100644 --- a/include/nvidia-oot/dt-bindings/sound/tegra-asoc-dais.h +++ b/include/nvidia-oot/dt-bindings/sound/tegra-asoc-dais.h @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 -// SPDX-FileCopyrightText: Copyright (c) 2019-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// Copyright (c) 2019-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. #ifndef __DT_TEGRA_ASOC_DAIS_H #define __DT_TEGRA_ASOC_DAIS_H @@ -53,17 +53,42 @@ #define XBAR_DSPK1 30 #define XBAR_DSPK2 31 #define XBAR_SFC1_RX 32 + +/* + * TODO As per downstream kernel code there will be routing issue + * if DAI names are updated for SFC, MVC and OPE input and + * output. Due to that using single DAI with same name as downstream + * kernel for input and output and added output DAIs just to keep + * similar to upstream kernel, so that it will be easy to upstream + * later. + * + * Once the routing changes are done for above mentioned modules, + * use the commented output dai index and define output dai + * links in tegra186-audio-graph.dtsi + */ +#if 0 #define XBAR_SFC1_TX 33 -#define XBAR_SFC2_RX 34 #define XBAR_SFC2_TX 35 -#define XBAR_SFC3_RX 36 #define XBAR_SFC3_TX 37 -#define XBAR_SFC4_RX 38 #define XBAR_SFC4_TX 39 -#define XBAR_MVC1_RX 40 #define XBAR_MVC1_TX 41 -#define XBAR_MVC2_RX 42 #define XBAR_MVC2_TX 43 +#define XBAR_OPE1_TX 113 +#else +#define XBAR_SFC1_TX XBAR_SFC1_RX +#define XBAR_SFC2_TX XBAR_SFC2_RX +#define XBAR_SFC3_TX XBAR_SFC3_RX +#define XBAR_SFC4_TX XBAR_SFC4_RX +#define XBAR_MVC1_TX XBAR_MVC1_RX +#define XBAR_MVC2_TX XBAR_MVC2_RX +#define XBAR_OPE1_TX XBAR_OPE1_RX +#endif + +#define XBAR_SFC2_RX 34 +#define XBAR_SFC3_RX 36 +#define XBAR_SFC4_RX 38 +#define XBAR_MVC1_RX 40 +#define XBAR_MVC2_RX 42 #define XBAR_AMX1_IN1 44 #define XBAR_AMX1_IN2 45 #define XBAR_AMX1_IN3 46 @@ -133,7 +158,6 @@ #define XBAR_ASRC_OUT6 110 #define XBAR_ASRC_IN7 111 #define XBAR_OPE1_RX 112 -#define XBAR_OPE1_TX 113 #define XBAR_AFC1 114 #define XBAR_AFC2 115 #define XBAR_AFC3 116 @@ -239,11 +263,11 @@ #define AMX_OUT 4 /* ADX */ -#define ADX_IN 0 -#define ADX_OUT1 1 -#define ADX_OUT2 2 -#define ADX_OUT3 3 -#define ADX_OUT4 4 +#define ADX_OUT1 0 +#define ADX_OUT2 1 +#define ADX_OUT3 2 +#define ADX_OUT4 3 +#define ADX_IN 4 /* ASRC */ #define ASRC_IN1 0 diff --git a/nv-soc/tegra234-soc-audio-dai-links.dtsi b/nv-soc/tegra234-soc-audio-dai-links.dtsi index 8324767..3b98925 100644 --- a/nv-soc/tegra234-soc-audio-dai-links.dtsi +++ b/nv-soc/tegra234-soc-audio-dai-links.dtsi @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -// SPDX-FileCopyrightText: Copyright (c) 2019-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-FileCopyrightText: Copyright (c) 2019-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. #include @@ -7,9 +7,7 @@ #define ADMAIF_CIF(i) (TEGRA186_ADMAIF_CIF_OFFSET + i - 1) / { - tegra_sound: sound { - #sound-dai-cells = <0>; - + sound { /* ADMAIF <--> XBAR PCM links */ admaif1_pcm_link: nvidia-audio-card,dai-link@0 { status = "okay"; @@ -524,6 +522,247 @@ }; }; + /* ADMAIF <--> XBAR CODEC links */ + admaif1_codec_link: nvidia-audio-card,dai-link@44 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(1)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF1>; + }; + }; + + admaif2_codec_link: nvidia-audio-card,dai-link@45 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(2)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF2>; + }; + }; + + admaif3_codec_link: nvidia-audio-card,dai-link@46 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(3)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF3>; + }; + }; + + admaif4_codec_link: nvidia-audio-card,dai-link@47 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(4)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF4>; + }; + }; + + admaif5_codec_link: nvidia-audio-card,dai-link@48 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(5)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF5>; + }; + }; + + admaif6_codec_link: nvidia-audio-card,dai-link@49 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(6)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF6>; + }; + }; + + admaif7_codec_link: nvidia-audio-card,dai-link@50 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(7)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF7>; + }; + }; + + admaif8_codec_link: nvidia-audio-card,dai-link@51 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(8)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF8>; + }; + }; + + admaif9_codec_link: nvidia-audio-card,dai-link@52 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(9)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF9>; + }; + }; + + admaif10_codec_link: nvidia-audio-card,dai-link@53 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(10)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF10>; + }; + }; + + admaif11_codec_link: nvidia-audio-card,dai-link@54 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(11)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF11>; + }; + }; + + admaif12_codec_link: nvidia-audio-card,dai-link@55 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(12)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF12>; + }; + }; + + admaif13_codec_link: nvidia-audio-card,dai-link@56 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(13)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF13>; + }; + }; + + admaif14_codec_link: nvidia-audio-card,dai-link@57 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(14)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF14>; + }; + }; + + admaif15_codec_link: nvidia-audio-card,dai-link@58 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(15)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF15>; + }; + }; + + admaif16_codec_link: nvidia-audio-card,dai-link@59 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(16)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF16>; + }; + }; + + admaif17_codec_link: nvidia-audio-card,dai-link@60 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(17)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF17>; + }; + }; + + admaif18_codec_link: nvidia-audio-card,dai-link@61 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(18)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF18>; + }; + }; + + admaif19_codec_link: nvidia-audio-card,dai-link@62 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(19)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF19>; + }; + }; + + admaif20_codec_link: nvidia-audio-card,dai-link@63 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_admaif ADMAIF_CIF(20)>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ADMAIF20>; + }; + }; + /* XBAR <---> I2S links */ xbar_to_i2s1: nvidia-audio-card,dai-link@64 { status = "okay"; @@ -705,7 +944,7 @@ sound-dai = <&tegra_i2s1 I2S_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_i2s1 I2S_DUMMY>; }; }; @@ -718,7 +957,7 @@ sound-dai = <&tegra_i2s2 I2S_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_i2s2 I2S_DUMMY>; }; }; @@ -731,7 +970,7 @@ sound-dai = <&tegra_i2s3 I2S_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_i2s3 I2S_DUMMY>; }; }; @@ -744,7 +983,7 @@ sound-dai = <&tegra_i2s4 I2S_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_i2s4 I2S_DUMMY>; }; }; @@ -757,7 +996,7 @@ sound-dai = <&tegra_i2s5 I2S_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_i2s5 I2S_DUMMY>; }; }; @@ -770,7 +1009,7 @@ sound-dai = <&tegra_i2s6 I2S_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_i2s6 I2S_DUMMY>; }; }; @@ -784,7 +1023,7 @@ sound-dai = <&tegra_dmic1 DMIC_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_dmic1 DMIC_DUMMY>; }; }; @@ -797,7 +1036,7 @@ sound-dai = <&tegra_dmic2 DMIC_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_dmic2 DMIC_DUMMY>; }; }; @@ -810,7 +1049,7 @@ sound-dai = <&tegra_dmic3 DMIC_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_dmic3 DMIC_DUMMY>; }; }; @@ -823,7 +1062,7 @@ sound-dai = <&tegra_dmic4 DMIC_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_dmic4 DMIC_DUMMY>; }; }; @@ -837,7 +1076,7 @@ sound-dai = <&tegra_dspk1 DSPK_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_dspk1 DSPK_DUMMY>; }; }; @@ -850,7 +1089,7 @@ sound-dai = <&tegra_dspk2 DSPK_DAP>; }; codec { - sound-dai = <&tegra_sound>; + sound-dai = <&tegra_dspk2 DSPK_DUMMY>; }; }; @@ -1634,6 +1873,156 @@ }; }; + xbar_to_afc1: nvidia-audio-card,dai-link@151 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_ahub XBAR_AFC1>; + }; + codec { + sound-dai = <&tegra_afc1 AFC_IN>; + prefix = "AFC1"; + }; + }; + + xbar_to_afc2: nvidia-audio-card,dai-link@152 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_ahub XBAR_AFC2>; + }; + codec { + sound-dai = <&tegra_afc2 AFC_IN>; + prefix = "AFC2"; + }; + }; + + xbar_to_afc3: nvidia-audio-card,dai-link@153 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_ahub XBAR_AFC3>; + }; + codec { + sound-dai = <&tegra_afc3 AFC_IN>; + prefix = "AFC3"; + }; + }; + + xbar_to_afc4: nvidia-audio-card,dai-link@154 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_ahub XBAR_AFC4>; + }; + codec { + sound-dai = <&tegra_afc4 AFC_IN>; + prefix = "AFC4"; + }; + }; + + xbar_to_afc5: nvidia-audio-card,dai-link@155 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_ahub XBAR_AFC5>; + }; + codec { + sound-dai = <&tegra_afc5 AFC_IN>; + prefix = "AFC5"; + }; + }; + + xbar_to_afc6: nvidia-audio-card,dai-link@156 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_ahub XBAR_AFC6>; + }; + codec { + sound-dai = <&tegra_afc6 AFC_IN>; + prefix = "AFC6"; + }; + }; + + afc1_to_xbar: nvidia-audio-card,dai-link@157 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_afc1 AFC_OUT>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_AFC1>; + }; + }; + + afc2_to_xbar: nvidia-audio-card,dai-link@158 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_afc2 AFC_OUT>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_AFC2>; + }; + }; + + afc3_to_xbar: nvidia-audio-card,dai-link@159 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_afc3 AFC_OUT>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_AFC3>; + }; + }; + + afc4_to_xbar: nvidia-audio-card,dai-link@160 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_afc4 AFC_OUT>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_AFC4>; + }; + }; + + afc5_to_xbar: nvidia-audio-card,dai-link@161 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_afc5 AFC_OUT>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_AFC5>; + }; + }; + + afc6_to_xbar: nvidia-audio-card,dai-link@162 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_afc6 AFC_OUT>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_AFC6>; + }; + }; + xbar_to_mvc1: nvidia-audio-card,dai-link@163 { status = "okay"; @@ -1871,5 +2260,17 @@ sound-dai = <&tegra_ahub XBAR_ASRC_OUT6>; }; }; + + arad_to_xbar: nvidia-audio-card,dai-link@182 { + status = "okay"; + + link-type = ; + cpu { + sound-dai = <&tegra_arad ARAD>; + }; + codec { + sound-dai = <&tegra_ahub XBAR_ARAD>; + }; + }; }; };