summaryrefslogtreecommitdiff
path: root/board/elemi/gpio.inc
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2020-10-19 15:48:06 +0800
committerCommit Bot <commit-bot@chromium.org>2020-10-29 01:53:08 +0000
commit4def417c483e0aab7be73cbab429cf093ae4644c (patch)
tree6934a8cc751502d8bf6bebe7636f2458aae1d8f4 /board/elemi/gpio.inc
parent2dfac202ed424dbef9c9a50b4bec36b450e7e0d2 (diff)
downloadchrome-ec-4def417c483e0aab7be73cbab429cf093ae4644c.tar.gz
elemi: Implement LED behavior
Elemi have two charging leds on left side and right side. Each side have two colors amber and white. The led behavior define as following: 1. Charging led: led on with charging port active, other port is off. 2. Charging: Amber. 3. Discharging: Off. 4. Battery Error: Blinking white (0.4 sec on, 0.4 sec off) 5. Fuel < 10%: Blinking white on right side port (1 sec on, 1 sec off) 6. Force idle for factory: Blinking amber (1 sec on, 1 sec off) 7. S0ix without charging state: Blinking both side LED white (1 sec on, 1 sec off) BUG=b:169409487 BRANCH=firmware-volteer-13521.B-master TEST=make sure led behavior intended. make sure ectool led left white/amber/off/auto work correctly. make sure ectool led right white/amber/off/auto work correctly. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I9e4837ddbf300ec7a6c0e0dc8660dc157f9228aa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2484115 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/elemi/gpio.inc')
-rw-r--r--board/elemi/gpio.inc10
1 files changed, 4 insertions, 6 deletions
diff --git a/board/elemi/gpio.inc b/board/elemi/gpio.inc
index 4a3cd1728c..4c7a137e76 100644
--- a/board/elemi/gpio.inc
+++ b/board/elemi/gpio.inc
@@ -112,6 +112,10 @@ GPIO(M2_SSD_PLN, PIN(A, 0), GPIO_ODR_HIGH) /* SSD power-loss notification */
GPIO(M2_SSD_PLA, PIN(7, 0), GPIO_INPUT) /* SSD power-loss acknowledgment */
GPIO(CCD_MODE_ODL, PIN(E, 5), GPIO_INPUT) /* Case Closed Debug Mode */
GPIO(EC_SLP_S0IX, PIN(7, 2), GPIO_INPUT | GPIO_PULL_UP)
+GPIO(C0_CHARGE_LED_AMBER_L, PIN(C, 3), GPIO_OUT_HIGH) /* Amber C0 port */
+GPIO(C0_CHARGE_LED_WHITE_L, PIN(C, 4), GPIO_OUT_HIGH) /* White C0 port */
+GPIO(C1_CHARGE_LED_AMBER_L, PIN(6, 0), GPIO_OUT_HIGH) /* Amber C1 port */
+GPIO(C1_CHARGE_LED_WHITE_L, PIN(C, 2), GPIO_OUT_HIGH) /* White C1 port */
/* Unused signals */
GPIO(UNUSED_GPIO41, PIN(4, 1), GPIO_INPUT | GPIO_PULL_UP)
@@ -151,12 +155,6 @@ ALTERNATE(PIN_MASK(D, BIT(1) | BIT(0)), 0, MODULE_I2C, 0)
ALTERNATE(PIN_MASK(3, BIT(3) | BIT(6)), 0, MODULE_I2C, 0) /* I2C5 */
ALTERNATE(PIN_MASK(B, BIT(3) | BIT(2)), 0, MODULE_I2C, 0) /* I2C7 */
-/* This selects between an LED module on the motherboard and one on the daughter
- * board, to be controlled by LED_{1,2,3}_L. PWM allows driving both modules at
- * the same time. */
-ALTERNATE(PIN_MASK(6, BIT(0)), 0, MODULE_PWM, 0) /* LED_SIDESEL_4_L */
-ALTERNATE(PIN_MASK(C, BIT(2) | BIT(3) | BIT(4)), 0, MODULE_PWM, 0) /* LED_{3,2,1}_L */
-
/* Fan signals */
GPIO(EN_PP5000_FAN, PIN(6, 1), GPIO_OUT_LOW)
ALTERNATE(PIN_MASK(B, BIT(7)), 0, MODULE_PWM, 0) /* FAN_PWM */