coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
fw_config.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <baseboard/gpio.h>
4 #include <bootstate.h>
5 #include <console/console.h>
6 #include <fw_config.h>
7 
8 static const struct pad_config lte_disable_pads[] = {
9  /* A8 : WWAN_RF_DISABLE_ODL */
10  PAD_NC(GPP_A8, NONE),
11  /* D6 : WWAN_EN */
12  PAD_NC(GPP_D6, NONE),
13  /* F12 : WWAN_RST_L */
15  /* H19 : SOC_I2C_SUB_INT_ODL */
17  /* H23 : WWAN_SAR_DETECT_ODL */
19 };
20 
21 static void fw_config_handle(void *unused)
22 {
23  if (!fw_config_probe(FW_CONFIG(DB_USB, DB_1C_LTE))) {
24  printk(BIOS_INFO, "Disable LTE-related GPIO pins.\n");
26  }
27 }
#define GPP_H19
#define GPP_F12
#define GPP_D6
#define GPP_A8
#define GPP_H23
@ BS_DEV_ENABLE
Definition: bootstate.h:82
@ BS_ON_ENTRY
Definition: bootstate.h:95
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define printk(level,...)
Definition: stdlib.h:16
#define FW_CONFIG(__field, __option)
Definition: fw_config.h:28
bool fw_config_probe(const struct fw_config *match)
Definition: fw_config.c:62
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition: loglevel.h:113
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL)
static const struct pad_config lte_disable_pads[]
Definition: fw_config.c:8
static void fw_config_handle(void *unused)
Definition: fw_config.c:21
void gpio_configure_pads(const struct soc_amd_gpio *gpio_list_ptr, size_t size)
program a particular set of GPIO
Definition: gpio.c:307
#define PAD_NC(pin)
Definition: gpio_defs.h:263
#define NULL
Definition: stddef.h:19
uint16_t unused
Definition: padconfig.h:13