summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-06-10 16:30:36 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-13 05:34:20 +0000
commit7b27c02a24e4fb615b79a2c0d48bf6930a75bc46 (patch)
tree5fa4c87f1fc0e2bae04ddd24da2ae521f217bb71
parent5408b10490b753dc06ec47d37be5026cc762f2db (diff)
downloadchrome-ec-7b27c02a24e4fb615b79a2c0d48bf6930a75bc46.tar.gz
samus_pd: board file changes for version 2 and 2B
Samus PD MCU board file changes for version 2 and 2B of the samus board. Adds more I/O for case closed debugging, adds sensing of VBUS voltage (boostin), and moves USB C0 BC12 interrupt pin. BUG=none BRANCH=none TEST=none Change-Id: I545ff518add19919d1747de91318c33363d99403 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/203314
-rw-r--r--board/samus_pd/board.c16
-rw-r--r--board/samus_pd/board.h9
2 files changed, 17 insertions, 8 deletions
diff --git a/board/samus_pd/board.c b/board/samus_pd/board.c
index d689a42306..b2f19ab293 100644
--- a/board/samus_pd/board.c
+++ b/board/samus_pd/board.c
@@ -59,7 +59,7 @@ const struct gpio_info gpio_list[] = {
{"USB_C0_VBUS_WAKE", GPIO_E, (1<<6), GPIO_INT_BOTH, vbus_evt},
{"USB_C1_VBUS_WAKE", GPIO_F, (1<<2), GPIO_INT_BOTH, vbus_evt},
{"USB_C0_BC12_INT_L", GPIO_B, (1<<0), GPIO_INT_FALLING, bc12_evt},
- {"USB_C1_BC12_INT_L", GPIO_C, (1<<1), GPIO_INT_FALLING, bc12_evt},
+ {"USB_C1_BC12_INT_L", GPIO_C, (1<<11), GPIO_INT_FALLING, bc12_evt},
{"PCH_SLP_S0_L", GPIO_C, (1<<14), GPIO_INT_BOTH, pch_evt},
{"PCH_SLP_S3_L", GPIO_C, (1<<15), GPIO_INT_BOTH, pch_evt},
{"PCH_SLP_S5_L", GPIO_D, (1<<7), GPIO_INT_BOTH, pch_evt},
@@ -93,8 +93,9 @@ const struct gpio_info gpio_list[] = {
#endif
/* Power and muxes control */
+ {"PPVAR_BOOSTIN_SENSE", GPIO_C, (1<<1), GPIO_ANALOG, NULL},
{"PP3300_USB_PD_EN", GPIO_A, (1<<8), GPIO_OUT_HIGH, NULL},
- {"USB_C0_CHARGE_EN_L", GPIO_D, (1<<12), GPIO_OUT_LOW, NULL},
+ {"USB_C0_CHARGE_EN_L", GPIO_D, (1<<12), GPIO_OUT_LOW, NULL},
{"USB_C1_CHARGE_EN_L", GPIO_D, (1<<13), GPIO_OUT_HIGH, NULL},
{"USB_C0_5V_EN", GPIO_D, (1<<14), GPIO_OUT_LOW, NULL},
{"USB_C1_5V_EN", GPIO_D, (1<<15), GPIO_OUT_HIGH, NULL},
@@ -141,9 +142,6 @@ const struct gpio_info gpio_list[] = {
{"MASTER_I2C_SCL", GPIO_B, (1<<10), GPIO_INPUT, NULL},
{"MASTER_I2C_SDA", GPIO_B, (1<<11), GPIO_INPUT, NULL},
- /* Test points */
- {"TP60", GPIO_C, (1<<11), GPIO_ODR_HIGH, NULL},
-
/* Case closed debugging. */
{"SPI_FLASH_WP_L", GPIO_D, (1<<2), GPIO_INPUT, NULL},
{"EC_INT_L", GPIO_B, (1<<2), GPIO_ODR_HIGH, NULL},
@@ -157,6 +155,11 @@ const struct gpio_info gpio_list[] = {
{"EC_JTAG_TCK", GPIO_C, (1<<7), GPIO_INPUT, NULL},
{"EC_JTAG_TDO", GPIO_C, (1<<8), GPIO_INPUT, NULL},
{"EC_JTAG_TDI", GPIO_C, (1<<9), GPIO_INPUT, NULL},
+ {"PD_ENTERING_RW", GPIO_B, (1<<5), GPIO_OUT_LOW, NULL},
+ {"PD_IN_RW", GPIO_B, (1<<15), GPIO_INPUT, NULL},
+ {"PD_DISABLE_DEBUG", GPIO_E, (1<<15), GPIO_OUT_LOW, NULL},
+ {"PD_DEBUG_EN", GPIO_D, (1<<4), GPIO_INPUT, NULL},
+
#if 0
/* Alternate functions */
{"EC_UART_TX", GPIO_C, (1<<4), GPIO_OUT_LOW, NULL},
@@ -206,6 +209,9 @@ const struct adc_t adc_channels[] = {
[ADC_C1_CC1_PD] = {"C1_CC1_PD", 3300, 4096, 0, STM32_AIN(2)},
[ADC_C0_CC2_PD] = {"C0_CC2_PD", 3300, 4096, 0, STM32_AIN(4)},
[ADC_C1_CC2_PD] = {"C1_CC2_PD", 3300, 4096, 0, STM32_AIN(5)},
+
+ /* Vbus sensing. Converted to mV, full ADC is equivalent to 25.774V. */
+ [ADC_BOOSTIN] = {"V_BOOSTIN", 25774, 4096, 0, STM32_AIN(11)},
};
BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h
index 42cfe6ce07..6fb772faca 100644
--- a/board/samus_pd/board.h
+++ b/board/samus_pd/board.h
@@ -86,6 +86,7 @@ enum gpio_signal {
#endif
/* Power and muxes control */
+ GPIO_PPVAR_BOOSTIN_SENSE,
GPIO_PP3300_USB_PD_EN,
GPIO_USB_C0_CHARGE_EN_L,
GPIO_USB_C1_CHARGE_EN_L,
@@ -132,9 +133,6 @@ enum gpio_signal {
GPIO_MASTER_I2C_SCL,
GPIO_MASTER_I2C_SDA,
- /* Test points */
- GPIO_TP60,
-
/* Case closed debugging */
GPIO_SPI_FLASH_WP_L,
GPIO_EC_INT_L,
@@ -148,6 +146,10 @@ enum gpio_signal {
GPIO_EC_JTAG_TCK,
GPIO_EC_JTAG_TDO,
GPIO_EC_JTAT_TDI,
+ GPIO_PD_ENTERING_RW,
+ GPIO_PD_IN_RW,
+ GPIO_PD_DISABLE_DEBUG,
+ GPIO_PD_DEBUG_EN,
#if 0
/* Alternate functions */
GPIO_EC_UART_TX,
@@ -169,6 +171,7 @@ enum adc_channel {
ADC_C1_CC1_PD,
ADC_C0_CC2_PD,
ADC_C1_CC2_PD,
+ ADC_BOOSTIN,
/* Number of ADC channels */
ADC_CH_COUNT
};