summaryrefslogtreecommitdiff
path: root/board/reef_it8320/gpio.inc
diff options
context:
space:
mode:
authorDino Li <Dino.Li@ite.com.tw>2017-06-08 13:25:05 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-06-10 19:41:37 -0700
commit52c5b31c229b87034025f72c958cd8d37c66317b (patch)
treecf0b2d268c2f22ec5e00a1191b2093e6da67d995 /board/reef_it8320/gpio.inc
parent206f1dd93b04b6240b079ef7af1fe97ae5f6bdd8 (diff)
downloadchrome-ec-52c5b31c229b87034025f72c958cd8d37c66317b.tar.gz
reef_it8320: make modifications to GPIO list
This patch makes a few changes to gpio.inc. - When pre-initialize GPIOs, set default level to low: ENTERING_RW and USB2_OTG_VBUSSENSE. - Disable internal pull-up (not necessary if output type is push-pull): USB_Cx_5V_EN. - Set output type to open-drain: EN_USB_Cx_3A and USB_C0_CCx_VCONN_EN. The USB_C0_CCx_VCONN_EN is externally pulled up to PP3300_PD_A. The EN_USB_Cx_3A is pulled to EN_USB_Cx_5V_OUT and connected to base of BJT directly. The output current will be huge if it is set as push-pull. BRANCH=none BUG=none TEST=1. built and booted on reef_it8320. 2. plug-in a device on one port and add load current on vbus to check if current limit sit at 3A. Change-Id: I71fec59cd1696fff417d9cddc287e993988aea33 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/528034 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/reef_it8320/gpio.inc')
-rw-r--r--board/reef_it8320/gpio.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/board/reef_it8320/gpio.inc b/board/reef_it8320/gpio.inc
index 4c6d81b98e..bad4ece3e0 100644
--- a/board/reef_it8320/gpio.inc
+++ b/board/reef_it8320/gpio.inc
@@ -25,8 +25,8 @@ GPIO_INT(PCH_SLP_S3_L, PIN(F, 2), GPIO_INT_BOTH, power_signal_interrupt) /* SLP
GPIO_INT(PCH_SLP_S4_L, PIN(F, 3), GPIO_INT_BOTH, power_signal_interrupt) /* SLP_S4_L */
GPIO_INT(WP_L, PIN(I, 4), GPIO_INT_BOTH | GPIO_SEL_1P8V, switch_interrupt) /* EC_WP_ODL_R */
-GPIO(EN_USB_C0_3A, PIN(A, 0), GPIO_OUT_LOW) /* 1.5/3.0 C0 current limit selection */
-GPIO(EN_USB_C1_3A, PIN(A, 1), GPIO_OUT_LOW) /* 1.5/3.0 C1 current limit selection */
+GPIO(EN_USB_C0_3A, PIN(A, 0), GPIO_ODR_LOW) /* 1.5/3.0 C0 current limit selection */
+GPIO(EN_USB_C1_3A, PIN(A, 1), GPIO_ODR_LOW) /* 1.5/3.0 C1 current limit selection */
GPIO(EN_P3300_TRACKPAD_ODL, PIN(A, 2), GPIO_ODR_HIGH) /* EN_PP3300_TRACKPAD_ODL */
GPIO(EC_HAVEN_RESET_ODL, PIN(A, 3), GPIO_ODR_HIGH) /* EC_HAVEN_RST_ODL */
/* Pin A.4 A.5 (I2C) for iteflash (servo board) */
@@ -46,7 +46,7 @@ GPIO(EC_I2C_B_SDA, PIN(C, 2), GPIO_INPUT | GPIO_SEL_1P8V) /* EC_I2C_SENSOR_U_S
*/
GPIO(EC_BRD_ID_EN_ODL, PIN(C, 3), GPIO_INPUT) /* EC_BRD_ID_EN_ODL */
GPIO(CCD_MODE_ODL, PIN(C, 4), GPIO_INPUT) /* CCD_MODE_ODL */
-GPIO(ENTERING_RW, PIN(C, 5), GPIO_OUTPUT) /* EC_ENTERING_RW */
+GPIO(ENTERING_RW, PIN(C, 5), GPIO_OUT_LOW) /* EC_ENTERING_RW */
GPIO(PCH_RSMRST_L, PIN(C, 6), GPIO_OUT_LOW) /* PCH_RSMRST_L */
/*
* PCH_PROCHOT_ODL is primarily for monitoring the PROCHOT# signal which is
@@ -73,13 +73,13 @@ GPIO(EC_I2C_C_SDA, PIN(F, 7), GPIO_INPUT) /* EC_I2C_USBC_MUX_SDA */
GPIO(LPC_CLKRUN_L, PIN(H, 0), GPIO_OUT_LOW) /* LPC_CLKRUN_L */
/* H.1 H.2 are cc pins of PD1 */
GPIO(TRACKPAD_INT_GATE, PIN(H, 3), GPIO_OUT_LOW)
-GPIO(USB2_OTG_VBUSSENSE, PIN(H, 4), GPIO_OUTPUT)
+GPIO(USB2_OTG_VBUSSENSE, PIN(H, 4), GPIO_OUT_LOW)
GPIO(USB_C0_HPD_1P8_ODL, PIN(J, 0), GPIO_ODR_HIGH | GPIO_SEL_1P8V) /* USB_C0_HPD_1V8_ODL */
GPIO(USB_C1_HPD_1P8_ODL, PIN(J, 1), GPIO_ODR_HIGH | GPIO_SEL_1P8V) /* USB_C1_HPD_1V8_ODL */
GPIO(LID_ACCEL_INT_L, PIN(J, 3), GPIO_INPUT | GPIO_SEL_1P8V) /* LID_ACCEL_INT_L */
/* NOTE: Active low */
-GPIO(USB_C0_CC1_VCONN_EN, PIN(J, 4), GPIO_OUT_HIGH) /* USB_C0_CC1_VCONN_EN_ODL */
-GPIO(USB_C0_CC2_VCONN_EN, PIN(J, 5), GPIO_OUT_HIGH) /* USB_C0_CC2_VCONN_EN_ODL */
+GPIO(USB_C0_CC1_VCONN_EN, PIN(J, 4), GPIO_ODR_HIGH) /* USB_C0_CC1_VCONN_EN_ODL */
+GPIO(USB_C0_CC2_VCONN_EN, PIN(J, 5), GPIO_ODR_HIGH) /* USB_C0_CC2_VCONN_EN_ODL */
GPIO(EN_PP3300, PIN(K, 0), GPIO_OUT_LOW) /* EN_PP3300 */
GPIO(PP3300_PG, PIN(K, 1), GPIO_INPUT) /* PP3300_PG_OD */
@@ -99,8 +99,8 @@ GPIO(USB1_ENABLE, PIN(L, 1), GPIO_OUT_LOW) /* EN_USB_A_5V */
* Configure as input to enable @ 1.5A, output-low to turn off, or output-high
* to enable @ 3A.
*/
-GPIO(USB_C0_5V_EN, PIN(L, 2), GPIO_OUT_LOW | GPIO_PULL_UP) /* EN_USB_C0_5V_OUT, Enable C0 */
-GPIO(USB_C1_5V_EN, PIN(L, 3), GPIO_OUT_LOW | GPIO_PULL_UP) /* EN_USB_C1_5V_OUT, Enable C1 */
+GPIO(USB_C0_5V_EN, PIN(L, 2), GPIO_OUT_LOW) /* EN_USB_C0_5V_OUT, Enable C0 */
+GPIO(USB_C1_5V_EN, PIN(L, 3), GPIO_OUT_LOW) /* EN_USB_C1_5V_OUT, Enable C1 */
GPIO(BAT_LED_BLUE, PIN(L, 4), GPIO_OUT_HIGH) /* BLUE_PWR_LED */
GPIO(BAT_LED_AMBER, PIN(L, 5), GPIO_OUT_HIGH) /* ORANGE_CHG_LED */
GPIO(USB_C0_DISCHARGE, PIN(L, 6), GPIO_OUT_LOW) /* USB_C0_DISCHARGE */