mb/google/geralt: Enable Chrome EC
Initialize SPI bus 0 for Chrome EC control. TEST=build pass BUG=b:236331724 Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com> Change-Id: I6de5ea8a0273a3b0c725e4cdbcf69f4db74c5db7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66272 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
4c24606637
commit
1250820916
|
@ -8,17 +8,22 @@ if BOARD_GOOGLE_GERALT_COMMON
|
||||||
|
|
||||||
config VBOOT
|
config VBOOT
|
||||||
select VBOOT_VBNV_FLASH
|
select VBOOT_VBNV_FLASH
|
||||||
|
select EC_GOOGLE_CHROMEEC_SWITCHES
|
||||||
|
|
||||||
config BOARD_SPECIFIC_OPTIONS
|
config BOARD_SPECIFIC_OPTIONS
|
||||||
def_bool y
|
def_bool y
|
||||||
select SOC_MEDIATEK_MT8188
|
select SOC_MEDIATEK_MT8188
|
||||||
select BOARD_ROMSIZE_KB_8192
|
select BOARD_ROMSIZE_KB_8192
|
||||||
select MAINBOARD_HAS_CHROMEOS
|
select MAINBOARD_HAS_CHROMEOS
|
||||||
|
select CHROMEOS_USE_EC_WATCHDOG_FLAG if CHROMEOS
|
||||||
select COMMON_CBFS_SPI_WRAPPER
|
select COMMON_CBFS_SPI_WRAPPER
|
||||||
select SPI_FLASH
|
select SPI_FLASH
|
||||||
select SPI_FLASH_INCLUDE_ALL_DRIVERS
|
select SPI_FLASH_INCLUDE_ALL_DRIVERS
|
||||||
select COMMONLIB_STORAGE
|
select COMMONLIB_STORAGE
|
||||||
select COMMONLIB_STORAGE_MMC
|
select COMMONLIB_STORAGE_MMC
|
||||||
|
select EC_GOOGLE_CHROMEEC
|
||||||
|
select EC_GOOGLE_CHROMEEC_BOARDID
|
||||||
|
select EC_GOOGLE_CHROMEEC_SPI
|
||||||
|
|
||||||
config MAINBOARD_DIR
|
config MAINBOARD_DIR
|
||||||
string
|
string
|
||||||
|
@ -31,4 +36,8 @@ config MAINBOARD_PART_NUMBER
|
||||||
config BOOT_DEVICE_SPI_FLASH_BUS
|
config BOOT_DEVICE_SPI_FLASH_BUS
|
||||||
int
|
int
|
||||||
default 7
|
default 7
|
||||||
|
|
||||||
|
config EC_GOOGLE_CHROMEEC_SPI_BUS
|
||||||
|
hex
|
||||||
|
default 0x0
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -6,5 +6,6 @@
|
||||||
|
|
||||||
void bootblock_mainboard_init(void)
|
void bootblock_mainboard_init(void)
|
||||||
{
|
{
|
||||||
|
mtk_spi_init(CONFIG_EC_GOOGLE_CHROMEEC_SPI_BUS, SPI_PAD0_MASK, 3 * MHz, 0);
|
||||||
mtk_snfc_init();
|
mtk_snfc_init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,3 @@ void fill_lb_gpios(struct lb_gpios *gpios)
|
||||||
{
|
{
|
||||||
/* TODO: add Chrome specific gpios */
|
/* TODO: add Chrome specific gpios */
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_recovery_mode_switch(void)
|
|
||||||
{
|
|
||||||
/* TODO: use Chrome EC switches when EC support is added */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#ifndef __MAINBOARD_GOOGLE_GERALT_GPIO_H__
|
||||||
|
#define __MAINBOARD_GOOGLE_GERALT_GPIO_H__
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define GPIO_AP_EC_WARM_RST_REQ GPIO(DPI_HSYNC)
|
||||||
|
|
||||||
|
void setup_chromeos_gpios(void);
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,8 +1,11 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <gpio.h>
|
||||||
#include <reset.h>
|
#include <reset.h>
|
||||||
|
|
||||||
|
#include "gpio.h"
|
||||||
|
|
||||||
void do_board_reset(void)
|
void do_board_reset(void)
|
||||||
{
|
{
|
||||||
/* TODO: add reset function when gpio is ready */
|
gpio_output(GPIO_AP_EC_WARM_RST_REQ, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue