diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2021-07-13 14:31:30 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-21 02:19:25 +0000 |
commit | c1acd051f35d1a46a3ec4454886f1de1b68558ff (patch) | |
tree | 4d2d8638607b2c8467fe4f6e6474ccc401521a10 /board/redrix/board.h | |
parent | 991635ce353d85e833b1e7a2110752730289d21c (diff) | |
download | chrome-ec-c1acd051f35d1a46a3ec4454886f1de1b68558ff.tar.gz |
redrix: Implement leds
Simply copy from: https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/board/jinlon/led.c
|1. Add some macro changes and change C0 charging led to left side.|
|2. Add a LED task to replace the hook task.|
1. Redrix has the same design as Jinlon, there are two set
charging leds on system (right side and left side), each side has two
colors amber and white.
2. Redrix has a power led to indicate power state suspend/off.
The led behavior define as following:
1. Charging led: led on with charging port active, other port is off.
Charging: Amber.
Discharging: Off.
Battery Error: Blinking white (0.5 sec on, 0.5 sec off)
Fuel < 10%: Blinking white on right side port (1 sec on, 1 sec off)
Force idle for factory: Blinking amber (1 sec on, 1 sec off)
2. Power led:
System is S0: White
System is suspend/S0ix: Blinking white (1 sec on, 1 sec off)
System is S5: Off
BUG=b:193945754
BRANCH=none
TEST=Cherry-picked this patch to Jinlon and Verified as following:
make sure led behavior intended.
make sure ectool led power white/off/auto work correctly.
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: If05c9e2750ca3afcbcfaf51ce495d0f03d1fa756
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3023511
Reviewed-by: caveh jalali <caveh@chromium.org>
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Diffstat (limited to 'board/redrix/board.h')
-rw-r--r-- | board/redrix/board.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/board/redrix/board.h b/board/redrix/board.h index c79576769b..62abc99b6c 100644 --- a/board/redrix/board.h +++ b/board/redrix/board.h @@ -24,18 +24,6 @@ */ #define CONFIG_HIBERNATE_PSL_VCC1_RST_WAKEUP -/* LED */ -#define CONFIG_LED_PWM -#define CONFIG_LED_PWM_COUNT 2 -#undef CONFIG_LED_PWM_NEAR_FULL_COLOR -#undef CONFIG_LED_PWM_SOC_ON_COLOR -#undef CONFIG_LED_PWM_SOC_SUSPEND_COLOR -#undef CONFIG_LED_PWM_LOW_BATT_COLOR -#define CONFIG_LED_PWM_NEAR_FULL_COLOR EC_LED_COLOR_WHITE -#define CONFIG_LED_PWM_SOC_ON_COLOR EC_LED_COLOR_WHITE -#define CONFIG_LED_PWM_SOC_SUSPEND_COLOR EC_LED_COLOR_WHITE -#define CONFIG_LED_PWM_LOW_BATT_COLOR EC_LED_COLOR_AMBER - /* Sensors */ #define CONFIG_ACCELGYRO_LSM6DSO /* Base accel */ #define CONFIG_ACCEL_LSM6DSO_INT_EVENT \ @@ -240,12 +228,8 @@ enum battery_type { }; enum pwm_channel { - PWM_CH_LED2 = 0, /* PWM0 (white charger) */ - PWM_CH_LED3, /* PWM1 (orange on DB) */ - PWM_CH_LED1, /* PWM2 (orange charger) */ - PWM_CH_KBLIGHT, /* PWM3 */ + PWM_CH_KBLIGHT = 0, /* PWM3 */ PWM_CH_FAN, /* PWM5 */ - PWM_CH_LED4, /* PWM7 (white on DB) */ PWM_CH_COUNT }; |