From 9fc741d32f23939d389464958b4c4def1cc1cf01 Mon Sep 17 00:00:00 2001 From: Frank Chu Date: Tue, 8 Feb 2022 11:46:06 +0800 Subject: mb/google/dedede/var/pirika: Add Wifi SAR for pasara Add wifi sar for pasara BUG=b:216411442 TEST=enable CHROMEOS_WIFI_SAR in config of coreboot, emerge-dedede coreboot-private-files-baseboard-dedede coreboot chromeos-bootimage. Signed-off-by: Frank Chu Change-Id: Ida475307c8448c5c2758c289da7708484bcb89e3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/61705 Tested-by: build bot (Jenkins) Reviewed-by: Shou-Chieh Hsu Reviewed-by: Karthik Ramasubramanian --- .../google/dedede/variants/pirika/Makefile.inc | 2 ++ .../google/dedede/variants/pirika/variant.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/mainboard/google/dedede/variants/pirika/variant.c (limited to 'src/mainboard/google/dedede/variants') diff --git a/src/mainboard/google/dedede/variants/pirika/Makefile.inc b/src/mainboard/google/dedede/variants/pirika/Makefile.inc index eb2c9bc021..e54466b72a 100644 --- a/src/mainboard/google/dedede/variants/pirika/Makefile.inc +++ b/src/mainboard/google/dedede/variants/pirika/Makefile.inc @@ -1,3 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-or-later +ramstage-y += variant.c + ramstage-y += gpio.c diff --git a/src/mainboard/google/dedede/variants/pirika/variant.c b/src/mainboard/google/dedede/variants/pirika/variant.c new file mode 100644 index 0000000000..66a050f9a0 --- /dev/null +++ b/src/mainboard/google/dedede/variants/pirika/variant.c @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +enum { + PIRETTE_SKU_START = 0x1D0000, + PIRETTE_SKU_END = 0x1Dffff, + PIRIKA_SKU_START = 0x1E0000, + PIRIKA_SKU_END = 0x1Effff, + PASARA_SKU_START = 0x2A0000, + PASARA_SKU_END = 0x2Affff, +}; +const char *get_wifi_sar_cbfs_filename(void) +{ + uint32_t sku_id = google_chromeec_get_board_sku(); + + if (sku_id >= PASARA_SKU_START && sku_id <= PASARA_SKU_END) + return "wifi_sar-pasara.hex"; + + return WIFI_SAR_CBFS_DEFAULT_FILENAME; +} -- cgit v1.2.3