From 90ef39a38c4cd98c76a56537c0f54e28dd20f75e Mon Sep 17 00:00:00 2001 From: "arthur.lin" Date: Wed, 1 Jun 2022 18:14:38 +0800 Subject: taniks: set aw20198 init and scale setting Modify SWSEL bit4-7 from SW11 to SW8 to fulfill the LED module design layout. Modify RED SLn to 190(60mA) for HW change the total Sink current to 80mA. BUG=b:233986174 BRANCH=none TEST=make buildall -j Signed-off-by: arthur.lin Change-Id: Id012ceea416091f8d864ccfc471bee2abb3953b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3682989 Reviewed-by: Daisuke Nojiri --- board/taniks/board.c | 11 +++++++++++ board/taniks/board.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'board') diff --git a/board/taniks/board.c b/board/taniks/board.c index 2c2cf4cb44..6ec0bfd071 100644 --- a/board/taniks/board.c +++ b/board/taniks/board.c @@ -29,6 +29,7 @@ #include "tablet_mode.h" #include "throttle_ap.h" #include "usbc_config.h" +#include "rgb_keyboard.h" #include "gpio_list.h" /* Must come after other header files. */ @@ -46,6 +47,12 @@ BUILD_ASSERT(ARRAY_SIZE(usb_port_enable) == USB_PORT_COUNT); /******************************************************************************/ +const struct rgbkbd_init rgbkbd_init_taniks = { + .gcc = RGBKBD_MAX_GCC_LEVEL / 2, + .scale = { .r = 190, .g = 255, .b = 255 }, + .color = { .r = 255, .g = 255, .b = 255 }, +}; + __override void board_cbi_init(void) { config_usb_db_type(); @@ -63,6 +70,10 @@ void board_init(void) button_disable_gpio(BUTTON_VOLUME_UP); button_disable_gpio(BUTTON_VOLUME_DOWN); } + +#ifdef SECTION_IS_RW + rgbkbd_register_init_setting(&rgbkbd_init_taniks); +#endif } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); diff --git a/board/taniks/board.h b/board/taniks/board.h index 7e04872bb6..be2e935e1f 100644 --- a/board/taniks/board.h +++ b/board/taniks/board.h @@ -244,7 +244,7 @@ #define CONFIG_RGB_KEYBOARD #define CONFIG_LED_DRIVER_AW20198 /* Awinic AW20198 on I2C */ #endif -#define RGB_GRID0_COL 11 +#define RGB_GRID0_COL 8 #define RGB_GRID0_ROW 6 #ifndef __ASSEMBLER__ -- cgit v1.2.1