From ab8a50b84eb4240b64784cf881d2e83bf8487665 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Thu, 24 Jul 2014 15:47:38 -0700 Subject: zinger: change behavior of pin PA0 for wakeup functionality Zinger EVT units will have hardware change for PA0 to be able to wake up from standby. Part of the change is that we have to output high on PA0 in order for the comparator to compare against 0.65V, which is inverted from the previous version. BUG=chrome-os-partner:28335 BRANCH=none TEST=reworked a p2 zinger with PA0 changes, plugged into samus, and verified we still charge. Change-Id: I7344f1d1decddc4e6600e41c313e1e7a5a5de067 Signed-off-by: Alec Berg Reviewed-on: https://chromium-review.googlesource.com/209832 Reviewed-by: Vincent Palatin --- board/zinger/hardware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'board/zinger/hardware.c') diff --git a/board/zinger/hardware.c b/board/zinger/hardware.c index cf0921c990..25b9b59569 100644 --- a/board/zinger/hardware.c +++ b/board/zinger/hardware.c @@ -65,7 +65,7 @@ static void power_init(void) static void pins_init(void) { /* Pin usage: - * PA0 (OUT - OD GPIO) : Wakeup on Vnc / Threshold + * PA0 (OUT - GPIO) : Wakeup on Vnc / Threshold * PA1 (ANALOG - ADC_IN1) : CC sense * PA2 (ANALOG - ADC_IN2) : Current sense * PA3 (ANALOG - ADC_IN3) : Voltage sense @@ -81,10 +81,10 @@ static void pins_init(void) * PF0 (OUT - GPIO) : LM5050 FET driver off * PF1 (OUT - GPIO) : discharge FET */ - STM32_GPIO_ODR(GPIO_A) = /* HIGH(0) | */ HIGH(4); + STM32_GPIO_ODR(GPIO_A) = HIGH(0) | HIGH(4); STM32_GPIO_AFRL(GPIO_A) = AFx(7, 1); STM32_GPIO_AFRH(GPIO_A) = AFx(9, 1) | AFx(10, 1); - STM32_GPIO_OTYPER(GPIO_A) = ODR(0) | ODR(4); + STM32_GPIO_OTYPER(GPIO_A) = ODR(4); STM32_GPIO_OSPEEDR(GPIO_A) = HISPEED(5) | HISPEED(6) | HISPEED(7); STM32_GPIO_MODER(GPIO_A) = OUT(0) | ANALOG(1) | ANALOG(2) | ANALOG(3) | OUT(4) | AF(5) /*| AF(6)*/ | AF(7) | AF(9) -- cgit v1.2.1