summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2023-05-15 14:50:41 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-16 09:52:12 +0000
commit63912887ea09683d096023da58f996f53926eb78 (patch)
tree576ca6497a67504567b7397166432e09b8de4b6e
parentc1f50b036ae55fb0aa7e070f3e731e066eb09cf8 (diff)
downloadchrome-ec-63912887ea09683d096023da58f996f53926eb78.tar.gz
vell: Sync up FW_CONFIG with config.star
BUG=b:282189358 TEST=make BOARD=vell Change-Id: I7a37cf41e22982f354f74f0fe9dbe27673fb29f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4530325 Commit-Queue: Boris Mittelberg <bmbm@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com> Tested-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: caveh jalali <caveh@chromium.org>
-rw-r--r--board/vell/fw_config.c36
-rw-r--r--board/vell/fw_config.h47
2 files changed, 14 insertions, 69 deletions
diff --git a/board/vell/fw_config.c b/board/vell/fw_config.c
index bf5e29fe05..137c5c9f9a 100644
--- a/board/vell/fw_config.c
+++ b/board/vell/fw_config.c
@@ -12,20 +12,17 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args)
-static union brya_cbi_fw_config fw_config;
+static union vell_cbi_fw_config fw_config;
BUILD_ASSERT(sizeof(fw_config) == sizeof(uint32_t));
/*
- * FW_CONFIG defaults for brya if the CBI.FW_CONFIG data is not
+ * FW_CONFIG defaults for vell if the CBI.FW_CONFIG data is not
* initialized.
*/
-static const union brya_cbi_fw_config fw_config_defaults = {
- .usb_db = DB_USB3_PS8815,
- .kb_bl = KEYBOARD_BACKLIGHT_ENABLED,
-};
+static const union vell_cbi_fw_config fw_config_defaults = {};
/****************************************************************************
- * Brya FW_CONFIG access
+ * Vell FW_CONFIG access
*/
void board_init_fw_config(void)
{
@@ -33,29 +30,4 @@ void board_init_fw_config(void)
CPRINTS("CBI: Read FW_CONFIG failed, using board defaults");
fw_config = fw_config_defaults;
}
-
- if (get_board_id() == 0) {
- /*
- * Early boards have a zero'd out FW_CONFIG, so replace
- * it with a sensible default value. If DB_USB_ABSENT2
- * was used as an alternate encoding of DB_USB_ABSENT to
- * avoid the zero check, then fix it.
- */
- if (fw_config.raw_value == 0) {
- CPRINTS("CBI: FW_CONFIG is zero, using board defaults");
- fw_config = fw_config_defaults;
- } else if (fw_config.usb_db == DB_USB_ABSENT2) {
- fw_config.usb_db = DB_USB_ABSENT;
- }
- }
-}
-
-union brya_cbi_fw_config get_fw_config(void)
-{
- return fw_config;
-}
-
-enum ec_cfg_usb_db_type ec_cfg_usb_db_type(void)
-{
- return fw_config.usb_db;
}
diff --git a/board/vell/fw_config.h b/board/vell/fw_config.h
index fea6c9a8da..324057a8e9 100644
--- a/board/vell/fw_config.h
+++ b/board/vell/fw_config.h
@@ -3,52 +3,25 @@
* found in the LICENSE file.
*/
-#ifndef __BOARD_BRYA_FW_CONFIG_H_
-#define __BOARD_BRYA_FW_CONFIG_H_
+#ifndef __BOARD_VELL_FW_CONFIG_H_
+#define __BOARD_VELL_FW_CONFIG_H_
#include <stdint.h>
/****************************************************************************
- * CBI FW_CONFIG layout for Brya board.
+ * CBI FW_CONFIG layout for Vell board.
*
- * Source of truth is the project/brya/brya/config.star configuration file.
+ * Source of truth is the project/brya/vell/config.star configuration file.
*/
-
-enum ec_cfg_usb_db_type {
- DB_USB_ABSENT = 0,
- DB_USB3_PS8815 = 1,
- DB_USB_ABSENT2 = 15
-};
-
-enum ec_cfg_keyboard_backlight_type {
- KEYBOARD_BACKLIGHT_DISABLED = 0,
- KEYBOARD_BACKLIGHT_ENABLED = 1
-};
-
-union brya_cbi_fw_config {
+union vell_cbi_fw_config {
struct {
- enum ec_cfg_usb_db_type usb_db : 4;
- uint32_t sd_db : 2;
uint32_t lte_db : 1;
- enum ec_cfg_keyboard_backlight_type kb_bl : 1;
- uint32_t audio : 3;
- uint32_t reserved_1 : 21;
+ uint32_t kb_color : 1;
+ uint32_t storage_nand : 1;
+ uint32_t wifi_sar_id : 2;
+ uint32_t reserved_1 : 27;
};
uint32_t raw_value;
};
-/**
- * Read the cached FW_CONFIG. Guaranteed to have valid values.
- *
- * @return the FW_CONFIG for the board.
- */
-union brya_cbi_fw_config get_fw_config(void);
-
-/**
- * Get the USB daughter board type from FW_CONFIG.
- *
- * @return the USB daughter board type.
- */
-enum ec_cfg_usb_db_type ec_cfg_usb_db_type(void);
-
-#endif /* __BOARD_BRYA_FW_CONFIG_H_ */
+#endif /* __BOARD_VELL_FW_CONFIG_H_ */