mb/google/fatcat/var/fatcat: Refactor GPIO programming for UFS support
[coreboot.git] / src / mainboard / google / brya / variants / gothrax / variant.c
blob8b8822bf4ff6c7db8f57431d71134fb536e47b8a
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 void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
10 if (!(fw_config_probe(FW_CONFIG(DB_USB, DB_C_A_LTE)) ||
11 fw_config_probe(FW_CONFIG(DB_USB, DB_A_HDMI_LTE)))) {
12 printk(BIOS_INFO, "Disable usb2_port5 and usb3_port3 of WWAN.\n");
14 config->usb2_ports[4].enable = 0;
15 config->usb2_ports[4].ocpin = OC_SKIP;
16 config->usb2_ports[4].tx_bias = USB2_BIAS_0MV;
17 config->usb2_ports[4].tx_emp_enable = USB2_EMP_OFF;
18 config->usb2_ports[4].pre_emp_bias = USB2_BIAS_0MV;
19 config->usb2_ports[4].pre_emp_bit = USB2_HALF_BIT_PRE_EMP;
21 config->usb3_ports[2].enable = 0;
22 config->usb3_ports[2].ocpin = OC_SKIP;
23 config->usb3_ports[2].tx_de_emp = 0x00;
24 config->usb3_ports[2].tx_downscale_amp = 0x00;
27 if (!fw_config_probe(FW_CONFIG(WFC, WFC_PRESENT))) {
28 printk(BIOS_INFO, "Disable usb2_port7 of WFC.\n");
29 config->usb2_ports[6].enable = 0;
30 config->usb2_ports[6].ocpin = OC_SKIP;
31 config->usb2_ports[6].tx_bias = USB2_BIAS_0MV;
32 config->usb2_ports[6].tx_emp_enable = USB2_EMP_OFF;
33 config->usb2_ports[6].pre_emp_bias = USB2_BIAS_0MV;
34 config->usb2_ports[6].pre_emp_bit = USB2_HALF_BIT_PRE_EMP;
37 if (fw_config_probe(FW_CONFIG(DB_USB, DB_A_HDMI_LTE))) {
38 printk(BIOS_INFO, "Disable typec aux_bias_pads in the SOC.\n");
39 config->typec_aux_bias_pads[1].pad_auxp_dc = 0x00;
40 config->typec_aux_bias_pads[1].pad_auxn_dc = 0x00;