summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-An Chen <yu-an.chen@quanta.corp-partner.google.com>2021-11-17 14:27:12 +0800
committerCommit Bot <commit-bot@chromium.org>2021-11-18 23:39:02 +0000
commit54f15eaa4a2e8b849318921794445e174d155080 (patch)
treecacb24be87df595e9c6161c491b0b4255ed06912
parent904255ef8d8c694fd21addc39ab3648178e5b354 (diff)
downloadchrome-ec-54f15eaa4a2e8b849318921794445e174d155080.tar.gz
kano: Update FW_CONFIG field
This patch update the FW_CONFIG field for Kano Remove daughter board configuration BUG=b:199714882 BRANCH=main TEST=make BOARD=kano Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: Ifcc3e5c501388b53f3f3e4c48a1b5ef38d14b6bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3288847 Tested-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Auto-Submit: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
-rw-r--r--board/kano/board.h7
-rw-r--r--board/kano/fw_config.c21
-rw-r--r--board/kano/fw_config.h33
-rw-r--r--board/kano/tune_mp2964.c2
-rw-r--r--board/kano/usbc_config.h2
5 files changed, 24 insertions, 41 deletions
diff --git a/board/kano/board.h b/board/kano/board.h
index 6b65edf174..c72249c0f3 100644
--- a/board/kano/board.h
+++ b/board/kano/board.h
@@ -3,18 +3,13 @@
* found in the LICENSE file.
*/
-/* Brya board configuration */
+/* Kano board configuration */
#ifndef __CROS_EC_BOARD_H
#define __CROS_EC_BOARD_H
#include "compile_time_macros.h"
-/*
- * Early brya boards are not set up for vivaldi
- */
-#undef CONFIG_KEYBOARD_VIVALDI
-
/* Baseboard features */
#include "baseboard.h"
diff --git a/board/kano/fw_config.c b/board/kano/fw_config.c
index fb8acb635d..a13dadeb5d 100644
--- a/board/kano/fw_config.c
+++ b/board/kano/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 kano_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 kano 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 kano_cbi_fw_config fw_config_defaults = {
.kb_bl = KEYBOARD_BACKLIGHT_ENABLED,
};
/****************************************************************************
- * Brya FW_CONFIG access
+ * Kano FW_CONFIG access
*/
void board_init_fw_config(void)
{
@@ -36,25 +35,21 @@ 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 kano_cbi_fw_config get_fw_config(void)
{
return fw_config;
}
-enum ec_cfg_usb_db_type ec_cfg_usb_db_type(void)
+bool ec_cfg_has_kblight(void)
{
- return fw_config.usb_db;
+ return (fw_config.kb_bl == KEYBOARD_BACKLIGHT_ENABLED);
}
diff --git a/board/kano/fw_config.h b/board/kano/fw_config.h
index 6e4eb3ef58..8402b5568d 100644
--- a/board/kano/fw_config.h
+++ b/board/kano/fw_config.h
@@ -3,36 +3,28 @@
* found in the LICENSE file.
*/
-#ifndef __BOARD_BRYA_FW_CONFIG_H_
-#define __BOARD_BRYA_FW_CONFIG_H_
+#ifndef __BOARD_KANO_FW_CONFIG_H_
+#define __BOARD_KANO_FW_CONFIG_H_
#include <stdint.h>
/****************************************************************************
- * CBI FW_CONFIG layout for Brya board.
+ * CBI FW_CONFIG layout for Kano board.
*
- * Source of truth is the project/brya/brya/config.star configuration file.
+ * Source of truth is the project/brya/kano/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 kano_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 ufc : 2;
+ uint32_t reserved_1 : 26;
};
uint32_t raw_value;
};
@@ -42,13 +34,14 @@ union brya_cbi_fw_config {
*
* @return the FW_CONFIG for the board.
*/
-union brya_cbi_fw_config get_fw_config(void);
+union kano_cbi_fw_config get_fw_config(void);
/**
- * Get the USB daughter board type from FW_CONFIG.
+ * Check if the FW_CONFIG has enabled keyboard backlight.
*
- * @return the USB daughter board type.
+ * @return true if board supports keyboard backlight, false if the board
+ * doesn't support it.
*/
-enum ec_cfg_usb_db_type ec_cfg_usb_db_type(void);
+bool ec_cfg_has_kblight(void);
-#endif /* __BOARD_BRYA_FW_CONFIG_H_ */
+#endif /* __BOARD_KANO_FW_CONFIG_H_ */
diff --git a/board/kano/tune_mp2964.c b/board/kano/tune_mp2964.c
index 198f06d8eb..3e1c3c8d0b 100644
--- a/board/kano/tune_mp2964.c
+++ b/board/kano/tune_mp2964.c
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Tune the MP2964 IMVP9.1 parameters for brya */
+/* Tune the MP2964 IMVP9.1 parameters for kano */
#include "common.h"
#include "compile_time_macros.h"
diff --git a/board/kano/usbc_config.h b/board/kano/usbc_config.h
index 87e601ee3e..38fce7d2cf 100644
--- a/board/kano/usbc_config.h
+++ b/board/kano/usbc_config.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Brya board-specific USB-C configuration */
+/* Kano board-specific USB-C configuration */
#ifndef __CROS_EC_USBC_CONFIG_H
#define __CROS_EC_USBC_CONFIG_H