mb/google/brya: Create rull variant
[coreboot2.git] / src / mainboard / google / kahlee / variants / careena / variant.c
blob5a393e252d470fc139e4538d21b2137de88b5141
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpi.h>
4 #include <ec/google/chromeec/ec.h>
5 #include <baseboard/variants.h>
6 #include <variant/sku.h>
7 #include <gpio.h>
8 #include <variant/gpio.h>
10 static const struct soc_amd_gpio variant_gpio_wlan_rst_early_reset[] = {
11 /* GPIO_70 - WLAN_PE_RST_L */
12 PAD_GPO(GPIO_70, LOW),
15 const struct soc_amd_gpio *variant_wlan_rst_early_gpio_table(size_t *size)
17 *size = ARRAY_SIZE(variant_gpio_wlan_rst_early_reset);
18 return variant_gpio_wlan_rst_early_reset;
21 void variant_romstage_entry(void)
23 uint32_t sku = google_chromeec_get_sku_id();
24 uint32_t bid;
26 if (!acpi_is_wakeup_s3()) {
27 /* Based on SKU, turn on keyboard backlight */
28 switch (sku) {
29 default:
30 google_chromeec_kbbacklight(75);
31 break;
32 case SKU_CAREENA_KB_BACKLIGHT18:
33 case SKU_CAREENA_KB_BACKLIGHT19:
34 case SKU_CAREENA_KB_BACKLIGHT22:
35 case SKU_CAREENA_KB_BACKLIGHT23:
36 google_chromeec_kbbacklight(10);
37 break;
41 if (google_chromeec_get_board_version(&bid))
42 return;
44 if (bid == 7)
46 * Config WLAN RST - GPIO70 PU: release RST
47 * From RTK RTL8822CE spec, WLAN RST needs to be active
48 * at least 50 ms since WLAN power on
50 gpio_set(GPIO_70, 1);