mainboard/intel/avenuecity_crb: Update full IIO configuration
[coreboot2.git] / src / mainboard / google / octopus / variants / bobba / variant.c
bloba5a16df23fad42f7e437f2d01cbd8c0531304061
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpi.h>
4 #include <sar.h>
5 #include <baseboard/variants.h>
6 #include <gpio.h>
7 #include <ec/google/chromeec/ec.h>
8 #include <soc/intel/apollolake/chip.h>
10 enum {
11 SKU_37_DROID = 37, /* LTE */
12 SKU_38_DROID = 38, /* LTE + Touch */
13 SKU_39_DROID = 39, /* LTE + KB backlight*/
14 SKU_40_DROID = 40, /* LTE + Touch + KB backlight*/
17 const char *get_wifi_sar_cbfs_filename(void)
19 uint32_t sku_id = google_chromeec_get_board_sku();
21 if (sku_id >= 33 && sku_id <= 44)
22 return "wifi_sar-droid.hex";
24 return WIFI_SAR_CBFS_DEFAULT_FILENAME;
27 void variant_smi_sleep(u8 slp_typ)
29 /* Currently use cases here all target to S5 therefore we do early return
30 * here for saving one transaction to the EC for getting SKU ID. */
31 if (slp_typ != ACPI_S5)
32 return;
34 switch (google_chromeec_get_board_sku()) {
35 case SKU_37_DROID:
36 case SKU_38_DROID:
37 case SKU_39_DROID:
38 case SKU_40_DROID:
39 power_off_lte_module();
40 return;
41 default:
42 return;
46 void variant_update_devtree(struct device *dev)
48 struct soc_intel_apollolake_config *cfg = NULL;
50 cfg = (struct soc_intel_apollolake_config *)dev->chip_info;
52 if (cfg != NULL && (cfg->disable_xhci_lfps_pm != 1)) {
53 switch (google_chromeec_get_board_sku()) {
54 case 37:
55 case 38:
56 case 39:
57 case 40:
58 cfg->disable_xhci_lfps_pm = 1;
59 return;
60 default:
61 return;