mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 16:46:23 +00:00
yorp: Switch on blue LED on boot-up
This is helpful during early debugging to identify if the EC is up and running. This will be later cleaned up as part of LED support for yorp. BUG=b:74952719 BRANCH=None TEST=Verified that blue led glows up on booting up EC. Change-Id: I4670c210045c649a926e7c3f23c5d6097df69e3d Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/979270 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
3bd4e0de5e
commit
286dfbd0c9
@@ -13,4 +13,5 @@ BASEBOARD:=octopus
|
||||
|
||||
board-y=board.o
|
||||
board-$(CONFIG_BATTERY_SMART)+=battery.o
|
||||
board-y+=led.o
|
||||
board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o
|
||||
|
||||
@@ -99,6 +99,11 @@ GPIO(USB_C1_BC12_VBUS_ON, PIN(B, 1), GPIO_OUT_LOW) /* C1 BC1.2 Power */
|
||||
GPIO(USB_C1_BC12_CHG_DET_L, PIN(E, 4), GPIO_INPUT) /* C1 BC1.2 Detect */
|
||||
GPIO(USB_C1_HPD_1V8_ODL, PIN(C, 6), GPIO_ODR_HIGH | /* C1 DP Hotplug Detect */
|
||||
GPIO_SEL_1P8V)
|
||||
|
||||
/* LED */
|
||||
GPIO(BAT_LED_ORANGE_L, PIN(C, 3), GPIO_OUT_HIGH) /* LED_1_L */
|
||||
GPIO(BAT_LED_BLUE_L, PIN(C, 4), GPIO_OUT_HIGH) /* LED_2_L */
|
||||
|
||||
/* Alternate functions GPIO definitions */
|
||||
/* Cr50 requires no pull-ups on UART pins. */
|
||||
ALTERNATE(PIN_MASK(6, 0x30), 0, MODULE_UART, 0) /* UART from EC to Servo */
|
||||
|
||||
22
board/yorp/led.c
Normal file
22
board/yorp/led.c
Normal file
@@ -0,0 +1,22 @@
|
||||
/* Copyright 2018 The Chromium OS Authors. All rights reserved.
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*
|
||||
* Power and battery LED control for Yorp
|
||||
*/
|
||||
|
||||
#include "gpio.h"
|
||||
#include "hooks.h"
|
||||
|
||||
static void led_init(void)
|
||||
{
|
||||
/*
|
||||
* Temporary hack to turn on blue led to indicate that EC is up and
|
||||
* running. This can be removed after adding proper LED support
|
||||
* (b/74952719).
|
||||
*/
|
||||
gpio_set_level(GPIO_BAT_LED_BLUE_L, 0);
|
||||
gpio_set_level(GPIO_BAT_LED_ORANGE_L, 1);
|
||||
}
|
||||
|
||||
DECLARE_HOOK(HOOK_INIT, led_init, HOOK_PRIO_DEFAULT);
|
||||
Reference in New Issue
Block a user