mb/google/bluey: Make GPIO setups conditional on Kconfig options
The `EC_GOOGLE_CHROMEEC_SPI_BUS` Kconfig and the `GPIO_AP_EC_INT` setup in `chromeos.c` are now dependent on `EC_GOOGLE_CHROMEEC`. Similarly, the `MAINBOARD_GPIO_PIN_FOR_GSC_AP_INTERRUPT` Kconfig and the `GPIO_GSC_AP_INT` setup are now dependent on `TPM_GOOGLE_TI50`. This ensures that GPIOs are only configured if their respective features are enabled, preventing potential issues when they are disabled. BUG=b:404985109 TEST=Able to build google/bluey. Change-Id: I44525dd008c42c42aa7e5c4a4f290b09312ed269 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/87674 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
4e8ea210bb
commit
e8450f78a0
2 changed files with 10 additions and 2 deletions
|
|
@ -83,10 +83,12 @@ config DRIVER_TPM_I2C_ADDR
|
|||
default 0x50
|
||||
|
||||
config EC_GOOGLE_CHROMEEC_SPI_BUS
|
||||
depends on EC_GOOGLE_CHROMEEC
|
||||
hex
|
||||
default 0xb
|
||||
|
||||
config MAINBOARD_GPIO_PIN_FOR_GSC_AP_INTERRUPT
|
||||
depends on TPM_GOOGLE_TI50
|
||||
int
|
||||
default 34
|
||||
help
|
||||
|
|
|
|||
|
|
@ -7,9 +7,11 @@
|
|||
|
||||
void setup_chromeos_gpios(void)
|
||||
{
|
||||
gpio_input_pullup(GPIO_AP_EC_INT);
|
||||
if (CONFIG(EC_GOOGLE_CHROMEEC))
|
||||
gpio_input_pullup(GPIO_AP_EC_INT);
|
||||
|
||||
gpio_input_irq(GPIO_GSC_AP_INT, IRQ_TYPE_RISING_EDGE, GPIO_PULL_UP);
|
||||
if (CONFIG(TPM_GOOGLE_TI50))
|
||||
gpio_input_irq(GPIO_GSC_AP_INT, IRQ_TYPE_RISING_EDGE, GPIO_PULL_UP);
|
||||
|
||||
if (CONFIG(MAINBOARD_HAS_FINGERPRINT)) {
|
||||
gpio_output(GPIO_FP_RST_L, 0);
|
||||
|
|
@ -28,10 +30,14 @@ void fill_lb_gpios(struct lb_gpios *gpios)
|
|||
{
|
||||
/* TODO: Add required GPIO after referring to the schematics */
|
||||
const struct lb_gpio chromeos_gpios[] = {
|
||||
#if CONFIG(EC_GOOGLE_CHROMEEC)
|
||||
{GPIO_AP_EC_INT.addr, ACTIVE_LOW, gpio_get(GPIO_AP_EC_INT),
|
||||
"EC interrupt"},
|
||||
#endif
|
||||
#if CONFIG(TPM_GOOGLE_TI50)
|
||||
{GPIO_GSC_AP_INT.addr, ACTIVE_HIGH, gpio_get(GPIO_GSC_AP_INT),
|
||||
"TPM interrupt"},
|
||||
#endif
|
||||
{GPIO_SNDW_AMP_0_ENABLE.addr, ACTIVE_HIGH, gpio_get(GPIO_SNDW_AMP_0_ENABLE),
|
||||
"Speaker 0 enable"},
|
||||
{GPIO_SNDW_AMP_1_ENABLE.addr, ACTIVE_HIGH, gpio_get(GPIO_SNDW_AMP_1_ENABLE),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue