summaryrefslogtreecommitdiff
path: root/board/brask/board.h
diff options
context:
space:
mode:
authorZhuohao Lee <zhuohao@chromium.org>2021-08-24 17:24:25 +0800
committerCommit Bot <commit-bot@chromium.org>2021-08-25 06:11:06 +0000
commit418cc5cbb9bede43fbe8213a518b9faf3c2b9dc0 (patch)
tree785231d7f894504530fa09317608e72dab5d51cc /board/brask/board.h
parentdbcffbcfac595c694744bd888c4d5e5d9f269a68 (diff)
downloadchrome-ec-418cc5cbb9bede43fbe8213a518b9faf3c2b9dc0.tar.gz
brask: remove unnecessary configuration
This patch removes the configuration for the battery, charger, fan control, board id, keyboard, keyboard backlight, sensor, hibernate and led. In order to make the build pass, the CONFIG_ADC, CONFIG_POWER_BUTTON_IGNORE_LID and CONFIG_POWER_BUTTON_INIT_IDLE are added to the board.h/baseboard.h. In additional, the function board_set_active_charge_port() and board_set_charge_limit() are added to the board.c to avoid build error. BUG=b:191637086 BRANCH=None TEST=make BOARD=brask Change-Id: I15c01820dbd2f58f5722c87de51ebf425ffca13a Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114497 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'board/brask/board.h')
-rw-r--r--board/brask/board.h109
1 files changed, 8 insertions, 101 deletions
diff --git a/board/brask/board.h b/board/brask/board.h
index d7ca163bad..50d86eeadd 100644
--- a/board/brask/board.h
+++ b/board/brask/board.h
@@ -1,81 +1,20 @@
-/* Copyright 2020 The Chromium OS Authors. All rights reserved.
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-/* Brya board configuration */
+/* Brask 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"
-/*
- * This will happen automatically on NPCX9 ES2 and later. Do not remove
- * until we can confirm all earlier chips are out of service.
- */
-#define CONFIG_HIBERNATE_PSL_VCC1_RST_WAKEUP
-
#define CONFIG_MP2964
-/* LED */
-#define CONFIG_LED_PWM
-#define CONFIG_LED_PWM_COUNT 2
-#undef CONFIG_LED_PWM_NEAR_FULL_COLOR
-#undef CONFIG_LED_PWM_SOC_ON_COLOR
-#undef CONFIG_LED_PWM_SOC_SUSPEND_COLOR
-#undef CONFIG_LED_PWM_LOW_BATT_COLOR
-#define CONFIG_LED_PWM_NEAR_FULL_COLOR EC_LED_COLOR_WHITE
-#define CONFIG_LED_PWM_SOC_ON_COLOR EC_LED_COLOR_WHITE
-#define CONFIG_LED_PWM_SOC_SUSPEND_COLOR EC_LED_COLOR_WHITE
-#define CONFIG_LED_PWM_LOW_BATT_COLOR EC_LED_COLOR_AMBER
-
-/* Sensors */
-#define CONFIG_ACCELGYRO_LSM6DSO /* Base accel */
-#define CONFIG_ACCEL_LSM6DSO_INT_EVENT \
- TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL)
-
-/* TCS3400 ALS */
-#define CONFIG_ALS
-#define ALS_COUNT 1
-#define CONFIG_ALS_TCS3400
-#define CONFIG_ALS_TCS3400_INT_EVENT \
- TASK_EVENT_MOTION_SENSOR_INTERRUPT(CLEAR_ALS)
-
-/* Enable sensor fifo, must also define the _SIZE and _THRES */
-#define CONFIG_ACCEL_FIFO
-/* FIFO size is in power of 2. */
-#define CONFIG_ACCEL_FIFO_SIZE 256
-/* Depends on how fast the AP boots and typical ODRs */
-#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO_SIZE / 3)
-
-/* Sensors without hardware FIFO are in forced mode */
-#define CONFIG_ACCEL_FORCE_MODE_MASK \
- (BIT(LID_ACCEL) | BIT(CLEAR_ALS))
-
-/* Lid accel */
-#define CONFIG_LID_ANGLE
-#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL
-#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL
-#define CONFIG_ACCEL_LIS2DWL
-#define CONFIG_ACCEL_LIS2DW_AS_BASE
-#define CONFIG_ACCEL_LIS2DW12_INT_EVENT \
- TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL)
-
-#define CONFIG_ACCEL_INTERRUPTS
-
-/* Sensor console commands */
-#define CONFIG_CMD_ACCELS
-#define CONFIG_CMD_ACCEL_INFO
-
/* USB Type A Features */
#define USB_PORT_COUNT 1
#define CONFIG_USB_PORT_POWER_DUMB
@@ -115,16 +54,13 @@
#define GPIO_AC_PRESENT GPIO_ACOK_OD
#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL
#define GPIO_EC_INT_L GPIO_EC_PCH_INT_ODL
-#define GPIO_ENABLE_BACKLIGHT GPIO_EC_EN_EDP_BL
#define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW
-#define GPIO_KBD_KSO2 GPIO_EC_KSO_02_INV
#define GPIO_PACKET_MODE_EN GPIO_EC_GSC_PACKET_MODE
#define GPIO_PCH_PWRBTN_L GPIO_EC_PCH_PWR_BTN_ODL
#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L
#define GPIO_PCH_RTCRST GPIO_EC_PCH_RTCRST
#define GPIO_PCH_SLP_S0_L GPIO_SYS_SLP_S0IX_L
#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L
-#define GMR_TABLET_MODE_GPIO_L GPIO_TABLET_MODE_L
/*
* GPIO_EC_PCH_INT_ODL is used for MKBP events as well as a PCH wakeup
@@ -137,15 +73,8 @@
#define GPIO_POWER_BUTTON_L GPIO_GSC_EC_PWR_BTN_ODL
#define GPIO_RSMRST_L_PGOOD GPIO_SEQ_EC_RSMRST_ODL
#define GPIO_SYS_RESET_L GPIO_SYS_RST_ODL
-#define GPIO_VOLUME_DOWN_L GPIO_EC_VOLDN_BTN_ODL
-#define GPIO_VOLUME_UP_L GPIO_EC_VOLUP_BTN_ODL
#define GPIO_WP_L GPIO_EC_WP_ODL
-#define GPIO_ID_1_EC_KB_BL_EN GPIO_EC_BATT_PRES_ODL
-
-/* System has back-lit keyboard */
-#define CONFIG_PWM_KBLIGHT
-
/* I2C Bus Configuration */
#define I2C_PORT_SENSOR NPCX_I2C_PORT0_0
@@ -192,18 +121,15 @@
#define CONFIG_TEMP_SENSOR_POWER_GPIO GPIO_SEQ_EC_DSW_PWROK
#define CONFIG_STEINHART_HART_3V3_30K9_47K_4050B
+/* ADC */
+#define CONFIG_ADC
+
/*
- * TODO(b/181271666): no fan control loop until sensors are tuned
+ * TODO(b/197478860): Enable the fan control. We need
+ * to check the sensor value and adjust the fan speed.
*/
/* #define CONFIG_FANS FAN_CH_COUNT */
-/* Charger defines */
-#define CONFIG_CHARGER_BQ25720
-#define CONFIG_CHARGER_BQ25720_VSYS_TH2_DV 70
-#define CONFIG_CHARGE_RAMP_SW
-#define CONFIG_CHARGER_SENSE_RESISTOR 10
-#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10
-
#ifndef __ASSEMBLER__
#include "gpio_signal.h" /* needed by registers.h */
@@ -215,6 +141,7 @@ enum adc_channel {
ADC_TEMP_SENSOR_2_FAN,
ADC_TEMP_SENSOR_3_CHARGER,
ADC_TEMP_SENSOR_4_WWAN,
+ ADC_VBUS,
ADC_CH_COUNT
};
@@ -224,15 +151,6 @@ enum temp_sensor_id {
TEMP_SENSOR_COUNT
};
-enum sensor_id {
- LID_ACCEL = 0,
- BASE_ACCEL,
- BASE_GYRO,
- CLEAR_ALS,
- RGB_ALS,
- SENSOR_COUNT
-};
-
enum ioex_port {
IOEX_C0_NCT38XX = 0,
IOEX_C2_NCT38XX,
@@ -241,19 +159,8 @@ enum ioex_port {
IOEX_PORT_COUNT
};
-enum battery_type {
- BATTERY_POWER_TECH,
- BATTERY_LGC011,
- BATTERY_TYPE_COUNT
-};
-
enum pwm_channel {
- PWM_CH_LED2 = 0, /* PWM0 (white charger) */
- PWM_CH_LED3, /* PWM1 (orange on DB) */
- PWM_CH_LED1, /* PWM2 (orange charger) */
- PWM_CH_KBLIGHT, /* PWM3 */
PWM_CH_FAN, /* PWM5 */
- PWM_CH_LED4, /* PWM7 (white on DB) */
PWM_CH_COUNT
};