diff options
author | Eric Herrmann <eherrmann@chromium.org> | 2020-06-26 16:36:12 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-27 03:13:02 +0000 |
commit | 8eb739880dd87ea45dac59e188f78764d74c0d41 (patch) | |
tree | 1a9eb01725a4d5b33916d42dc5fa95e24645d868 | |
parent | 5e113d87b98182ad76205f69e26baa61d8aa6b20 (diff) | |
download | chrome-ec-8eb739880dd87ea45dac59e188f78764d74c0d41.tar.gz |
Volteer: Configure LED side select PWM frequency
On volteer, there are 4 PWMs for the charging LEDs, 1 for each color
channel and 1 for the side selection.
The side selection PWM frequency needs to be 1/2 of the frequency of
color channel PWMs. This is so that each side sees every other pulse
from the color channels.
Currently it is 2X, this shows up as the C1 port flashing red and the C0
port flashing amber when the battery is almost empty and not charging.
BUG=b:139554899
TEST=With the battery near 0 and no charger connected, check that
both charging ports have the same color.
BRANCH=none
Signed-off-by: Eric Herrmann <eherrmann@chromium.org>
Change-Id: Idf46c05c66239b02d2d71585ca950e4899d3003d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2271140
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | board/volteer/board.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/board/volteer/board.c b/board/volteer/board.c index e2d0d9cd5e..6eb1ae988f 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -198,25 +198,27 @@ const struct pwm_t pwm_channels[] = { [PWM_CH_LED1_BLUE] = { .channel = 2, .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - .freq = 2400, + .freq = 4800, }, [PWM_CH_LED2_GREEN] = { .channel = 0, .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - .freq = 2400, + .freq = 4800, }, [PWM_CH_LED3_RED] = { .channel = 1, .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - .freq = 2400, + .freq = 4800, }, [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. + /* + * If using the side select to run both LEDs at the same time, + * the frequency should be 1/2 of the color channel PWM + * frequency to drive each LED equally. */ - .freq = 4800, + .freq = 2400, }, [PWM_CH_FAN] = { .channel = 5, |