| 1 |
|
| 2 |
|
| 3 |
#include <baseboard/gpio.h> |
| 4 |
#include <baseboard/variants.h> |
| 5 |
#include <boardid.h> |
| 6 |
#include <console/console.h> |
| 7 |
#include <fw_config.h> |
| 8 |
|
| 9 |
static const struct pad_config lte_disable_pads_gothrax[] = { |
| 10 |
|
| 11 |
PAD_NC(GPP_A8, NONE), |
| 12 |
|
| 13 |
PAD_NC_LOCK(GPP_E13, NONE, LOCK_CONFIG), |
| 14 |
|
| 15 |
PAD_NC_LOCK(GPP_F12, NONE, LOCK_CONFIG), |
| 16 |
|
| 17 |
PAD_NC(GPP_H19, NONE), |
| 18 |
|
| 19 |
PAD_NC(GPP_H23, NONE), |
| 20 |
}; |
| 21 |
|
| 22 |
static const struct pad_config wfc_disable_pads[] = { |
| 23 |
|
| 24 |
PAD_NC(GPP_R6, NONE), |
| 25 |
|
| 26 |
PAD_NC(GPP_R7, NONE), |
| 27 |
}; |
| 28 |
|
| 29 |
void fw_config_gpio_padbased_override(struct pad_config *padbased_table) |
| 30 |
{ |
| 31 |
if (!(fw_config_probe(FW_CONFIG(DB_USB, DB_C_A_LTE)) || |
| 32 |
fw_config_probe(FW_CONFIG(DB_USB, DB_A_HDMI_LTE)))) { |
| 33 |
printk(BIOS_INFO, "Disable LTE-related GPIO pins on gothrax.\n"); |
| 34 |
gpio_padbased_override(padbased_table, lte_disable_pads_gothrax, |
| 35 |
ARRAY_SIZE(lte_disable_pads_gothrax)); |
| 36 |
} |
| 37 |
|
| 38 |
if (!fw_config_probe(FW_CONFIG(WFC, WFC_PRESENT))) { |
| 39 |
printk(BIOS_INFO, "Disable WFC GPIO pins.\n"); |
| 40 |
gpio_padbased_override(padbased_table, wfc_disable_pads, |
| 41 |
ARRAY_SIZE(wfc_disable_pads)); |
| 42 |
} |
| 43 |
} |