poppy: Change LED_YELLOW_C0 GPIO pin from GPO32 to GPIO27

GPO32 is "PU [30K] during reset, then Hi-Z", so change to GPIO27
avoiding USB-C (P0) LED shortly light up during EC reset.

BRANCH=none
BUG=b:63048710
TEST=Rework poppy board by wiring EC_CHG_LED_Y_C0 to TP38

Change-Id: I91e3dd58849ce15f9a85408aec94fd3f94acf038
Reviewed-on: https://chromium-review.googlesource.com/558785
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Tony Lin <tonycwlin@google.com>
Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
This commit is contained in:
tonycwlin
2017-07-03 09:00:25 +08:00
committed by Tony Lin
parent 3ec62ac836
commit ef3afbf959
2 changed files with 6 additions and 2 deletions

View File

@@ -106,7 +106,8 @@ GPIO(USB2_OTG_ID, PIN(A, 1), GPIO_ODR_LOW) /* OTG ID */
GPIO(USB2_OTG_VBUSSENSE, PIN(9, 5), GPIO_OUT_LOW) /* OTG VBUS Sense */
/* LEDs (2 colors on each port) */
GPIO(LED_YELLOW_C0, PIN(3, 2), GPIO_OUT_LOW)
GPIO(LED_YELLOW_C0, PIN(2, 7), GPIO_OUT_LOW) /* This is from rev4 */
GPIO(LED_YELLOW_C0_OLD, PIN(3, 2), GPIO_OUT_LOW) /* This is for rev1 to rev3 */
GPIO(LED_WHITE_C0, PIN(C, 6), GPIO_OUT_LOW)
GPIO(LED_YELLOW_C1, PIN(3, 1), GPIO_OUT_LOW)
GPIO(LED_WHITE_C1, PIN(3, 0), GPIO_OUT_LOW)

View File

@@ -14,6 +14,7 @@
#include "hooks.h"
#include "host_command.h"
#include "led_common.h"
#include "system.h"
#include "util.h"
#define BAT_LED_ON 1
@@ -35,7 +36,9 @@ enum led_color {
static void side_led_set_color(int port, enum led_color color)
{
gpio_set_level(port ? GPIO_LED_YELLOW_C1 : GPIO_LED_YELLOW_C0,
int yellow_c0 = (system_get_board_version() >= 4) ?
GPIO_LED_YELLOW_C0 : GPIO_LED_YELLOW_C0_OLD;
gpio_set_level(port ? GPIO_LED_YELLOW_C1 : yellow_c0,
(color == LED_AMBER) ? BAT_LED_ON : BAT_LED_OFF);
gpio_set_level(port ? GPIO_LED_WHITE_C1 : GPIO_LED_WHITE_C0,
(color == LED_WHITE) ? BAT_LED_ON : BAT_LED_OFF);