summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorUsha P <usha.p@intel.com>2022-02-02 11:31:27 +0530
committerFelix Held <felix-coreboot@felixheld.de>2022-02-25 20:44:27 +0000
commit3ecee3cdd92e799072eb47262a1be29d62de927b (patch)
tree07a88f6a08c6427cbd694b4a21c33ea1d5965f3b /src/mainboard
parent92c2ccda0cab63b989582584392565fcc93d4def (diff)
mb/intel/adlrvp: Add support for MAX98373 codec
- Add configurability using FW_CONFIG field in CBI, to enable/disable I2S codec support for MAX98373 codecs - AUDIO=ADL_MAX98373_ALC5682I_I2S: enable max98373 codec using expansion board Bug=None Test=With CBI FW_CONFIG set to 0x100, check I2S audio output on expansion card Signed-off-by: Usha P <usha.p@intel.com> Change-Id: I94dfe500b99a669e9b981cdf15e360f22f33d2ac Reviewed-on: https://review.coreboot.org/c/coreboot/+/61544 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kangheui Won <khwon@chromium.org> Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/intel/adlrvp/Kconfig2
-rw-r--r--src/mainboard/intel/adlrvp/mainboard.c4
-rw-r--r--src/mainboard/intel/adlrvp/variants/adlrvp_n_ext_ec/overridetree.cb44
3 files changed, 48 insertions, 2 deletions
diff --git a/src/mainboard/intel/adlrvp/Kconfig b/src/mainboard/intel/adlrvp/Kconfig
index 1a9ed9e9d3..927b8ede8e 100644
--- a/src/mainboard/intel/adlrvp/Kconfig
+++ b/src/mainboard/intel/adlrvp/Kconfig
@@ -70,6 +70,8 @@ config BOARD_INTEL_ADLRVP_N_EXT_EC
select DRIVERS_INTEL_PMC
select INTEL_LPSS_UART_FOR_CONSOLE
select SOC_INTEL_ALDERLAKE_PCH_N
+ select FW_CONFIG
+ select FW_CONFIG_SOURCE_CHROMEEC_CBI
if BOARD_INTEL_ADLRVP_COMMON
diff --git a/src/mainboard/intel/adlrvp/mainboard.c b/src/mainboard/intel/adlrvp/mainboard.c
index d988fac7dd..8882671bfa 100644
--- a/src/mainboard/intel/adlrvp/mainboard.c
+++ b/src/mainboard/intel/adlrvp/mainboard.c
@@ -36,7 +36,7 @@ void __weak variant_devtree_update(void)
/* Override dev tree settings per board */
}
-#if CONFIG(BOARD_INTEL_ADLRVP_M_EXT_EC)
+#if CONFIG(BOARD_INTEL_ADLRVP_M_EXT_EC) || CONFIG(BOARD_INTEL_ADLRVP_N_EXT_EC)
static void add_fw_config_oem_string(const struct fw_config *config, void *arg)
{
struct smbios_type11 *t;
@@ -56,7 +56,7 @@ static void mainboard_smbios_strings(struct device *dev, struct smbios_type11 *t
static void mainboard_enable(struct device *dev)
{
-#if CONFIG(BOARD_INTEL_ADLRVP_M_EXT_EC)
+#if CONFIG(BOARD_INTEL_ADLRVP_M_EXT_EC) || CONFIG(BOARD_INTEL_ADLRVP_N_EXT_EC)
dev->ops->get_smbios_strings = mainboard_smbios_strings;
#endif
}
diff --git a/src/mainboard/intel/adlrvp/variants/adlrvp_n_ext_ec/overridetree.cb b/src/mainboard/intel/adlrvp/variants/adlrvp_n_ext_ec/overridetree.cb
index 8a49092613..5ed3065eb7 100644
--- a/src/mainboard/intel/adlrvp/variants/adlrvp_n_ext_ec/overridetree.cb
+++ b/src/mainboard/intel/adlrvp/variants/adlrvp_n_ext_ec/overridetree.cb
@@ -1,6 +1,50 @@
+fw_config
+ field AUDIO 8 10
+ option NONE 0
+ option ADL_MAX98373_ALC5682I_I2S 1
+ end
+end
+
chip soc/intel/alderlake
device domain 0 on
+ device ref i2c0 on
+ chip drivers/i2c/generic
+ register "hid" = ""10EC5682""
+ register "name" = ""RT58""
+ register "desc" = ""Headset Codec""
+ register "irq" = "ACPI_IRQ_EDGE_HIGH(GPP_H3_IRQ)"
+ # Set the jd_src to RT5668_JD1 for jack detection
+ register "property_count" = "1"
+ register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER"
+ register "property_list[0].name" = ""realtek,jd-src""
+ register "property_list[0].integer" = "1"
+ device i2c 1a on
+ probe AUDIO ADL_MAX98373_ALC5682I_I2S
+ end
+ end
+ chip drivers/i2c/max98373
+ register "vmon_slot_no" = "0"
+ register "imon_slot_no" = "1"
+ register "uid" = "0"
+ register "desc" = ""Right Speaker Amp""
+ register "name" = ""MAXR""
+ device i2c 31 on
+ probe AUDIO ADL_MAX98373_ALC5682I_I2S
+ end
+ end
+ chip drivers/i2c/max98373
+ register "vmon_slot_no" = "2"
+ register "imon_slot_no" = "3"
+ register "uid" = "1"
+ register "desc" = ""Left Speaker Amp""
+ register "name" = ""MAXL""
+ device i2c 32 on
+ probe AUDIO ADL_MAX98373_ALC5682I_I2S
+ end
+ end
+ end
+
device ref pch_espi on
chip ec/google/chromeec
use conn0 as mux_conn[0]