diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2015-06-15 16:55:08 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-24 00:04:42 +0000 |
commit | 5aadcd90d8ecb79d15dae6d5f0b4567a678e8d8c (patch) | |
tree | 6b3720be9d091a6beecdaf5a254cbe047a94dada /board/pdeval-stm32f072/gpio.inc | |
parent | 43db8410667de672369c794fd9b16e40fcded85c (diff) | |
download | chrome-ec-5aadcd90d8ecb79d15dae6d5f0b4567a678e8d8c.tar.gz |
Add board for USB PD chip evaluation
Base board configuration to evaluate USB PD interface chip by
connecting them a STM32F072 Discovery board.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:41497
TEST=Flash the STM32F072 discovery using the following command:
make flash BOARD=pdeval-stm32f072
then connect to the EC console through the USB port.
Change-Id: Ie3f5dcd04c077be49fbacc020f7af4f298039e8a
Reviewed-on: https://chromium-review.googlesource.com/277713
Tested-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'board/pdeval-stm32f072/gpio.inc')
-rw-r--r-- | board/pdeval-stm32f072/gpio.inc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/board/pdeval-stm32f072/gpio.inc b/board/pdeval-stm32f072/gpio.inc new file mode 100644 index 0000000000..b3026102e2 --- /dev/null +++ b/board/pdeval-stm32f072/gpio.inc @@ -0,0 +1,34 @@ +/* -*- mode:c -*- + * + * Copyright (c) 2015 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Inputs with interrupt handlers are first for efficiency */ +GPIO_INT(USER_BUTTON, PIN(A, 0), GPIO_INT_FALLING, button_event) +GPIO_INT(PD_MCU_INT, PIN(A, 1), GPIO_INT_FALLING, alert_event) + +/* Outputs */ +GPIO(LED_U, PIN(C, 6), GPIO_OUT_LOW) +GPIO(LED_D, PIN(C, 7), GPIO_OUT_LOW) +GPIO(LED_L, PIN(C, 8), GPIO_OUT_LOW) +GPIO(LED_R, PIN(C, 9), GPIO_OUT_LOW) + +/* + * I2C pins should be configured as inputs until I2C module is + * initialized. This will avoid driving the lines unintentionally. + */ +GPIO(I2C0_SCL, PIN(B, 6), GPIO_INPUT) +GPIO(I2C0_SDA, PIN(B, 7), GPIO_INPUT) +GPIO(I2C1_SCL, PIN(B, 13), GPIO_INPUT) +GPIO(I2C1_SDA, PIN(B, 14), GPIO_INPUT) + +/* Unimplemented signals which we need to emulate for now */ +UNIMPLEMENTED(ENTERING_RW) +UNIMPLEMENTED(WP_L) + +ALTERNATE(PIN_MASK(A, 0x0600), 1, MODULE_USART, 0) /* USART1: PA09/PA10 */ +ALTERNATE(PIN_MASK(A, 0xC000), 1, MODULE_UART, 0) /* USART2: PA14/PA15 */ +ALTERNATE(PIN_MASK(B, 0x00c0), 1, MODULE_I2C, 0) /* I2C MASTER:PB6/7 */ +ALTERNATE(PIN_MASK(B, 0x6000), 5, MODULE_I2C, 0) /* I2C MASTER:PB13/14 */ |