cpu/x86/smm/pci_resource_store: Store DEV/VEN ID
[coreboot2.git] / src / mainboard / google / dedede / variants / boten / variant.c
blob8d60bf5ce54d5f7446e6de2901ce309f8bc17b8c
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <acpi/acpi.h>
4 #include <acpi/acpigen.h>
5 #include <baseboard/variants.h>
6 #include <delay.h>
7 #include <ec/google/chromeec/ec.h>
8 #include <gpio.h>
9 #include <sar.h>
11 enum {
12 SKU_ID_BOTEN_MIN = 0x60000,
13 SKU_ID_BOTEN_MAX = 0x6ffff,
14 SKU_ID_BOTENFLEX_MIN = 0x90000,
15 SKU_ID_BOTENFLEX_MAX = 0x9ffff,
16 SKU_ID_BOOKEM_MIN = 0x290000,
17 SKU_ID_BOOKEM_MAX = 0x29ffff,
20 static void power_off_lte_module(void)
22 gpio_output(GPP_H17, 0);
23 mdelay(10);
24 gpio_output(GPP_A10, 0);
27 void variant_smi_sleep(u8 slp_typ)
30 * Once the FW_CONFIG is provisioned, power off LTE module only under
31 * the situation where it is stuffed.
33 if (slp_typ == ACPI_S5)
34 power_off_lte_module();
37 const char *get_wifi_sar_cbfs_filename(void)
39 uint32_t sku_id = google_chromeec_get_board_sku();
41 if (sku_id >= SKU_ID_BOTEN_MIN && sku_id <= SKU_ID_BOTEN_MAX)
42 return "wifi_sar-boten.hex";
43 if (sku_id >= SKU_ID_BOTENFLEX_MIN && sku_id <= SKU_ID_BOTENFLEX_MAX)
44 return "wifi_sar-botenflex.hex";
45 if (sku_id >= SKU_ID_BOOKEM_MIN && sku_id <= SKU_ID_BOOKEM_MAX)
46 return "wifi_sar-bookem.hex";
48 return WIFI_SAR_CBFS_DEFAULT_FILENAME;
51 void variant_generate_s0ix_hook(enum s0ix_entry entry)
53 if (entry == S0IX_ENTRY)
54 acpigen_soc_clear_tx_gpio(GPP_D13);
55 else if (entry == S0IX_EXIT)
56 acpigen_soc_set_tx_gpio(GPP_D13);