diff options
author | Julius Werner <jwerner@chromium.org> | 2023-11-14 16:23:06 -0800 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2023-11-22 01:50:24 +0000 |
commit | 0712851ca313e0b8ae70d06d7792e97c8e0c5c3b (patch) | |
tree | 227f277bd19783c209d0c2f272029b91064c33ba /src/mainboard/google/geralt | |
parent | 53b79bef610d00c500d2acec7da6eb02e809fcf6 (diff) |
google/*: Clean up Kconfg board selection for Google MTK boards
This patch tries to standardize and simplify the Kconfig option layout
for Google boards with MediaTek SoCs and align them to the scheme used
with other Arm-based Google boards.
Change-Id: I40880e7609ba703d0053ad01da742871e54d4e7a
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79063
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Diffstat (limited to 'src/mainboard/google/geralt')
-rw-r--r-- | src/mainboard/google/geralt/Kconfig | 35 | ||||
-rw-r--r-- | src/mainboard/google/geralt/chromeos.c | 6 | ||||
-rw-r--r-- | src/mainboard/google/geralt/mainboard.c | 4 |
3 files changed, 16 insertions, 29 deletions
diff --git a/src/mainboard/google/geralt/Kconfig b/src/mainboard/google/geralt/Kconfig index c4224412a5..feac88a102 100644 --- a/src/mainboard/google/geralt/Kconfig +++ b/src/mainboard/google/geralt/Kconfig @@ -1,16 +1,20 @@ ## SPDX-License-Identifier: GPL-2.0-only -# Umbrella option to be selected by variant boards. config BOARD_GOOGLE_GERALT_COMMON - def_bool n + def_bool BOARD_GOOGLE_CIRI || \ + BOARD_GOOGLE_GERALT -config BOARD_GOOGLE_GERALT - select BOARD_GOOGLE_GERALT_COMMON +if BOARD_GOOGLE_GERALT_COMMON -config BOARD_GOOGLE_CIRI - select BOARD_GOOGLE_GERALT_COMMON +config GERALT_SDCARD_INIT + def_bool BOARD_GOOGLE_GERALT -if BOARD_GOOGLE_GERALT_COMMON +config GERALT_USE_MAX98390 + def_bool BOARD_GOOGLE_CIRI || \ + BOARD_GOOGLE_GERALT + +config GERALT_USE_NAU8318 + def_bool n config VBOOT select VBOOT_VBNV_FLASH @@ -66,21 +70,4 @@ config DRIVER_TPM_I2C_ADDR hex default 0x50 -config SDCARD_INIT - bool - default y if BOARD_GOOGLE_GERALT - default n if BOARD_GOOGLE_CIRI - -choice - prompt "Speaker AMP for Geralt" - default USE_MAX98390 if BOARD_GOOGLE_GERALT || BOARD_GOOGLE_CIRI - -config USE_MAX98390 - bool "MAX98390" - -config USE_NAU8318 - bool "NAU8318" - -endchoice - endif diff --git a/src/mainboard/google/geralt/chromeos.c b/src/mainboard/google/geralt/chromeos.c index 1144701ea3..d66b7d5233 100644 --- a/src/mainboard/google/geralt/chromeos.c +++ b/src/mainboard/google/geralt/chromeos.c @@ -46,19 +46,19 @@ void fill_lb_gpios(struct lb_gpios *gpios) fill_lp_backlight_gpios(gpios); - if (CONFIG(SDCARD_INIT)) { + if (CONFIG(GERALT_SDCARD_INIT)) { struct lb_gpio sd_card_gpios[] = { {GPIO_SD_CD_ODL.id, ACTIVE_LOW, -1, "SD card detect"}, }; lb_add_gpios(gpios, sd_card_gpios, ARRAY_SIZE(sd_card_gpios)); } - if (CONFIG(USE_MAX98390)) { + if (CONFIG(GERALT_USE_MAX98390)) { struct lb_gpio max98390_gpios[] = { {GPIO_RST_SPKR_L.id, ACTIVE_LOW, -1, "speaker reset"}, }; lb_add_gpios(gpios, max98390_gpios, ARRAY_SIZE(max98390_gpios)); - } else if (CONFIG(USE_NAU8318)) { + } else if (CONFIG(GERALT_USE_NAU8318)) { struct lb_gpio nau8318_gpios[] = { {GPIO_EN_SPKR.id, ACTIVE_HIGH, -1, "speaker enable"}, {GPIO_BEEP_ON_OD.id, ACTIVE_HIGH, -1, "beep enable"}, diff --git a/src/mainboard/google/geralt/mainboard.c b/src/mainboard/google/geralt/mainboard.c index 4042dcefef..6bb8380a64 100644 --- a/src/mainboard/google/geralt/mainboard.c +++ b/src/mainboard/google/geralt/mainboard.c @@ -31,7 +31,7 @@ static void configure_i2s(void) static void configure_audio(void) { - if (CONFIG(USE_MAX98390)) { + if (CONFIG(GERALT_USE_MAX98390)) { printk(BIOS_DEBUG, "Configure MAX98390 audio\n"); mtk_i2c_bus_init(I2C0, I2C_SPEED_FAST); @@ -54,7 +54,7 @@ static void mainboard_init(struct device *dev) configure_audio(); - if (CONFIG(SDCARD_INIT)) + if (CONFIG(GERALT_SDCARD_INIT)) mtk_msdc_configure_sdcard(); setup_usb_host(); |