cpu/x86/smm/pci_resource_store: Store DEV/VEN ID
[coreboot2.git] / src / mainboard / google / brya / variants / brask / fw_config.c
blob5302923cd2ba0ebd42ae3744d07417c00651459d
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <bootstate.h>
4 #include <console/console.h>
5 #include <fw_config.h>
6 #include <gpio.h>
8 static const struct pad_config bt_i2s_enable_pads[] = {
9 PAD_CFG_NF(GPP_VGPIO_30, NONE, DEEP, NF3), /* BT_I2S_BCLK */
10 PAD_CFG_NF(GPP_VGPIO_31, NONE, DEEP, NF3), /* BT_I2S_SYNC */
11 PAD_CFG_NF(GPP_VGPIO_32, NONE, DEEP, NF3), /* BT_I2S_SDO */
12 PAD_CFG_NF(GPP_VGPIO_33, NONE, DEEP, NF3), /* BT_I2S_SDI */
13 PAD_CFG_NF(GPP_VGPIO_34, NONE, DEEP, NF1), /* SSP2_SCLK */
14 PAD_CFG_NF(GPP_VGPIO_35, NONE, DEEP, NF1), /* SSP2_SFRM */
15 PAD_CFG_NF(GPP_VGPIO_36, NONE, DEEP, NF1), /* SSP_TXD */
16 PAD_CFG_NF(GPP_VGPIO_37, NONE, DEEP, NF1), /* SSP_RXD */
19 static const struct pad_config bt_i2s_disable_pads[] = {
20 PAD_NC(GPP_VGPIO_30, NONE),
21 PAD_NC(GPP_VGPIO_31, NONE),
22 PAD_NC(GPP_VGPIO_32, NONE),
23 PAD_NC(GPP_VGPIO_33, NONE),
24 PAD_NC(GPP_VGPIO_34, NONE),
25 PAD_NC(GPP_VGPIO_35, NONE),
26 PAD_NC(GPP_VGPIO_36, NONE),
27 PAD_NC(GPP_VGPIO_37, NONE),
30 static void fw_config_handle(void *unused)
32 if (!fw_config_is_provisioned() || fw_config_probe(FW_CONFIG(AUDIO, AUDIO_UNKNOWN))) {
33 printk(BIOS_INFO, "Disable BT offload audio related GPIO pins.\n");
34 gpio_configure_pads(bt_i2s_disable_pads, ARRAY_SIZE(bt_i2s_disable_pads));
35 return;
38 if (fw_config_probe(FW_CONFIG(AUDIO, NAU88L25B_I2S))) {
39 printk(BIOS_INFO, "BT offload enabled over I2S with NAU88L25B\n");
40 gpio_configure_pads(bt_i2s_enable_pads, ARRAY_SIZE(bt_i2s_enable_pads));
44 BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);