summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/taniks/board.h7
-rw-r--r--board/taniks/ec.tasklist1
-rw-r--r--board/taniks/gpio.inc2
-rw-r--r--board/taniks/keyboard.c20
4 files changed, 29 insertions, 1 deletions
diff --git a/board/taniks/board.h b/board/taniks/board.h
index 4a76b062f9..e6bdc7a637 100644
--- a/board/taniks/board.h
+++ b/board/taniks/board.h
@@ -236,6 +236,13 @@
#define CONFIG_CHARGER_BQ25710_VSYS_MIN_VOLTAGE_CUSTOM
#define CONFIG_CHARGER_BQ25710_VSYS_MIN_VOLTAGE_MV 6100
+/* RGB Keyboard */
+#define GPIO_RGBKBD_SDB_L GPIO_KBMCU_INT_ODL
+#define CONFIG_RGB_KEYBOARD
+#define CONFIG_LED_DRIVER_AW20198 /* Awinic AW20198 on I2C */
+#define RGB_GRID0_COL 11
+#define RGB_GRID0_ROW 6
+
#ifndef __ASSEMBLER__
#include "gpio_signal.h" /* needed by registers.h */
diff --git a/board/taniks/ec.tasklist b/board/taniks/ec.tasklist
index 6d995d6b44..12beb39a23 100644
--- a/board/taniks/ec.tasklist
+++ b/board/taniks/ec.tasklist
@@ -12,6 +12,7 @@
#define CONFIG_TASK_LIST \
TASK_ALWAYS(HOOKS, hook_task, NULL, HOOKS_TASK_STACK_SIZE) \
+ TASK_ALWAYS(RGBKBD, rgbkbd_task, NULL, BASEBOARD_RGBKBD_TASK_STACK_SIZE) \
TASK_ALWAYS(CHG_RAMP, chg_ramp_task, NULL, BASEBOARD_CHG_RAMP_TASK_STACK_SIZE) \
TASK_ALWAYS(USB_CHG_P0, usb_charger_task, 0, TASK_STACK_SIZE) \
TASK_ALWAYS(USB_CHG_P1, usb_charger_task, 0, TASK_STACK_SIZE) \
diff --git a/board/taniks/gpio.inc b/board/taniks/gpio.inc
index 17010b5731..7c21123ff1 100644
--- a/board/taniks/gpio.inc
+++ b/board/taniks/gpio.inc
@@ -87,7 +87,7 @@ GPIO(USB_C0_TCPC_RST_ODL, PIN(A, 7), GPIO_ODR_LOW)
GPIO(USB_C1_FRS_EN, PIN(9, 4), GPIO_OUT_LOW)
GPIO(USB_C1_RT_RST_R_ODL, PIN(0, 2), GPIO_ODR_HIGH)
GPIO(VCCST_PWRGD_OD, PIN(A, 4), GPIO_ODR_LOW)
-GPIO(KBMCU_INT_ODL, PIN(7, 0), GPIO_INPUT)
+GPIO(KBMCU_INT_ODL, PIN(7, 0), GPIO_ODR_HIGH)
/* KB Outputs */
#define GPIO_KB_OUTPUT (GPIO_OUT_HIGH)
diff --git a/board/taniks/keyboard.c b/board/taniks/keyboard.c
index cbd765b437..b48ffe2590 100644
--- a/board/taniks/keyboard.c
+++ b/board/taniks/keyboard.c
@@ -3,9 +3,11 @@
* found in the LICENSE file.
*/
+#include "aw20198.h"
#include "common.h"
#include "ec_commands.h"
#include "keyboard_scan.h"
+#include "rgb_keyboard.h"
#include "timer.h"
/* Keyboard scan setting */
@@ -46,6 +48,24 @@ static const struct ec_response_keybd_config taniks_kb = {
.capabilities = KEYBD_CAP_SCRNLOCK_KEY | KEYBD_CAP_NUMERIC_KEYPAD,
};
+static struct rgb_s grid0[RGB_GRID0_COL * RGB_GRID0_ROW];
+
+struct rgbkbd rgbkbds[] = {
+ [0] = {
+ .cfg = &(const struct rgbkbd_cfg) {
+ .drv = &aw20198_drv,
+ .i2c = I2C_PORT_KBMCU,
+ .col_len = RGB_GRID0_COL,
+ .row_len = RGB_GRID0_ROW,
+ },
+ .buf = grid0,
+ },
+};
+const uint8_t rgbkbd_count = ARRAY_SIZE(rgbkbds);
+
+const uint8_t rgbkbd_hsize = RGB_GRID0_COL;
+const uint8_t rgbkbd_vsize = RGB_GRID0_ROW;
+
__override const struct ec_response_keybd_config
*board_vivaldi_keybd_config(void)
{