From add4ed66679e4edf0d7e950c9329f307ae2953ef Mon Sep 17 00:00:00 2001 From: Diana Z Date: Wed, 22 Sep 2021 22:24:43 +0000 Subject: Guybrush: Add keyboard and volume buttons Add configuration for the keyboard and volume buttons. BRANCH=None BUG=b:195137794 TEST=load on guybrush, confirm volume up and down prints Signed-off-by: Diana Z Change-Id: I89306402474ec72455ff999f9da8a35b3eb4139a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3176403 Reviewed-by: Jack Rosenthal Commit-Queue: Jack Rosenthal --- zephyr/projects/guybrush/gpio.dts | 3 +++ zephyr/projects/guybrush/include/gpio_map.h | 4 +++- zephyr/projects/guybrush/prj.conf | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/zephyr/projects/guybrush/gpio.dts b/zephyr/projects/guybrush/gpio.dts index 430d4c3755..221b5f7182 100644 --- a/zephyr/projects/guybrush/gpio.dts +++ b/zephyr/projects/guybrush/gpio.dts @@ -196,10 +196,12 @@ voldn_btn_odl { gpios = <&gpioa 7 (GPIO_INPUT | GPIO_PULL_UP)>; label = "VOLDN_BTN_ODL"; + enum-name = "GPIO_VOLUME_DOWN_L"; }; volup_btn_odl { gpios = <&gpio9 3 (GPIO_INPUT | GPIO_PULL_UP)>; label = "VOLUP_BTN_ODL"; + enum-name = "GPIO_VOLUME_UP_L"; }; ec_batt_pres_odl { gpios = <&gpio9 4 GPIO_INPUT>; @@ -280,6 +282,7 @@ ec_kso_02_inv { gpios = <&gpio1 7 GPIO_OUT_LOW>; label = "EC_KSO_02_INV"; + enum-name = "GPIO_KBD_KSO2"; }; ec_espi_rst_l { gpios = <&gpio5 4 GPIO_PULL_UP>; diff --git a/zephyr/projects/guybrush/include/gpio_map.h b/zephyr/projects/guybrush/include/gpio_map.h index 78fbaf357e..5af244bead 100644 --- a/zephyr/projects/guybrush/include/gpio_map.h +++ b/zephyr/projects/guybrush/include/gpio_map.h @@ -56,6 +56,8 @@ enum power_signal { GPIO_INT(GPIO_PG_GROUPC_S0_OD, GPIO_INT_EDGE_BOTH, \ baseboard_en_pwr_pcore_s0) \ GPIO_INT(GPIO_PG_LPDDR4X_S3_OD, GPIO_INT_EDGE_BOTH, \ - baseboard_en_pwr_pcore_s0) + baseboard_en_pwr_pcore_s0) \ + GPIO_INT(GPIO_VOLUME_UP_L, GPIO_INT_EDGE_BOTH, button_interrupt) \ + GPIO_INT(GPIO_VOLUME_DOWN_L, GPIO_INT_EDGE_BOTH, button_interrupt) #endif /* __ZEPHYR_GPIO_MAP_H */ diff --git a/zephyr/projects/guybrush/prj.conf b/zephyr/projects/guybrush/prj.conf index 73ce8ba715..a9e3ce60cd 100644 --- a/zephyr/projects/guybrush/prj.conf +++ b/zephyr/projects/guybrush/prj.conf @@ -34,8 +34,10 @@ CONFIG_PLATFORM_EC_SWITCH=n # Lid switch CONFIG_PLATFORM_EC_LID_SWITCH=y -CONFIG_PLATFORM_EC_KEYBOARD=n -CONFIG_CROS_KB_RAW_NPCX=n +# Keyboard +CONFIG_PLATFORM_EC_KEYBOARD=y +CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED=y +CONFIG_PLATFORM_EC_VOLUME_BUTTONS=y # This is not yet supported CONFIG_PLATFORM_EC_ADC=n -- cgit v1.2.1