mainboard/intel/avenuecity_crb: Update full IIO configuration
[coreboot2.git] / src / mainboard / google / dedede / fw_config.c
blobd176283c2afc64ffadb99dd6b8583a28213993d8
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <bootstate.h>
4 #include <device/mmio.h>
5 #include <fw_config.h>
6 #include <gpio.h>
7 #include <intelblocks/gpio.h>
9 #define PAD_CFG_DW2_OFFSET (2 * sizeof(uint32_t))
10 #define VCCIOSEL_1V8 (1 << 8)
12 static void fw_config_handle(void *unused)
14 void *pad_conf_offset = gpio_dwx_address(GPP_D17) + PAD_CFG_DW2_OFFSET;
15 uint32_t pad_conf = read32(pad_conf_offset);
17 if (fw_config_probe(FW_CONFIG(AUDIO_AMP, RT1015P_AUTO))) {
18 pad_conf |= VCCIOSEL_1V8;
19 write32(pad_conf_offset, pad_conf);
22 BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);