mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
hammer: Add staff board
hammer corresponds to poppy, and staff corresponds to soraka.
Current differences (hammer/staff):
- USB id (5022/502b)
- PWM frequency (10kHz/100Hz):
- On staff, driving PWM at 10kHz leads to an actual duty cycle
around 30-40%, with a PWM output at 1% (long rise/fall time).
100Hz looks better, we get ~1.45% duty with 1% PWM output.
BRANCH=none
BUG=b:38277869
TEST=Flash staff, boots fine.
TEST=pwm 0 1 shows quite dim backlight on staff.
Change-Id: I66ba2adf89fbee8578ee473afb28e3e242b4d111
Reviewed-on: https://chromium-review.googlesource.com/505855
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
dee69a236f
commit
cb9bd66ec6
@@ -54,9 +54,15 @@ const struct i2c_port_t i2c_ports[] = {
|
||||
};
|
||||
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
|
||||
|
||||
#ifdef BOARD_STAFF
|
||||
#define KBLIGHT_PWM_FREQ 100 /* Hz */
|
||||
#else
|
||||
#define KBLIGHT_PWM_FREQ 10000 /* Hz */
|
||||
#endif
|
||||
|
||||
/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */
|
||||
const struct pwm_t pwm_channels[] = {
|
||||
{STM32_TIM(TIM_KBLIGHT), STM32_TIM_CH(1), 0, 10000 /* Hz */ },
|
||||
{STM32_TIM(TIM_KBLIGHT), STM32_TIM_CH(1), 0, KBLIGHT_PWM_FREQ},
|
||||
};
|
||||
BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
|
||||
|
||||
|
||||
@@ -77,7 +77,13 @@
|
||||
|
||||
/* USB Configuration */
|
||||
#define CONFIG_USB
|
||||
#ifdef BOARD_STAFF
|
||||
#define CONFIG_USB_PID 0x502b
|
||||
#elif defined(BOARD_HAMMER)
|
||||
#define CONFIG_USB_PID 0x5022
|
||||
#else
|
||||
#error "Invalid board"
|
||||
#endif
|
||||
#define CONFIG_STREAM_USB
|
||||
#define CONFIG_USB_UPDATE
|
||||
|
||||
|
||||
1
board/staff
Symbolic link
1
board/staff
Symbolic link
@@ -0,0 +1 @@
|
||||
hammer
|
||||
@@ -74,6 +74,7 @@ BOARDS_STM32=(
|
||||
ryu
|
||||
samus_pd
|
||||
snoball
|
||||
staff
|
||||
strago_pd
|
||||
zinger
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user