diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2015-04-13 16:25:51 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-22 20:01:15 +0200 |
commit | ace3e3fc5e8b33f2afb9b427b589dfca4ecf0283 (patch) | |
tree | 64cade43bb7ab8d5d4e2bd3d66c8e916b8027722 | |
parent | a386bf790ed393dadc449910bbc21b03010cf49c (diff) | |
download | coreboot-ace3e3fc5e8b33f2afb9b427b589dfca4ecf0283.tar.xz |
i2c/ww_ring: add a pattern for normal boot
It became necessary to indicate the beginning of the normal boot
process. This patch adds a new pattern, a slow (over 2 seconds) fade
in into the 0, 87, 155 color.
BRANCH=storm
BUG=chrome-os-partner:39044
TEST=tested by the next patch.
Change-Id: Idd977688e5aa2cc55fc295072c0766526ae95016
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 577c8bd6f8c69073cfdd7acd4a87e7ae603d48e6
Original-Change-Id: I9aff3f4558e733ff2e47206075533556e400f183
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/265535
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9922
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r-- | src/drivers/i2c/ww_ring/ww_ring.h | 1 | ||||
-rw-r--r-- | src/drivers/i2c/ww_ring/ww_ring_programs.c | 88 |
2 files changed, 88 insertions, 1 deletions
diff --git a/src/drivers/i2c/ww_ring/ww_ring.h b/src/drivers/i2c/ww_ring/ww_ring.h index d2804ed46e..3eb1092fe2 100644 --- a/src/drivers/i2c/ww_ring/ww_ring.h +++ b/src/drivers/i2c/ww_ring/ww_ring.h @@ -23,6 +23,7 @@ enum display_pattern { WWR_RECOVERY_PUSHED, /* Recovery button push detected on start up. */ WWR_WIPEOUT_REQUEST, /* Held long enough for wipout request. */ WWR_RECOVERY_REQUEST, /* Held long enough for recovery request. */ + WWR_NORMAL_BOOT /* No buttons pressed, normal boot sequence. */ }; /* * ww_ring_display_pattern diff --git a/src/drivers/i2c/ww_ring/ww_ring_programs.c b/src/drivers/i2c/ww_ring/ww_ring_programs.c index cec947d2e5..a35998c57a 100644 --- a/src/drivers/i2c/ww_ring/ww_ring_programs.c +++ b/src/drivers/i2c/ww_ring/ww_ring_programs.c @@ -270,6 +270,92 @@ static const TiLp55231Program blink_recovery2_program = { { 3, 26, 26, } }; +/* + * fade_in1.src + * + row_red: dw 0000000001001001b + row_green: dw 0000000010010010b + row_blue: dw 0000000100100100b + + .segment program1 + mux_map_addr row_red + set_pwm 0h + trigger w{e} + trigger s{2|3} + end + + .segment program2 + mux_map_addr row_green + set_pwm 0h + + trigger w{1} + ramp 2, 87 + end + +.segment program3 + mux_map_addr row_blue + set_pwm 0h + loop3: trigger w{1} + ramp 2, 155 + end +*/ +/* + * fade_in2.src + * + row_red: dw 0000000001001001b + row_green: dw 0000000010010010b + row_blue: dw 0000000100100100b + + .segment program1 + mux_map_addr row_red + set_pwm 0h + trigger s{e} + trigger s{2|3} + end + + .segment program2 + mux_map_addr row_green + set_pwm 0h + + trigger w{1} + ramp 2, 87 + end + +.segment program3 + mux_map_addr row_blue + set_pwm 0h + loop3: trigger w{1} + ramp 2, 155 + end +*/ + +static const uint8_t fade_in1_text[] = { + 0x00, 0x49, 0x00, 0x92, 0x01, 0x24, 0x9f, 0x80, + 0x40, 0x00, 0xf0, 0x00, 0xe0, 0x0c, 0xc0, 0x00, + 0x9f, 0x81, 0x40, 0x00, 0xe0, 0x80, 0x42, 0x57, + 0xc0, 0x00, 0x9f, 0x82, 0x40, 0x00, 0xe0, 0x80, + 0x34, 0x9b, 0xc0, 0x00, 0x00, +}; +static const TiLp55231Program fade_in1_program = { + fade_in1_text, + sizeof(fade_in1_text), + 0, + { 3, 8, 13, } +}; + +static const uint8_t fade_in2_text[] = { + 0x00, 0x49, 0x00, 0x92, 0x01, 0x24, 0x9f, 0x80, + 0x40, 0x00, 0xe0, 0x40, 0xe0, 0x0c, 0xc0, 0x00, + 0x9f, 0x81, 0x40, 0x00, 0xe0, 0x80, 0x42, 0x57, + 0xc0, 0x00, 0x9f, 0x82, 0x40, 0x00, 0xe0, 0x80, + 0x34, 0x9b, 0xc0, 0x00, 0x00, +}; +static const TiLp55231Program fade_in2_program = { + fade_in2_text, + sizeof(fade_in2_text), + 0, + { 3, 8, 13, } +}; const WwRingStateProg wwr_state_programs[] = { /* @@ -282,6 +368,6 @@ const WwRingStateProg wwr_state_programs[] = { &blink_wipeout2_program} }, {WWR_RECOVERY_REQUEST, {&blink_recovery1_program, &blink_recovery2_program} }, + {WWR_NORMAL_BOOT, {&fade_in1_program, &fade_in2_program} }, {}, /* Empty record to mark the end of the table. */ }; - |