diff options
author | Tommy Chung <tommy.chung@quanta.corp-partner.google.com> | 2022-01-24 19:36:35 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-29 07:02:34 +0000 |
commit | cffba6a3d33a7f0df60ed95e2bb48c016b7e9f5c (patch) | |
tree | bb4664552d7d783ec1ed6ddd4fd9f442611defc4 /baseboard/cherry | |
parent | 635978cff9e7536a508a606a240b75f3e492da95 (diff) | |
download | chrome-ec-cffba6a3d33a7f0df60ed95e2bb48c016b7e9f5c.tar.gz |
cherry: Move PWM config to board level
BUG=none
BRANCH=cherry
TEST=make BOARD=cherry, dojo, tomato
Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Change-Id: I74918f310c472848320b93a3dac6f89860bd14af
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3411515
Reviewed-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'baseboard/cherry')
-rw-r--r-- | baseboard/cherry/baseboard.c | 38 | ||||
-rw-r--r-- | baseboard/cherry/baseboard.h | 8 |
2 files changed, 0 insertions, 46 deletions
diff --git a/baseboard/cherry/baseboard.c b/baseboard/cherry/baseboard.c index b93df83975..4e6b2e324d 100644 --- a/baseboard/cherry/baseboard.c +++ b/baseboard/cherry/baseboard.c @@ -33,8 +33,6 @@ #include "lid_switch.h" #include "power_button.h" #include "power.h" -#include "pwm_chip.h" -#include "pwm.h" #include "regulator.h" #include "spi.h" #include "switch.h" @@ -190,42 +188,6 @@ static void ppc_interrupt(enum gpio_signal signal) syv682x_interrupt(0); } -/* PWM */ - -/* - * PWM channels. Must be in the exactly same order as in enum pwm_channel. - * There total three 16 bits clock prescaler registers for all pwm channels, - * so use the same frequency and prescaler register setting is required if - * number of pwm channel greater than three. - */ -const struct pwm_t pwm_channels[] = { - [PWM_CH_LED1] = { - .channel = 0, - .flags = PWM_CONFIG_DSLEEP | PWM_CONFIG_ACTIVE_LOW, - .freq_hz = 324, /* maximum supported frequency */ - .pcfsr_sel = PWM_PRESCALER_C4, - }, - [PWM_CH_LED2] = { - .channel = 1, - .flags = PWM_CONFIG_DSLEEP | PWM_CONFIG_ACTIVE_LOW, - .freq_hz = 324, /* maximum supported frequency */ - .pcfsr_sel = PWM_PRESCALER_C4, - }, - [PWM_CH_LED3] = { - .channel = 2, - .flags = PWM_CONFIG_DSLEEP | PWM_CONFIG_ACTIVE_LOW, - .freq_hz = 324, /* maximum supported frequency */ - .pcfsr_sel = PWM_PRESCALER_C4, - }, - [PWM_CH_KBLIGHT] = { - .channel = 3, - .flags = PWM_CONFIG_DSLEEP, - .freq_hz = 10000, /* SYV226 supports 10~100kHz */ - .pcfsr_sel = PWM_PRESCALER_C6, - }, -}; -BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); - /* Called on AP S3 -> S0 transition */ static void board_chipset_resume(void) { diff --git a/baseboard/cherry/baseboard.h b/baseboard/cherry/baseboard.h index 58988fcc60..d3a543421a 100644 --- a/baseboard/cherry/baseboard.h +++ b/baseboard/cherry/baseboard.h @@ -235,14 +235,6 @@ enum temp_sensor_id { TEMP_SENSOR_COUNT, }; -enum pwm_channel { - PWM_CH_LED1, - PWM_CH_LED2, - PWM_CH_LED3, - PWM_CH_KBLIGHT, - PWM_CH_COUNT, -}; - void board_reset_pd_mcu(void); void rt1718s_tcpc_interrupt(enum gpio_signal signal); |