summaryrefslogtreecommitdiff
path: root/board/redrix
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2021-07-21 19:03:55 +0800
committerCommit Bot <commit-bot@chromium.org>2021-08-03 01:56:25 +0000
commitd2ad9255ce615d9e752b38fb5b2a6f3fe7120162 (patch)
treed6564aba5c42688e30091713b78e348fafe2ef65 /board/redrix
parenta2ea2294ddc2d121c6cd611baadb5b42ff3aed80 (diff)
downloadchrome-ec-d2ad9255ce615d9e752b38fb5b2a6f3fe7120162.tar.gz
Redrix: Update FW_CONFIG field
This patch update the FW_CONFIG field for Redix. Remove daughter board configuration. BUG=none BRANCH=none TEST=make BOARD=redrix Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I3e02afc2f2508886e41bb954c0b15657b80033f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3043760 Reviewed-by: Boris Mittelberg <bmbm@google.com>
Diffstat (limited to 'board/redrix')
-rw-r--r--board/redrix/fw_config.c22
-rw-r--r--board/redrix/fw_config.h26
2 files changed, 13 insertions, 35 deletions
diff --git a/board/redrix/fw_config.c b/board/redrix/fw_config.c
index fb8acb635d..aaeba7d3a8 100644
--- a/board/redrix/fw_config.c
+++ b/board/redrix/fw_config.c
@@ -11,20 +11,19 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
-static union brya_cbi_fw_config fw_config;
+static union redrix_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 redrix if the CBI.FW_CONFIG data is not
* initialized.
*/
-static const union brya_cbi_fw_config fw_config_defaults = {
- .usb_db = DB_USB3_PS8815,
+static const union redrix_cbi_fw_config fw_config_defaults = {
.kb_bl = KEYBOARD_BACKLIGHT_ENABLED,
};
/****************************************************************************
- * Brya FW_CONFIG access
+ * Redrix FW_CONFIG access
*/
void board_init_fw_config(void)
{
@@ -36,25 +35,16 @@ void board_init_fw_config(void)
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.
+ * it with a sensible default value.
*/
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)
+union redrix_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/redrix/fw_config.h b/board/redrix/fw_config.h
index 6e4eb3ef58..1abfdedaf3 100644
--- a/board/redrix/fw_config.h
+++ b/board/redrix/fw_config.h
@@ -9,29 +9,24 @@
#include <stdint.h>
/****************************************************************************
- * CBI FW_CONFIG layout for Brya board.
+ * CBI FW_CONFIG layout for Redrix board.
*
- * Source of truth is the project/brya/brya/config.star configuration file.
+ * Source of truth is the project/brya/redrix/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 redrix_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 lte_db : 2;
+ uint32_t ufc : 2;
+ uint32_t eps : 1;
uint32_t reserved_1 : 21;
};
uint32_t raw_value;
@@ -42,13 +37,6 @@ union brya_cbi_fw_config {
*
* @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);
+union redrix_cbi_fw_config get_fw_config(void);
#endif /* __BOARD_BRYA_FW_CONFIG_H_ */