summaryrefslogtreecommitdiff
path: root/src/mainboard/google/rauru
diff options
context:
space:
mode:
authorAmanda Huang <amanda_hwang@compal.corp-partner.google.com>2024-05-29 15:39:30 +0800
committerYu-Ping Wu <yupingso@google.com>2024-10-19 04:37:22 +0000
commitff0dcfb3057ac7d03128ee7a7373a87b1bccccd2 (patch)
tree3573d480e34efe74118fef0215311ffe80fbdd47 /src/mainboard/google/rauru
parentd96cc8d2df38d1850e38da909cb7e00c2d6c50a4 (diff)
mb/google/rauru: Add NAU8318 support
NAU8318 supports beep function via GPIO control. Configure the GPIO pins and pass them to the payload. BUG=b:343143718 TEST=Verify beep function through CLI in depthcharge successfully. We can test with: firmware-shell: badusbbeep firmware-shell: devbeep Change-Id: I79277bc1947dab517dea5aba583c5b4e0ac81bc4 Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84693 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/rauru')
-rw-r--r--src/mainboard/google/rauru/chromeos.c4
-rw-r--r--src/mainboard/google/rauru/gpio.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mainboard/google/rauru/chromeos.c b/src/mainboard/google/rauru/chromeos.c
index 35bbcd67f0..863e9a26f9 100644
--- a/src/mainboard/google/rauru/chromeos.c
+++ b/src/mainboard/google/rauru/chromeos.c
@@ -8,7 +8,9 @@
void setup_chromeos_gpios(void)
{
gpio_output(GPIO_AP_FP_FW_UP_STRAP, 0);
+ gpio_output(GPIO_BEEP_ON_OD, 0);
gpio_output(GPIO_EN_PWR_FP, 0);
+ gpio_output(GPIO_EN_SPKR, 0);
gpio_output(GPIO_FP_RST_1V8_S3_L, 0);
gpio_output(GPIO_XHCI_INIT_DONE, 0);
}
@@ -17,6 +19,8 @@ void fill_lb_gpios(struct lb_gpios *gpios)
{
struct lb_gpio chromeos_gpios[] = {
{ GPIO_XHCI_INIT_DONE.id, ACTIVE_HIGH, -1, "XHCI init done" },
+ { GPIO_EN_SPKR.id, ACTIVE_HIGH, -1, "speaker enable" },
+ { GPIO_BEEP_ON_OD.id, ACTIVE_HIGH, -1, "beep enable" },
};
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
}
diff --git a/src/mainboard/google/rauru/gpio.h b/src/mainboard/google/rauru/gpio.h
index 9d0c722a65..870a02ff59 100644
--- a/src/mainboard/google/rauru/gpio.h
+++ b/src/mainboard/google/rauru/gpio.h
@@ -5,6 +5,8 @@
#include <soc/gpio.h>
+#define GPIO_BEEP_ON_OD GPIO(PERIPHERAL_EN1)
+#define GPIO_EN_SPKR GPIO(PERIPHERAL_EN0)
#define GPIO_XHCI_INIT_DONE GPIO(EINT28)
#define GPIO_FP_RST_1V8_S3_L GPIO(EINT26)
#define GPIO_AP_FP_FW_UP_STRAP GPIO(EINT27)