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-acpi-intel-icl-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) 2018, 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) #include "../skylake/skl.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) static struct skl_machine_pdata icl_pdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 	.use_tplg_pcm = true,
^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) struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 		.id = "INT34C2",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 		.drv_name = "icl_rt274",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 		.fw_filename = "intel/dsp_fw_icl.bin",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 		.pdata = &icl_pdata,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 		.sof_fw_filename = "sof-icl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 		.sof_tplg_filename = "sof-icl-rt274.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 		.id = "10EC5682",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 		.drv_name = "sof_rt5682",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 		.sof_fw_filename = "sof-icl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 		.sof_tplg_filename = "sof-icl-rt5682.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	{},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) static const struct snd_soc_acpi_endpoint single_endpoint = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	.num = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	.aggregated = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	.group_position = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	.group_id = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	.num = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	.aggregated = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	.group_position = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	.group_id = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	.num = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	.aggregated = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	.group_position = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	.group_id = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) static const struct snd_soc_acpi_adr_device rt700_0_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		.adr = 0x000010025D070000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		.name_prefix = "rt700"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) static const struct snd_soc_acpi_link_adr icl_rvp[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		.num_adr = ARRAY_SIZE(rt700_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		.adr_d = rt700_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		.adr = 0x000020025D071100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 		.name_prefix = "rt711"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) static const struct snd_soc_acpi_adr_device rt1308_1_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		.adr = 0x000120025D130800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 		.name_prefix = "rt1308-1"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		.adr = 0x000120025D130800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		.endpoints = &spk_l_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 		.name_prefix = "rt1308-1"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		.adr = 0x000220025D130800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 		.endpoints = &spk_r_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 		.name_prefix = "rt1308-2"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 		.adr = 0x000320025D071500,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 		.num_endpoints = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 		.endpoints = &single_endpoint,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		.name_prefix = "rt715"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		.num_adr = ARRAY_SIZE(rt711_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 		.adr_d = rt711_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		.mask = BIT(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 		.num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 		.adr_d = rt1308_1_group1_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		.mask = BIT(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 		.num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		.adr_d = rt1308_2_group1_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 		.mask = BIT(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 		.num_adr = ARRAY_SIZE(rt715_3_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		.adr_d = rt715_3_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) static const struct snd_soc_acpi_link_adr icl_3_in_1_mono_amp[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 		.mask = BIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 		.num_adr = ARRAY_SIZE(rt711_0_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 		.adr_d = rt711_0_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 		.mask = BIT(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		.num_adr = ARRAY_SIZE(rt1308_1_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 		.adr_d = rt1308_1_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		.mask = BIT(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		.num_adr = ARRAY_SIZE(rt715_3_adr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 		.adr_d = rt715_3_adr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 		.link_mask = 0xF, /* 4 active links required */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		.links = icl_3_in_1_default,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 		.sof_fw_filename = "sof-icl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 		.sof_tplg_filename = "sof-icl-rt711-rt1308-rt715.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 		.link_mask = 0xB, /* 3 active links required */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 		.links = icl_3_in_1_mono_amp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 		.sof_fw_filename = "sof-icl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 		.sof_tplg_filename = "sof-icl-rt711-rt1308-rt715-mono.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		.link_mask = 0x1, /* rt700 connected on link0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		.links = icl_rvp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 		.drv_name = "sof_sdw",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 		.sof_fw_filename = "sof-icl.ri",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		.sof_tplg_filename = "sof-icl-rt700.tplg",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	{},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_sdw_machines);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) MODULE_LICENSE("GPL v2");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) MODULE_DESCRIPTION("Intel Common ACPI Match module");