summaryrefslogtreecommitdiff
path: root/board/lindar/led.c
Commit message (Collapse)AuthorAgeFilesLines
* LED On/Off: Make battery LED optionalDiana Z2021-04-221-4/+5
| | | | | | | | | | | | | | | Currently, all boards using the LED On/Off module have battery LEDs. However, if we'd like to expand support to Chromeboxes then the battery LED must become optional. BRANCH=None BUG=b:185508707 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ieae098829ebe6c8b103f23d5abdbf70e7bcbdf2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832692 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* LED On/Off: Remove power LED configDiana Z2021-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | Move the LED on/off module towards using a more flexible LED support approach. Define a weak power LED table and setter for boards to override when needed. Note that during run-time these functions will not get called since led_auto_control_is_enabled() will return false for nonexistent LEDs. This consumes an average of 165 additional bytes of flash space on boards which do not use a power LED. BRANCH=None BUG=b:185508707 TEST=make -j buildall, load on guybrush (battery LED only) and confirm no errors are seen. Load on Boten (both LEDs) and confirm behavior appears normal Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iaa1e22a7f5d8be39eb8792ee13d358087d7f7482 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832691 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Lindar: Update lightbar 10-led cfgreno.wang2021-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | Based on b:183826778's comment#17 and comment18 information to update lightbar 10-led cfg setting. The final placement adopt lightbar circuit's LED9 and LED10 which connect to KTD2061's LEDC1 and and LEDC2, not adopt LED11 and LED12 which connect to LEDC3 and LEDC4. BUG=b:183826778 BRANCH=volteer TEST=make -j BOARD=lindar Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I7f7e1cac1f7361c5c21497a0cc4c1ff2763873bf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2833031 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Lindar: Create lightbar command for factory testreno.wang2021-04-141-1/+206
| | | | | | | | | | | | | | | | Add console/host, ectool, command for testing BUG=b:184821618 BRANCH=volteer TEST=make buildall, test command, ex. "ectool lighbar off". Lindar: Lightbar test code Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I2b250d1b9bbc34ef533da34588ee969104f3b7f3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2814721 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Lindar: Move to SSFC for lightbar instead of SKUIDreno.wang2021-04-141-5/+68
| | | | | | | | | | | | | | | | | 1. Move to SSFC to check if system support lightbar instead of sku id 2. Add lightbar 12 led support and EC can base on SSFC_LIGHTBAR type to adopt different lightbar led cfg. BUG=b:183826778 BRANCH=volteer TEST=makee buildall, test SSFC_LIGHTBAR Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: Ic8fac16e846638c403e37261ecf15a72e805a8e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2822270 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Lindar: Lightbar V9 SPECreno.wang2021-04-141-93/+182
| | | | | | | | | | | | | | | | | | | 1. Update code to match lightbar V9 behavior spec 2. Update lightbar led cfg to match lightbar HW design 3. Update amber (orange) color's current to increase brightness for mechanism team's request. BUG=b:183826778 BRANCH=volteer TEST=makee buildall, test lightbar behavior follow V9 SPEC, check lightbar green and amber color brightness. Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I2626601aebc002fdf03fb5bb10f387a033378fa4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2814720 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Lindar: Lindar's lightbar support in S0ix/S3reno.wang2021-04-031-2/+326
| | | | | | | | | | | | | | | | | | | | | | | | | 1. Lid is closed, lightbar keep off 2. Lid is opened, its behavior follow below. AC+Battery < 20%, lightbar solid 2 amber led on. AC+Battery < 40%, lightbar solid 4 amber led on. AC+Battery < 60%, lightbar solid 6 amber led on. AC+Battery < 80%, lightbar solid 8 amber led on. AC+Battery < 97%, lightbar solid 10 amber led on. AC+Battery >= 97%, lightbar solid 10 green led on. Battery only >= 15%, lightbar keep off. Battery low < 15%, lightbar blink amber color, 1s on, 5s off. 3. Some SKU un-support lightbar, and shouldn't run lightbar task. 4. Lightbar is powered by PP3300_A, and shouldn't run it in S4/S5/G3. 5. Add debounce time for lightbar state change. BUG=b:174133147 BRANCH=volteer TEST=make buildall, test lightbar behavior in S0ix/S3. Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: Ibbdc17627f7b2d1b2abbbad23b6c06024455e66b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2739008 Reviewed-by: Keith Short <keithshort@chromium.org>
* lindar: fix the battery green led cannot be turned on by commandjerry2.huang2021-03-021-2/+2
| | | | | | | | | | | | | | | fix issue of the command "ectool led battery green" didn't work BUG=b:174443628 BRANCH=firmware-volteer-13672.B TEST=make buildall ,Verify "ectool led battery [color]" command work normally Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com> Change-Id: I5b7eb789106698dc21345a98609947167fde7d47 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2721323 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* lindar: modify led behaviorjerry2.huang2021-02-011-6/+6
| | | | | | | | | | | | | | | | | | | 1.LED color: LED_1_L color change to green LED_2_L color change to red 2.Modify led behavior BUG=b:174443628 BRANCH=firmware-volteer-13672.B TEST=make buildall ,Verify "green LED at full charge, amber during charging,red during charging/low battery, LED off at discharge,red led blink at battery error" the led behavior is normally. Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com> Change-Id: I74b6a83d2a252001baa76584ab7f5e58b1129358 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2657904 Reviewed-by: Keith Short <keithshort@chromium.org>
* lindar: modify LED function to match LED SPECamber.chen2020-12-181-3/+3
| | | | | | | | | | | | | modify LED function to match LED SPEC BUG=b:174443628 BRANCH=firmware-volteer-13521.B TEST=make -j BOARD=lindar Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com> Change-Id: Ie5e598d119bc096280e717eddae6ed2ce12e61c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597126 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* lindar: modify LED function to match LED SPECamber.chen2020-12-071-8/+9
| | | | | | | | | | | | | | | modify LED function to match LED SPEC BUG=b:174443628 BRANCH=firmware-vloteer-13521.B TEST=make -j BOARD=lindar Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com> Change-Id: Ie51eaa92aed3c22c5452a132048f95287ea94367 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2566857 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* lindar: Initial EC imagejerry2.huang2020-07-311-0/+110
Create the initial EC image for the lindar variant by copying the malefor reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.0.3). BUG=b:161089195 BRANCH=none TEST=make BOARD=lindar Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com> Change-Id: I6de3d444a6ecb81426201eb3d673c891474ddb93 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2309512 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>