From fb5fa1abe7a17caf29c387cb6864b85b1479822b Mon Sep 17 00:00:00 2001 From: Trevor Wu Date: Thu, 6 May 2021 14:07:12 +0800 Subject: mb/google/cherry: Support audio Add GPIO "beep enable" for switching on and off. Signed-off-by: Trevor Wu Change-Id: Iddb781e30fa90f05767cceeb83e623432540dcc0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/54739 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/mainboard/google/cherry/chromeos.c | 2 ++ src/mainboard/google/cherry/gpio.h | 1 + 2 files changed, 3 insertions(+) (limited to 'src/mainboard') diff --git a/src/mainboard/google/cherry/chromeos.c b/src/mainboard/google/cherry/chromeos.c index 03e44d5ac2..8d4335492c 100644 --- a/src/mainboard/google/cherry/chromeos.c +++ b/src/mainboard/google/cherry/chromeos.c @@ -12,6 +12,7 @@ void setup_chromeos_gpios(void) gpio_input(GPIO_WP); gpio_input_pullup(GPIO_EC_AP_INT); gpio_input_pullup(GPIO_SD_CD); + gpio_output(GPIO_BEEP_ON, 0); gpio_input_pullup(GPIO_EC_IN_RW); gpio_input_pullup(GPIO_GSC_AP_INT); gpio_output(GPIO_EN_SPK, 0); @@ -23,6 +24,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) struct lb_gpio chromeos_gpios[] = { {GPIO_EC_AP_INT.id, ACTIVE_LOW, -1, "EC interrupt"}, {GPIO_SD_CD.id, ACTIVE_LOW, -1, "SD card detect"}, + {GPIO_BEEP_ON.id, ACTIVE_HIGH, -1, "beep enable"}, {GPIO_EC_IN_RW.id, ACTIVE_LOW, -1, "EC in RW"}, {GPIO_GSC_AP_INT.id, ACTIVE_LOW, -1, "TPM interrupt"}, {GPIO_EN_SPK.id, ACTIVE_HIGH, -1, "speaker enable"}, diff --git a/src/mainboard/google/cherry/gpio.h b/src/mainboard/google/cherry/gpio.h index 28e11869a8..f07fa38dc9 100644 --- a/src/mainboard/google/cherry/gpio.h +++ b/src/mainboard/google/cherry/gpio.h @@ -8,6 +8,7 @@ #define GPIO_EC_AP_INT GPIO(GPIO_04) #define GPIO_WP GPIO(GPIO_05) #define GPIO_SD_CD GPIO(I2SO1_D1) +#define GPIO_BEEP_ON GPIO(DMIC1_DAT) #define GPIO_EC_IN_RW GPIO(DGI_D10) #define GPIO_GSC_AP_INT GPIO(DGI_D11) #define GPIO_EN_SPK GPIO(UART1_RTS) -- cgit v1.2.3