diff --git a/src/mainboard/google/bluey/board.h b/src/mainboard/google/bluey/board.h index 0544381e69..361aa6587c 100644 --- a/src/mainboard/google/bluey/board.h +++ b/src/mainboard/google/bluey/board.h @@ -28,6 +28,10 @@ #endif /* Soundwire AMP GPIOs */ +#define GPIO_SNDW_0_SCL GPIO(202) +#define GPIO_FUN_SNDW_0_SCL 4 /* 4=LPASS_10:WSA_SWR_CLK, Also try 1=ENTERPRISEMGMT_11 */ +#define GPIO_SNDW_0_SDA GPIO(203) +#define GPIO_FUN_SNDW_0_SDA 3 /* 3=LPASS_11:WSA_SWR_DATA */ #define GPIO_SNDW_AMP_0_ENABLE GPIO(204) #define GPIO_SNDW_AMP_1_ENABLE GPIO(205) diff --git a/src/mainboard/google/bluey/chromeos.c b/src/mainboard/google/bluey/chromeos.c index 0f2b7da21f..e8609d4c06 100644 --- a/src/mainboard/google/bluey/chromeos.c +++ b/src/mainboard/google/bluey/chromeos.c @@ -21,9 +21,6 @@ void setup_chromeos_gpios(void) gpio_input_irq(GPIO_FPMCU_INT, IRQ_TYPE_LEVEL, GPIO_PULL_UP); } } - - gpio_output(GPIO_SNDW_AMP_0_ENABLE, 0); - gpio_output(GPIO_SNDW_AMP_1_ENABLE, 0); } void fill_lb_gpios(struct lb_gpios *gpios) diff --git a/src/mainboard/google/bluey/mainboard.c b/src/mainboard/google/bluey/mainboard.c index ac80ceef80..3bc7557519 100644 --- a/src/mainboard/google/bluey/mainboard.c +++ b/src/mainboard/google/bluey/mainboard.c @@ -92,6 +92,25 @@ static void setup_usb_typec(void) gpio_output(GPIO_USB_C1_RETIMER_RESET_L, 1); } +static void setup_audio_gpios(void) +{ + gpio_configure_no_egpio(GPIO_SNDW_AMP_0_ENABLE, GPIO_FUNC_GPIO, + GPIO_NO_PULL, GPIO_2MA, GPIO_OUTPUT); + gpio_set(GPIO_SNDW_AMP_0_ENABLE, 0); + gpio_configure_no_egpio(GPIO_SNDW_AMP_1_ENABLE, GPIO_FUNC_GPIO, + GPIO_NO_PULL, GPIO_2MA, GPIO_OUTPUT); + gpio_set(GPIO_SNDW_AMP_1_ENABLE, 0); + gpio_configure_no_egpio(GPIO_SNDW_0_SCL, GPIO_FUN_SNDW_0_SCL, + GPIO_NO_PULL, GPIO_16MA, GPIO_OUTPUT); + gpio_configure_no_egpio(GPIO_SNDW_0_SDA, GPIO_FUN_SNDW_0_SDA, + GPIO_NO_PULL, GPIO_16MA, GPIO_OUTPUT); +} + +static void setup_audio(void) +{ + setup_audio_gpios(); +} + static void setup_usb(void) { setup_usb_typec(); @@ -236,6 +255,9 @@ static void mainboard_init(struct device *dev) /* Setup USB related initial config */ setup_usb(); + + /* Setup audio related initial config */ + setup_audio(); } static void mainboard_enable(struct device *dev)