summaryrefslogtreecommitdiff
path: root/src/mainboard/google/dedede/variants/galtic
diff options
context:
space:
mode:
authorFrankChu <frank_chu@pegatron.corp-partner.google.com>2021-10-29 11:59:26 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-11-11 14:32:57 +0000
commitfb05b820ebdf06a47cc36e189d86aea02637fe1a (patch)
tree5ecef0f313a1e290a853abe53bd28ea7fe6e75f7 /src/mainboard/google/dedede/variants/galtic
parent5554226426872051165c077009bd968837585cbd (diff)
mb/google/dedede/var/galtic: update Wifi SAR for convertibles
Add wifi sar for galtic/galtic360/galith360 Using convertible mode of SKU ID to load wifi table. Each Project and SKU ID correspond as below galtic (sku id:0x120000) galith (sku id:0x130000) gallop (sku id:0x150000) galtic360 (sku id:0x260000) galith360 (sku id:0x270000) BUG=b:203741126 TEST=emerge-dedede coreboot chromeos-bootimage \ coreboot-private-files-baseboard-dedede verify the SAR table is correct in each project Signed-off-by: FrankChu <frank_chu@pegatron.corp-partner.google.com> Change-Id: If4203d176dd717fa62c88d9b4fab8a53847213fe Reviewed-on: https://review.coreboot.org/c/coreboot/+/58734 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marco Chen <marcochen@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/mainboard/google/dedede/variants/galtic')
-rw-r--r--src/mainboard/google/dedede/variants/galtic/variant.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/mainboard/google/dedede/variants/galtic/variant.c b/src/mainboard/google/dedede/variants/galtic/variant.c
index 72d91ee81f..558cba6251 100644
--- a/src/mainboard/google/dedede/variants/galtic/variant.c
+++ b/src/mainboard/google/dedede/variants/galtic/variant.c
@@ -1,9 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#include <ec/google/chromeec/ec.h>
#include <fw_config.h>
#include <sar.h>
+enum {
+ GALTIC_SKU_START = 0x120000,
+ GALTIC_SKU_END = 0x12ffff,
+ GALITH_SKU_START = 0x130000,
+ GALITH_SKU_END = 0x13ffff,
+ GALLOP_SKU_START = 0x150000,
+ GALLOP_SKU_END = 0x15ffff,
+ GALTIC360_SKU_START = 0x260000,
+ GALTIC360_SKU_END = 0x26ffff,
+ GALITH360_SKU_START = 0x270000,
+ GALITH360_SKU_END = 0x27ffff,
+};
const char *get_wifi_sar_cbfs_filename(void)
{
- return "wifi_sar-galtic.hex";
+ uint32_t sku_id = google_chromeec_get_board_sku();
+
+ if (sku_id >= GALTIC_SKU_START && sku_id <= GALTIC_SKU_END)
+ return "wifi_sar-galtic.hex";
+ if (sku_id >= GALTIC360_SKU_START && sku_id <= GALTIC360_SKU_END)
+ return "wifi_sar-galtic360.hex";
+ if (sku_id >= GALITH360_SKU_START && sku_id <= GALITH360_SKU_END)
+ return "wifi_sar-galith360.hex";
+
+ return WIFI_SAR_CBFS_DEFAULT_FILENAME;
}