diff options
author | Vic Yang <victoryang@chromium.org> | 2014-10-17 00:12:10 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-21 00:44:07 +0000 |
commit | 46f033171171f93bbb6021f1e8c1b6b2adf925cf (patch) | |
tree | a9d0b9381199a893901642f671c160ad6091df7d /board/zinger | |
parent | 0e3497762c71e6c4cd7fe6b7f71beb15ff654f6f (diff) | |
download | chrome-ec-46f033171171f93bbb6021f1e8c1b6b2adf925cf.tar.gz |
pd: allow selection of Tx timer channel
So far, we always use channel 1 of the Tx timer and the configuration
code is hard coded. We need to support other channels for new Ryu
boards. Let's make this a configurable bit.
BRANCH=samus
BUG=chrome-os-partner:32660
TEST=make buildall
TEST=Plug in Zinger to Ryu and see 20V come up.
Change-Id: Id08d4eb0d6a5721d8a03672484d0892a0714383b
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223836
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/zinger')
-rw-r--r-- | board/zinger/usb_pd_config.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/board/zinger/usb_pd_config.h b/board/zinger/usb_pd_config.h index 882936a9a5..c22e68858d 100644 --- a/board/zinger/usb_pd_config.h +++ b/board/zinger/usb_pd_config.h @@ -24,6 +24,7 @@ /* Timer channel */ #define TIM_RX_CCR_C0 1 +#define TIM_TX_CCR_C0 1 /* RX timer capture/compare register */ #define TIM_CCR_C0 (&STM32_TIM_CCRx(TIM_CLOCK_PD_RX_C0, TIM_RX_CCR_C0)) @@ -49,7 +50,8 @@ static inline void spi_enable_clock(int port) #define DMAC_SPI_TX(p) STM32_DMAC_CH3 /* RX is on TIM3 CH1 connected to TIM3 CH2 pin (PA7, not internal COMP) */ -#define TIM_CCR_IDX(p) TIM_RX_CCR_C0 +#define TIM_TX_CCR_IDX(p) TIM_TX_CCR_C0 +#define TIM_RX_CCR_IDX(p) TIM_RX_CCR_C0 /* connect TIM3 CH1 to TIM3_CH2 input */ #define TIM_CCR_CS 2 #define EXTI_COMP_MASK(p) (1 << 7) |