| 1 |
|
| 2 |
|
| 3 |
#include <bootblock_common.h> |
| 4 |
#include <gpio.h> |
| 5 |
#include <soc/gpio.h> |
| 6 |
#include <soc/i2c.h> |
| 7 |
#include <soc/spi.h> |
| 8 |
|
| 9 |
#include "gpio.h" |
| 10 |
|
| 11 |
static void usb3_hub_reset(void) |
| 12 |
{ |
| 13 |
gpio_output(GPIO_USB3_HUB_RST_L, 1); |
| 14 |
} |
| 15 |
|
| 16 |
void bootblock_mainboard_init(void) |
| 17 |
{ |
| 18 |
mtk_i2c_bus_init(CONFIG_DRIVER_TPM_I2C_BUS, I2C_SPEED_FAST_PLUS); |
| 19 |
mtk_spi_init(CONFIG_EC_GOOGLE_CHROMEEC_SPI_BUS, SPI_PAD0_MASK, 3 * MHz, 0); |
| 20 |
mtk_snfc_init(); |
| 21 |
usb3_hub_reset(); |
| 22 |
setup_chromeos_gpios(); |
| 23 |
gpio_eint_configure(GPIO_GSC_AP_INT_ODL, IRQ_TYPE_EDGE_RISING); |
| 24 |
} |