1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <console/console.h>
8 static const struct pad_config i2s_enable_pads
[] = {
9 /* Audio Codec INT N */
10 PAD_CFG_GPI_APIC(GPP_H3
, NONE
, PLTRST
, EDGE_BOTH
, INVERT
),
13 PAD_CFG_NF(GPP_R0
, NONE
, DEEP
, NF2
),
15 PAD_CFG_NF(GPP_R1
, NONE
, DEEP
, NF2
),
17 PAD_CFG_NF(GPP_R2
, NONE
, DEEP
, NF2
),
19 PAD_CFG_NF(GPP_R3
, NONE
, DEEP
, NF2
),
22 PAD_CFG_NF(GPP_R4
, NONE
, DEEP
, NF2
),
24 PAD_CFG_NF(GPP_R5
, NONE
, DEEP
, NF2
),
26 PAD_CFG_NF(GPP_R6
, NONE
, DEEP
, NF2
),
28 PAD_CFG_NF(GPP_R7
, NONE
, DEEP
, NF2
),
31 PAD_CFG_NF(GPP_D19
, NONE
, DEEP
, NF1
),
34 static void fw_config_handle(void *unused
)
36 if (fw_config_probe(FW_CONFIG(AUDIO
, ADL_MAX98373_ALC5682I_I2S
))) {
37 printk(BIOS_INFO
, "Configure GPIOs for I2S audio.\n");
38 gpio_configure_pads(i2s_enable_pads
, ARRAY_SIZE(i2s_enable_pads
));
41 BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE
, BS_ON_ENTRY
, fw_config_handle
, NULL
);