Debian Codegraph @

src/mainboard/google/fatcat/variants/moonstone/variant.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <console/console.h>
6 #include <fw_config.h>
7 #include <sar.h>
8
9 const char *get_wifi_sar_cbfs_filename(void)
10 {
11 return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI));
12 }
13
14 void variant_update_soc_chip_config(struct soc_intel_pantherlake_config *config)
15 {
16 /*
17 *+-------+--------+-------------+
18 *| | FP_SPI | FP_USB |
19 *+-------+--------+-------------+
20 *| FPMCU | GSPI0 | usb2_port6 |
21 *+-------+--------+-------------+
22 */
23 if (fw_config_probe(FW_CONFIG(FPMCU, FP_USB))) {
24 printk(BIOS_INFO, "Disable GSPI\n");
25 config->serial_io_gspi_mode[PchSerialIoIndexGSPI0] = PchSerialIoDisabled;
26 printk(BIOS_INFO, "usb2_port6 to FP\n");
27 config->usb2_ports[5] = (struct usb2_port_config) USB2_PORT_MID(OC_SKIP);
28 }
29 /* Probe fw_config : "IO_PORT" to reconfigure port settings accordingly.
30 * proto0 : IO_PORT => "USB2A2C_HDMI:0"
31 * porot1.5: IO_PORT => "USB3C:1"
32 * +-----------------+------------------+------------------+
33 *| IO_PORT | USB2A2C_HDMI | USB3C |
34 *+-----------------+------------------+------------------+
35 *| tcss_usb3_port0 | USB4_C0 (MB-TBT) | USB4_C0 (MB-TBT) |
36 *+-----------------+------------------+------------------+
37 *| tcss_usb3_port1 | N/A | USB3.2 C2 (DB) |
38 *+-----------------+------------------+------------------+
39 *| tcss_usb3_port2 | USB4_C1 (MB-TBT) | N/A |
40 *+-----------------+------------------+------------------+
41 *| tcss_usb3_port3 | Fixed HDMI | USB4_C1 (MB-TBT) |
42 *+-----------------+------------------+------------------+
43 *| usb3_port1 | USB3_A0 | N/A |
44 *+-----------------+------------------+------------------+
45 *| usb3_port2 | USB3_A1 | N/A |
46 *+-----------------+------------------+------------------+
47 *| usb2_port5 | USB2_A0 | USB2_C2 (DB) |
48 *+-----------------+------------------+------------------+
49 *| usb2_port6 | USB2_A1 | USB_FP |
50 *+-----------------+------------------+------------------+
51 */
52
53 if (fw_config_probe(FW_CONFIG(IO_PORT, USB3C))) {
54 printk(BIOS_INFO, "Disable Type-A Port A0/A1\n");
55 config->usb3_ports[0] = (struct usb3_port_config) USB3_PORT_EMPTY;
56 config->usb3_ports[1] = (struct usb3_port_config) USB3_PORT_EMPTY;
57
58 printk(BIOS_INFO, "usb2_port5 to USB2_C2(DB).\n");
59 config->usb2_ports[4] = (struct usb2_port_config) USB2_PORT_TYPE_C(OC_SKIP);
60
61 printk(BIOS_INFO, "Enable tcss_usb3_port1 to USB3_C2(DB)\n");
62 config->tcss_ports[1] = (struct tcss_port_config) TCSS_PORT_DEFAULT(OC_SKIP);
63 printk(BIOS_INFO, "Disable tcss_usb3_port2\n");
64 config->tcss_ports[2] = (struct tcss_port_config) TCSS_PORT_EMPTY;
65 printk(BIOS_INFO, "Enable tcss_usb3_port3 to USB3_C1(MB)\n");
66 config->tcss_ports[3] = (struct tcss_port_config) TCSS_PORT_DEFAULT(OC_SKIP);
67 }
68 }