util/crossgcc/buildgcc: Add riscv64-elf to targets
[coreboot.git] / src / mainboard / google / brya / variants / glassway / fw_config.c
blob8ed6ea6233e73e4ef8cff9aa48421d9c537db09f
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <console/console.h>
6 #include <fw_config.h>
8 static const struct pad_config hdmi_disable_pads[] = {
9 /* A20 : DDSP_HPD2 ==> NC */
10 PAD_NC_LOCK(GPP_A20, NONE, LOCK_CONFIG),
11 /* E20 : DDP2_CTRLCLK ==> NC */
12 PAD_NC_LOCK(GPP_E20, NONE, LOCK_CONFIG),
13 /* E21 : DDP2_CTRLDATA ==> NC */
14 PAD_NC_LOCK(GPP_E21, NONE, LOCK_CONFIG),
17 static const struct pad_config lte_disable_pads[] = {
18 /* A8 : WWAN_RF_DISABLE_ODL */
19 PAD_NC(GPP_A8, NONE),
20 /* D6 : WWAN_EN */
21 PAD_NC(GPP_D6, NONE),
22 /* F12 : WWAN_RST_L */
23 PAD_NC_LOCK(GPP_F12, NONE, LOCK_CONFIG),
24 /* H19 : SOC_I2C_SUB_INT_ODL */
25 PAD_NC(GPP_H19, NONE),
26 /* H23 : WWAN_SAR_DETECT_ODL */
27 PAD_NC(GPP_H23, NONE),
30 static const struct pad_config stylus_disable_pads[] = {
31 /* F13 : SOC_PEN_DETECT_R_ODL */
32 PAD_NC_LOCK(GPP_F13, NONE, LOCK_CONFIG),
33 /* F15 : SOC_PEN_DETECT_ODL */
34 PAD_NC_LOCK(GPP_F15, NONE, LOCK_CONFIG),
37 void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
39 if (!fw_config_probe(FW_CONFIG(DB_USB, DB_HDMI_LTE))) {
40 printk(BIOS_INFO, "Disable HDMI GPIO pins.\n");
41 gpio_padbased_override(padbased_table, hdmi_disable_pads,
42 ARRAY_SIZE(hdmi_disable_pads));
45 /* Set to Disable LTE-related GPIO pins when field DB_USB is not DB_1C_LTE and DB_HDMI_LTE. */
46 if (!fw_config_probe(FW_CONFIG(DB_USB, DB_1C_LTE))
47 && !fw_config_probe(FW_CONFIG(DB_USB, DB_HDMI_LTE))) {
48 printk(BIOS_INFO, "Disable LTE GPIO pins.\n");
49 gpio_padbased_override(padbased_table, lte_disable_pads,
50 ARRAY_SIZE(lte_disable_pads));
53 if (fw_config_probe(FW_CONFIG(STYLUS, STYLUS_ABSENT))) {
54 printk(BIOS_INFO, "Disable Stylus GPIO pins.\n");
55 gpio_padbased_override(padbased_table, stylus_disable_pads,
56 ARRAY_SIZE(stylus_disable_pads));