1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
6 #include <console/console.h>
9 static const struct pad_config lte_disable_pads_gothrax
[] = {
10 /* A8 : WWAN_RF_DISABLE_ODL */
13 PAD_NC_LOCK(GPP_E13
, NONE
, LOCK_CONFIG
),
14 /* F12 : WWAN_RST_L */
15 PAD_NC_LOCK(GPP_F12
, NONE
, LOCK_CONFIG
),
16 /* H19 : SOC_I2C_SUB_INT_ODL */
17 PAD_NC(GPP_H19
, NONE
),
18 /* H23 : WWAN_SAR_DETECT_ODL */
19 PAD_NC(GPP_H23
, NONE
),
22 static const struct pad_config wfc_disable_pads
[] = {
23 /* R6 : DMIC_WCAM_CLK_R */
25 /* R7 : DMIC_WCAM_DATA */
29 void fw_config_gpio_padbased_override(struct pad_config
*padbased_table
)
31 if (!fw_config_probe(FW_CONFIG(DB_USB
, DB_C_A_LTE
))) {
32 printk(BIOS_INFO
, "Disable LTE-related GPIO pins on gothrax.\n");
33 gpio_padbased_override(padbased_table
, lte_disable_pads_gothrax
,
34 ARRAY_SIZE(lte_disable_pads_gothrax
));
37 if (!fw_config_probe(FW_CONFIG(WFC
, WFC_PRESENT
))) {
38 printk(BIOS_INFO
, "Disable WFC GPIO pins.\n");
39 gpio_padbased_override(padbased_table
, wfc_disable_pads
,
40 ARRAY_SIZE(wfc_disable_pads
));