summaryrefslogtreecommitdiff
path: root/board/zinger/hardware.c
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2014-05-05 11:45:05 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-05-07 03:39:24 +0000
commit58c50a970ab7df4f0e3f1b188e6b1966a9d47d1d (patch)
treebbe7ce91abb197f656fc6f2e430c8dc3e419a636 /board/zinger/hardware.c
parent165c7375da9641c9ab278c47b1135019a79c84f8 (diff)
downloadchrome-ec-58c50a970ab7df4f0e3f1b188e6b1966a9d47d1d.tar.gz
zinger: invert output control
The electrical design has changed : the output enable GPIO (PF0) has switched from being the LM5050 shutdown pin to controlling directly the FET enabling. We need to invert the control logic and use it in push-pull mode rather than open-drain. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:28332 TEST=plug a reworked Zinger to a firefly and check the firefly LED is displaying a solid ON (meaning the voltage is right). Change-Id: Iee79b07f49eade1fee7cac1986bc38ba21e04b25 Reviewed-on: https://chromium-review.googlesource.com/198240 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/zinger/hardware.c')
-rw-r--r--board/zinger/hardware.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/zinger/hardware.c b/board/zinger/hardware.c
index 0a939a72eb..1f9851c707 100644
--- a/board/zinger/hardware.c
+++ b/board/zinger/hardware.c
@@ -87,10 +87,10 @@ static void pins_init(void)
STM32_GPIO_MODER(GPIO_A) = OUT(0) | ANALOG(1) | ANALOG(2) | ANALOG(3)
| OUT(4) | AF(5) /*| AF(6)*/ | AF(7) | AF(9)
| AF(10) | OUT(13) | OUT(14);
- /* set PF0 / PF1 as output, PF0 is open-drain, high by default */
- STM32_GPIO_ODR(GPIO_F) = HIGH(0);
+ /* set PF0 / PF1 as output */
+ STM32_GPIO_ODR(GPIO_F) = 0;
STM32_GPIO_MODER(GPIO_F) = OUT(0) | OUT(1);
- STM32_GPIO_OTYPER(GPIO_F) = ODR(0);
+ STM32_GPIO_OTYPER(GPIO_F) = 0;
/* Set PB1 as AF0 (TIM14_CH1) */
STM32_GPIO_OSPEEDR(GPIO_B) = HISPEED(1);