mb/google/brya: Create rull variant
[coreboot2.git] / src / mainboard / google / kahlee / variants / baseboard / mainboard.c
blob7893449f7de6498b4e19ec570f193f9aead58bb4
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <ec/google/chromeec/ec.h>
4 #include <baseboard/variants.h>
5 #include <boardid.h>
6 #include <cbfs.h>
7 #include <gpio.h>
8 #include <smbios.h>
9 #include <variant/gpio.h>
11 uint32_t sku_id(void)
13 static int sku = -1;
15 if (sku == -1)
16 sku = google_chromeec_get_sku_id();
18 return sku;
21 uint8_t variant_board_sku(void)
23 return sku_id();
26 void variant_mainboard_suspend_resume(void)
28 /* Enable backlight - GPIO 133 active low */
29 gpio_set(GPIO_133, 0);
32 const char *smbios_mainboard_manufacturer(void)
34 static char oem_bin_data[11];
35 static const char *manuf;
37 if (!CONFIG(USE_OEM_BIN))
38 return CONFIG_MAINBOARD_SMBIOS_MANUFACTURER;
40 if (manuf)
41 return manuf;
43 if (cbfs_load("oem.bin", oem_bin_data, sizeof(oem_bin_data) - 1))
44 manuf = &oem_bin_data[0];
45 else
46 manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER;
48 return manuf;