summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParth Malkan <parthmalkan@google.com>2022-02-15 10:01:10 -0800
committerCommit Bot <commit-bot@chromium.org>2022-02-24 06:41:27 +0000
commitb5ee4bed214d89e120e407392950d3ad7a49a0f4 (patch)
treefb31cb4a66dcf8f63d50379212e80d4b29e85312
parent2be43328c1e23c0004263c95e1678e14b8a4d67e (diff)
downloadchrome-ec-b5ee4bed214d89e120e407392950d3ad7a49a0f4.tar.gz
taniks: Enable CONFIG_KEYBOARD_SCAN_ADC
Enable scan adc config, refresh row3 config and initialize ksi_threshold_mv value Also map board specific GPIO macro names to match common code requirements BUG=b:208773873 TEST=make -j buildall BRANCH=none Cq-Depend: chromium:3463081 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: I9adf6b773b26de5ca94e0c96959bfcdc36c17a49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3465515 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Arthur Lin <arthur.lin@lcfc.corp-partner.google.com>
-rw-r--r--board/taniks/board.c8
-rw-r--r--board/taniks/board.h27
-rw-r--r--board/taniks/keyboard.c1
3 files changed, 29 insertions, 7 deletions
diff --git a/board/taniks/board.c b/board/taniks/board.c
index f668662958..3d6ba7672d 100644
--- a/board/taniks/board.c
+++ b/board/taniks/board.c
@@ -20,6 +20,7 @@
#include "driver/als_tcs3400.h"
#include "fw_config.h"
#include "hooks.h"
+#include "keyboard_raw.h"
#include "lid_switch.h"
#include "power_button.h"
#include "power.h"
@@ -122,11 +123,6 @@ int board_is_vbus_too_low(int port, enum chg_ramp_vbus_state ramp_state)
#endif /* CONFIG_CHARGE_RAMP_SW */
-void keyboard_raw_enable_interrupt(int enable)
-{
-
-}
-
enum battery_present battery_hw_present(void)
{
/* The GPIO is low when the battery is physically present */
@@ -145,4 +141,4 @@ __override void board_set_charge_limit(int port, int supplier, int charge_ma,
charge_set_input_current_limit(MAX(charge_ma,
CONFIG_CHARGER_INPUT_CURRENT),
charge_mv);
-} \ No newline at end of file
+}
diff --git a/board/taniks/board.h b/board/taniks/board.h
index 9bab363f6f..1ca9a53a09 100644
--- a/board/taniks/board.h
+++ b/board/taniks/board.h
@@ -17,6 +17,8 @@
#define CONFIG_KEYBOARD_VIVALDI
#undef CONFIG_VOLUME_BUTTONS
#define NPCX_SELECT_KSI_TO_GPIO
+#define CONFIG_KEYBOARD_REFRESH_ROW3
+#define CONFIG_KEYBOARD_SCAN_ADC
/* Baseboard features */
#include "baseboard.h"
@@ -125,7 +127,30 @@
#define GPIO_EC_INT_L GPIO_EC_PCH_INT_ODL
#define GPIO_ENABLE_BACKLIGHT GPIO_EC_EN_EDP_BL
#define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW
-#define GPIO_KBD_KSO2 GPIO_EC_KSO_02_INV
+#define GPIO_KSI_00 GPIO_EC_KSI_00
+#define GPIO_KSI_01 GPIO_EC_KSI_01
+#define GPIO_KSI_02 GPIO_EC_KSI_02
+#define GPIO_KSI_03 GPIO_EC_KSI_03
+#define GPIO_KSI_04 GPIO_EC_KSI_04
+#define GPIO_KSI_05 GPIO_EC_KSI_05
+#define GPIO_KSI_06 GPIO_EC_KSI_06
+#define GPIO_KSI_07 GPIO_EC_KSI_07
+#define GPIO_KSO_00 GPIO_EC_KSO_00
+#define GPIO_KSO_01 GPIO_EC_KSO_01
+#define GPIO_KSO_02 GPIO_EC_KSO_02_R
+#define GPIO_KSO_03 GPIO_EC_KSO_03
+#define GPIO_KSO_04 GPIO_EC_KSO_04
+#define GPIO_KSO_05 GPIO_EC_KSO_05
+#define GPIO_KSO_06 GPIO_EC_KSO_06_R
+#define GPIO_KSO_07 GPIO_EC_KSO_07_R
+#define GPIO_KSO_08 GPIO_EC_KSO_08
+#define GPIO_KSO_09 GPIO_EC_KSO_09
+#define GPIO_KSO_10 GPIO_EC_KSO_10
+#define GPIO_KSO_11 GPIO_EC_KSO_11
+#define GPIO_KSO_12 GPIO_EC_KSO_12
+#define GPIO_KSO_13 GPIO_EC_KSO_13
+#define GPIO_KSO_14 GPIO_EC_KSO_14
+#define GPIO_RFR_KEY_L GPIO_EC_RFR_KEY_ODL_R
#define GPIO_PACKET_MODE_EN GPIO_EC_GSC_PACKET_MODE
#define GPIO_PCH_PWRBTN_L GPIO_EC_PCH_PWR_BTN_ODL
#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L
diff --git a/board/taniks/keyboard.c b/board/taniks/keyboard.c
index f8f24efb18..715999e802 100644
--- a/board/taniks/keyboard.c
+++ b/board/taniks/keyboard.c
@@ -22,6 +22,7 @@ __override struct keyboard_scan_config keyscan_config = {
0x1c, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff,
0xa4, 0xff, 0xfe, 0x55, 0xfe, 0xff, 0xff, 0xff, /* full set */
},
+ .ksi_threshold_mv = 1000,
};
static const struct ec_response_keybd_config taniks_kb = {