summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/zork/variants/vilboz
diff options
context:
space:
mode:
authorFrank Wu <frank_wu@compal.corp-partner.google.com>2021-01-08 17:53:00 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-01-15 11:28:31 +0000
commitf296273692785da1bc88df8d28d955f8d79390e7 (patch)
tree85ed34f7618001a371c463d520c4785f66aa556d /src/mainboard/google/zork/variants/vilboz
parent276e865e7fc4c6c7a7fa30e1786fff373b0ae7a1 (diff)
downloadcoreboot-f296273692785da1bc88df8d28d955f8d79390e7.tar.gz
coreboot-f296273692785da1bc88df8d28d955f8d79390e7.tar.bz2
coreboot-f296273692785da1bc88df8d28d955f8d79390e7.zip
mb/google/zork/var/vilboz: Add WiFi SAR for Vilboz
The fw_config field SPI_SPEED is not used for zork devices. To define SAR config, use the fw_config bit[23..26]. Then vilboz can loaded different WiFi SAR table for different SKUs. BUG=b:176858126, b:176751675, b:176538384 BRANCH=zork TEST=emerge-zork coreboot chromeos-bootimage, then verify that tables are in CBFS and loaded by iwlwifi driver. Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com> Change-Id: I5ba98799e697010997b515ee88420d0ac14ca7ec Reviewed-on: https://review.coreboot.org/c/coreboot/+/49296 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kangheui Won <khwon@chromium.org> Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/mainboard/google/zork/variants/vilboz')
-rw-r--r--src/mainboard/google/zork/variants/vilboz/variant.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/mainboard/google/zork/variants/vilboz/variant.c b/src/mainboard/google/zork/variants/vilboz/variant.c
index fd38e1d1ea7b..3816aac20388 100644
--- a/src/mainboard/google/zork/variants/vilboz/variant.c
+++ b/src/mainboard/google/zork/variants/vilboz/variant.c
@@ -2,6 +2,8 @@
#include <baseboard/variants.h>
#include <soc/pci_devs.h>
+#include <fw_config.h>
+#include <sar.h>
static const fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
{ // DDI0, DP0, eDP
@@ -41,3 +43,50 @@ void variant_devtree_update(void)
if (variant_has_wwan())
soc_cfg->acp_i2s_use_external_48mhz_osc = 1;
}
+
+/*
++----------+------+--------+--------+------+--+---------+--+---------+
+| |Vilboz|Vilboz14|Vilboz14|Vilboz|NA|Vilboz360|NA|Vilboz360|
+| |WiFi |WiFi |LTE |LTE | |WiFi | |LTE |
++----------+------+--------+--------+------+--+---------+--+---------+
+|SAR[26] |0 |0 |0 |0 |0 |0 |0 |0 |
+|SAR[25] |0 |0 |0 |0 |1 |1 |1 |1 |
+|SAR[24] |0 |0 |1 |1 |0 |0 |1 |1 |
+|SAR[23] |0 |1 |0 |1 |0 |1 |0 |1 |
++----------+------+--------+--------+------+--+---------+--+---------+
+|SAR_config|0 |1 |2 |3 |4 |5 |6 |7 |
++----------+------+--------+--------+------+--+---------+--+---------+
+*/
+
+const char *get_wifi_sar_cbfs_filename(void)
+{
+ const char *filename = NULL;
+ int sar_config;
+
+ sar_config = variant_gets_sar_config();
+
+ switch (sar_config) {
+ case 1:
+ filename = "wifi_sar-vilboz-0.hex";
+ break;
+ case 3:
+ /*
+ TODO: Set default first. It will be replaced after the
+ new table is generated.
+ */
+ filename = "wifi_sar_defaults.hex";
+ break;
+ case 5:
+ filename = "wifi_sar-vilboz-1.hex";
+ break;
+ case 7:
+ /*
+ TODO: Set default first. It will be replaced after the
+ new table is generated.
+ */
+ filename = "wifi_sar_defaults.hex";
+ break;
+ }
+
+ return filename;
+}