mb/google/geralt: Pass SD card detect GPIO to payloads
1. Add an option for SD card initialization. 2. If CONFIG SDCARD_INIT is configured, pass SD card detect GPIO to payloads for SD card detection and initialize MSDC for SD card configuration. BUG=b:244250437 TEST=build pass Signed-off-by: Liju-Clr Chen <liju-clr.chen@mediatek.com> Change-Id: I2d3683eb673f438c9190c11d4679a3ca97c76a98 Reviewed-on: https://review.coreboot.org/c/coreboot/+/71136 Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
d252776668
commit
aa9bb44504
|
@ -55,4 +55,8 @@ config DRIVER_TPM_I2C_BUS
|
||||||
config DRIVER_TPM_I2C_ADDR
|
config DRIVER_TPM_I2C_ADDR
|
||||||
hex
|
hex
|
||||||
default 0x50
|
default 0x50
|
||||||
|
|
||||||
|
config SDCARD_INIT
|
||||||
|
bool
|
||||||
|
default y
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -31,6 +31,13 @@ void fill_lb_gpios(struct lb_gpios *gpios)
|
||||||
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
|
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
|
||||||
|
|
||||||
fill_lp_backlight_gpios(gpios);
|
fill_lp_backlight_gpios(gpios);
|
||||||
|
|
||||||
|
if (CONFIG(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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int tis_plat_irq_status(void)
|
int tis_plat_irq_status(void)
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
#define GPIO_MIPI_BL_PWM_1V8 GPIO(DISP_PWM0)
|
#define GPIO_MIPI_BL_PWM_1V8 GPIO(DISP_PWM0)
|
||||||
|
|
||||||
|
#define GPIO_SD_CD_ODL GPIO(I2SIN_MCK)
|
||||||
|
|
||||||
void setup_chromeos_gpios(void);
|
void setup_chromeos_gpios(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,7 +19,10 @@ static void mainboard_init(struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
mtk_msdc_configure_emmc(true);
|
mtk_msdc_configure_emmc(true);
|
||||||
|
|
||||||
|
if (CONFIG(SDCARD_INIT))
|
||||||
mtk_msdc_configure_sdcard();
|
mtk_msdc_configure_sdcard();
|
||||||
|
|
||||||
setup_usb_host();
|
setup_usb_host();
|
||||||
|
|
||||||
if (CONFIG(ARM64_USE_ARM_TRUSTED_FIRMWARE))
|
if (CONFIG(ARM64_USE_ARM_TRUSTED_FIRMWARE))
|
||||||
|
|
Loading…
Reference in New Issue