summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorWisley Chen <wisley.chen@quantatw.com>2019-10-05 13:06:16 +0800
committerShelley Chen <shchen@google.com>2019-10-15 15:59:48 +0000
commit1425441ce4d32a02e433cab3771f0f9375e314ae (patch)
tree1910a09501b2bd328dd02a10411a467090993c1a /src/mainboard
parentd1eb34e432a1892510f75eea7f660e3e94febd22 (diff)
downloadcoreboot-1425441ce4d32a02e433cab3771f0f9375e314ae.tar.xz
mb/google/hatch: set wifi sar for dragonair
Enable wifi sar feature and set wifi sar name for dragonair sku. BUG=b:142109545 TEST=emerge-hatch coreboot chromeos-bootimage 1. Check wifi_sar-dragonair.hex in /cbfs-rw-raw/dratini 2. Add iwlwifi.debug into kernel params. 3. check SAR value from dmesg only when sku id is 21/22 Change-Id: I0e08610b7c7d2d8da5a749d278bcde26af590e31 Signed-off-by: Wisley Chen <wisley.chen@quantatw.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35807 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/hatch/variants/dratini/Makefile.inc1
-rw-r--r--src/mainboard/google/hatch/variants/dratini/include/variant/sku.h24
-rw-r--r--src/mainboard/google/hatch/variants/dratini/variant.c32
3 files changed, 57 insertions, 0 deletions
diff --git a/src/mainboard/google/hatch/variants/dratini/Makefile.inc b/src/mainboard/google/hatch/variants/dratini/Makefile.inc
index d82d7979e5..8b7e3d1014 100644
--- a/src/mainboard/google/hatch/variants/dratini/Makefile.inc
+++ b/src/mainboard/google/hatch/variants/dratini/Makefile.inc
@@ -23,3 +23,4 @@ SPD_SOURCES += 16G_3200 # 0b111
bootblock-y += gpio.c
ramstage-y += gpio.c
+ramstage-y += variant.c
diff --git a/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h b/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h
new file mode 100644
index 0000000000..8ff2c79959
--- /dev/null
+++ b/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __MAINBOARD_SKU_H__
+#define __MAINBOARD_SKU_H__
+
+enum {
+ SKU_21_DRAGONAIR = 21, /* TS + FPS + Stylus */
+ SKU_22_DRAGONAIR = 22, /* TS + KB_BL + FPS + Stylus */
+};
+
+#endif /* __MAINBOARD_SKU_H__ */
diff --git a/src/mainboard/google/hatch/variants/dratini/variant.c b/src/mainboard/google/hatch/variants/dratini/variant.c
new file mode 100644
index 0000000000..da5db7f658
--- /dev/null
+++ b/src/mainboard/google/hatch/variants/dratini/variant.c
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <baseboard/variants.h>
+#include <variant/sku.h>
+#include <sar.h>
+
+const char *get_wifi_sar_cbfs_filename(void)
+{
+ const char *filename = NULL;
+ uint32_t sku_id = get_board_sku();
+
+ switch (sku_id) {
+ case SKU_21_DRAGONAIR:
+ case SKU_22_DRAGONAIR:
+ filename = "wifi_sar-dragonair.hex";
+ break;
+ }
+ return filename;
+}