diff options
author | Ben Chen <ben.chen2@quanta.corp-partner.google.com> | 2020-07-10 15:22:40 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-14 05:53:50 +0000 |
commit | 3c07efdf6d9242c345148c601a6ade576aa24247 (patch) | |
tree | a0ace9017cf9f5bb6bf0137bbbd2d89817334355 /board/voxel/board.c | |
parent | e355dbfd7885ddda7c8aac613549006f2e03133a (diff) | |
download | chrome-ec-3c07efdf6d9242c345148c601a6ade576aa24247.tar.gz |
voxel: Reconfig LED GPIO, and update Led behavior
Config GPIOC3, GPIOC4 to GPIO control.
Supports the LED control Behavior as below
Charge: Amber on (S0/S3/S5)
Full: Blue on (S0/S3/S5)
Discharge in s0: Blue on
Discharge in s3: Amber on 1 sec off 3 sec
Discharge in s5: off
Error: Amber on 1 sec off 1 sec
Factory mode: Blue on 2 sec Amber on 2 sec
BUG=b:155062762, b:160944822
BRANCH=none
TEST=make buildall PASS
Change-Id: I8e36c0a4c82a1cedd9c923d57eb0eb2cb5c6f9da
Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2291456
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/voxel/board.c')
-rw-r--r-- | board/voxel/board.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/board/voxel/board.c b/board/voxel/board.c index 5178288889..7ae244570c 100644 --- a/board/voxel/board.c +++ b/board/voxel/board.c @@ -46,14 +46,6 @@ union volteer_cbi_fw_config fw_config_defaults = { .usb_db = DB_USB4_GEN3, }; -static void board_init(void) -{ - /* Illuminate motherboard and daughter board LEDs equally to start. */ - pwm_enable(PWM_CH_LED4_SIDESEL, 1); - pwm_set_duty(PWM_CH_LED4_SIDESEL, 50); -} -DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); - __override enum tbt_compat_cable_speed board_get_max_tbt_speed(int port) { /* Routing length exceeds 205mm prior to connection to re-timer */ @@ -179,29 +171,6 @@ const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); /******************************************************************************/ /* PWM configuration */ const struct pwm_t pwm_channels[] = { - [PWM_CH_LED1_BLUE] = { - .channel = 2, - .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - .freq = 2400, - }, - [PWM_CH_LED2_GREEN] = { - .channel = 0, - .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - .freq = 2400, - }, - [PWM_CH_LED3_RED] = { - .channel = 1, - .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - .freq = 2400, - }, - [PWM_CH_LED4_SIDESEL] = { - .channel = 7, - .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - /* Run at a higher frequency than the color PWM signals to avoid - * timing-based color shifts. - */ - .freq = 4800, - }, [PWM_CH_FAN] = { .channel = 5, .flags = PWM_CONFIG_OPEN_DRAIN, |