Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * soc-apci-intel-tgl-match.c - tables and support for ICL ACPI enumeration.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright (c) 2019, Intel Corporation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <sound/soc-acpi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <sound/soc-acpi-intel-match.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) static struct snd_soc_acpi_codecs tgl_codecs = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 	.num_codecs = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 	.codecs = {"MX98357A"}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) static const struct snd_soc_acpi_endpoint single_endpoint = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	.num = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 	.aggregated = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	.group_position = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	.group_id = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	.num = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	.aggregated = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	.group_position = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	.group_id = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	.num = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	.aggregated = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	.group_position = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	.group_id = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 		.adr = 0x000020025D071100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 		.name_prefix = "rt711"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) static const struct snd_soc_acpi_adr_device rt711_1_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		.adr = 0x000120025D071100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		.name_prefix = "rt711"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) static const struct snd_soc_acpi_adr_device rt1308_1_dual_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		.adr = 0x000120025D130800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		.endpoints = &spk_l_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		.name_prefix = "rt1308-1"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 		.adr = 0x000122025D130800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 		.endpoints = &spk_r_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 		.name_prefix = "rt1308-2"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 		.adr = 0x000120025D130800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		.name_prefix = "rt1308-1"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) static const struct snd_soc_acpi_adr_device rt1308_2_single_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		.adr = 0x000220025D130800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		.name_prefix = "rt1308-1"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 		.adr = 0x000120025D130800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		.endpoints = &spk_l_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 		.name_prefix = "rt1308-1"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 		.adr = 0x000220025D130800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 		.endpoints = &spk_r_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		.name_prefix = "rt1308-2"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) static const struct snd_soc_acpi_adr_device rt715_0_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		.adr = 0x000021025D071500,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 		.name_prefix = "rt715"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 		.adr = 0x000320025D071500,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 		.name_prefix = "rt715"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) static const struct snd_soc_acpi_adr_device mx8373_1_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		.adr = 0x000123019F837300,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 		.endpoints = &spk_l_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 		.name_prefix = "Right"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 		.adr = 0x000127019F837300,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 		.endpoints = &spk_r_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 		.name_prefix = "Left"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		.adr = 0x000021025D568200,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 		.name_prefix = "rt5682"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 		.adr = 0x000030025D071101,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 		.name_prefix = "rt711"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 		.adr = 0x000131025D131601, /* unique ID is set for some reason */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		.endpoints = &spk_l_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		.name_prefix = "rt1316-1"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 		.adr = 0x000230025D131601,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		.endpoints = &spk_r_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 		.name_prefix = "rt1316-2"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) static const struct snd_soc_acpi_adr_device rt714_3_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 		.adr = 0x000330025D071401,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 		.name_prefix = "rt714"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) static const struct snd_soc_acpi_link_adr tgl_i2s_rt1308[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		.num_adr = ARRAY_SIZE(rt711_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		.adr_d = rt711_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) static const struct snd_soc_acpi_link_adr tgl_rvp[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 		.num_adr = ARRAY_SIZE(rt711_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 		.adr_d = rt711_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 		.mask = BIT(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 		.num_adr = ARRAY_SIZE(rt1308_1_dual_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 		.adr_d = rt1308_1_dual_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) static const struct snd_soc_acpi_link_adr tgl_chromebook_base[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 		.num_adr = ARRAY_SIZE(rt5682_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 		.adr_d = rt5682_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 		.mask = BIT(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 		.num_adr = ARRAY_SIZE(mx8373_1_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 		.adr_d = mx8373_1_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) static const struct snd_soc_acpi_link_adr tgl_3_in_1_default[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 		.num_adr = ARRAY_SIZE(rt711_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 		.adr_d = rt711_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 		.mask = BIT(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 		.num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 		.adr_d = rt1308_1_group1_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 		.mask = BIT(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 		.num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 		.adr_d = rt1308_2_group1_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 		.mask = BIT(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 		.num_adr = ARRAY_SIZE(rt715_3_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 		.adr_d = rt715_3_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) static const struct snd_soc_acpi_link_adr tgl_3_in_1_mono_amp[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 		.num_adr = ARRAY_SIZE(rt711_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 		.adr_d = rt711_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 		.mask = BIT(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 		.num_adr = ARRAY_SIZE(rt1308_1_single_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 		.adr_d = rt1308_1_single_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 		.mask = BIT(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 		.num_adr = ARRAY_SIZE(rt715_3_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 		.adr_d = rt715_3_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) static const struct snd_soc_acpi_link_adr tgl_sdw_rt711_link1_rt1308_link2_rt715_link0[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 		.mask = BIT(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 		.num_adr = ARRAY_SIZE(rt711_1_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 		.adr_d = rt711_1_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 		.mask = BIT(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 		.num_adr = ARRAY_SIZE(rt1308_2_single_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 		.adr_d = rt1308_2_single_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 		.num_adr = ARRAY_SIZE(rt715_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 		.adr_d = rt715_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 		.num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 		.adr_d = rt711_sdca_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 		.mask = BIT(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 		.num_adr = ARRAY_SIZE(rt1316_1_group1_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 		.adr_d = rt1316_1_group1_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 		.mask = BIT(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 		.num_adr = ARRAY_SIZE(rt1316_2_group1_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 		.adr_d = rt1316_2_group1_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 		.mask = BIT(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 		.num_adr = ARRAY_SIZE(rt714_3_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 		.adr_d = rt714_3_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) static struct snd_soc_acpi_codecs tgl_max98373_amp = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 	.num_codecs = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	.codecs = {"MX98373"}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 		.id = "10EC1308",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 		.link_mask = 0x1, /* RT711 on SoundWire link0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 		.links = tgl_i2s_rt1308,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 		.sof_tplg_filename = "sof-tgl-rt711-i2s-rt1308.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 		.id = "10EC5682",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 		.drv_name = "tgl_max98357a_rt5682",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 		.machine_quirk = snd_soc_acpi_codec_list,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 		.quirk_data = &tgl_codecs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 		.sof_tplg_filename = "sof-tgl-max98357a-rt5682.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 		.id = "10EC5682",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 		.drv_name = "tgl_max98373_rt5682",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 		.machine_quirk = snd_soc_acpi_codec_list,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 		.quirk_data = &tgl_max98373_amp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 		.sof_tplg_filename = "sof-tgl-max98373-rt5682.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 	{},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machines);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) /* this table is used when there is no I2S codec present */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 		.link_mask = 0x7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 		.links = tgl_sdw_rt711_link1_rt1308_link2_rt715_link0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 		.sof_tplg_filename = "sof-tgl-rt715-rt711-rt1308-mono.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 		.link_mask = 0xF, /* 4 active links required */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 		.links = tgl_3_in_1_default,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 		.sof_tplg_filename = "sof-tgl-rt711-rt1308-rt715.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) 		 * link_mask should be 0xB, but all links are enabled by BIOS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) 		 * This entry will be selected if there is no rt1308 exposed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 		 * on link2 since it will fail to match the above entry.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) 		.link_mask = 0xF,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 		.links = tgl_3_in_1_mono_amp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 		.sof_tplg_filename = "sof-tgl-rt711-rt1308-mono-rt715.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 		.link_mask = 0xF, /* 4 active links required */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) 		.links = tgl_3_in_1_sdca,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) 		.sof_tplg_filename = "sof-tgl-rt711-rt1316-rt714.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 		.link_mask = 0x3, /* rt711 on link 0 and 2 rt1308s on link 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) 		.links = tgl_rvp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 		.sof_tplg_filename = "sof-tgl-rt711-rt1308.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) 		.link_mask = 0x3, /* rt5682 on link0 & 2xmax98373 on link 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) 		.links = tgl_chromebook_base,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) 		.sof_tplg_filename = "sof-tgl-sdw-max98373-rt5682.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) 		.link_mask = 0x1, /* this will only enable rt5682 for now */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 		.links = tgl_chromebook_base,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) 		.sof_fw_filename = "sof-tgl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) 		.sof_tplg_filename = "sof-tgl-rt5682.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) 	{},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_sdw_machines);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) MODULE_LICENSE("GPL v2");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) MODULE_DESCRIPTION("Intel Common ACPI Match module");