mb/google/bluey: Use LPASS GPIO configure API for Soundwire GPIOs

Update the API used to configure Soundwire GPIOs to the LPASS GPIO
configure API, as these GPIOs are controlled by the LPASS subsystem.

Applies to the Soundwire amplifier GPIOs:
  - GPIO_SNDW_AMP_0_ENABLE (GPIO 204)
  - GPIO_SNDW_AMP_1_ENABLE (GPIO 205)
  - GPIO_SNDW_0_SCL (GPIO 202)
  - GPIO_SNDW_0_SDA (GPIO 203)

Test=1. Create an image.serial.bin and verify it boots successfully on
X1P42100.
2. Dump the corresponding TLMM GPIO CFG register and verify if the
eGPIO bit is disabled. The register details are part of HRD-X1P42100-S1
document.
https://docs.qualcomm.com/bundle/resource/topics/HRD-X1P42100-S1/

Change-Id: I9cc16b659fc5302ef81951ffbad8e62ce90e2890
Signed-off-by: Swathi Tamilselvan <tswathi@qualcomm.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91561
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
This commit is contained in:
Swathi Tamilselvan 2026-02-26 10:41:15 +05:30 committed by Subrata Banik
commit 6200d53e31
3 changed files with 26 additions and 3 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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)