diff options
Diffstat (limited to 'board/waddledoo/board.c')
-rw-r--r-- | board/waddledoo/board.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c index 8df0c93c88..9cc417ce92 100644 --- a/board/waddledoo/board.c +++ b/board/waddledoo/board.c @@ -34,6 +34,8 @@ #include "motion_sense.h" #include "power.h" #include "power_button.h" +#include "pwm.h" +#include "pwm_chip.h" #include "stdbool.h" #include "switch.h" #include "system.h" @@ -519,6 +521,28 @@ const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = { }, }; +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ +const struct pwm_t pwm_channels[] = { + [PWM_CH_KBLIGHT] = { + .channel = 3, + .flags = PWM_CONFIG_DSLEEP, + .freq = 10000, + }, + + [PWM_CH_LED1_AMBER] = { + .channel = 2, + .flags = PWM_CONFIG_DSLEEP | PWM_CONFIG_ACTIVE_LOW, + .freq = 2400, + }, + + [PWM_CH_LED2_WHITE] = { + .channel = 0, + .flags = PWM_CONFIG_DSLEEP | PWM_CONFIG_ACTIVE_LOW, + .freq = 2400, + } +}; +BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); + const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { { .bus_type = EC_BUS_TYPE_I2C, |