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>
This commit is contained in:
FrankChu 2021-10-29 11:59:26 +08:00 committed by Felix Held
parent 5554226426
commit fb05b820eb
1 changed files with 23 additions and 1 deletions

View File

@ -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;
}