#include <assert.h>
#include <console/console.h>
#include <device/mmio.h>
#include <spi_flash.h>
#include <soc/addressmap.h>
#include <soc/flash_controller_common.h>
#include <soc/gpio.h>
#include <soc/spi.h>
Go to the source code of this file.
◆ PAD_FUNC
Definition at line 50 of file spi.c.
◆ PAD_FUNC_GPIO
Definition at line 52 of file spi.c.
◆ PAD_FUNC_SEL
#define PAD_FUNC_SEL |
( |
|
name, |
|
|
|
func, |
|
|
|
sel |
|
) |
| {GPIO(name), PAD_##name##_FUNC_##func, sel} |
Definition at line 51 of file spi.c.
◆ mtk_snfc_init()
void mtk_snfc_init |
( |
int |
gpio_set | ) |
|
Definition at line 141 of file spi.c.
References ARRAY_SIZE, assert, BIOS_DEBUG, BIOS_WARNING, pad_func::func, GPIO_DRV_8_MA, gpio_get_driving(), GPIO_PULL_ENABLE, gpio_set(), gpio_set_driving(), gpio_set_mode(), gpio_set_pull(), nor_pinmux, NULL, printk, pad_func::select, and SPI_NOR_GPIO_SET_NUM.
Referenced by bootblock_mainboard_init().
◆ mtk_spi_set_gpio_pinmux()
◆ nor_pinmux
◆ pad0_funcs
◆ pad1_funcs
◆ spi_bus
Initial value:= {
{
.cs_gpio =
GPIO(SPI0_CSB),
},
{
.cs_gpio =
GPIO(SPI1_CSB),
},
{
.cs_gpio =
GPIO(SPI2_CSB),
},
{
.cs_gpio =
GPIO(SPI3_CSB),
},
{
},
{
.cs_gpio =
GPIO(SPI5_CSB),
}
}
Definition at line 1 of file spi.c.
◆ spi_ctrlr_bus_map
Initial value:= {
{
.bus_start = 0,
},
{
.bus_start = CONFIG_BOOT_DEVICE_SPI_FLASH_BUS,
.bus_end = CONFIG_BOOT_DEVICE_SPI_FLASH_BUS,
},
}
Definition at line 162 of file spi.c.
◆ spi_ctrlr_bus_map_count
◆ spi_flash_ctrlr
Initial value:= {
.max_xfer_size = 65535,
}
int mtk_spi_flash_probe(const struct spi_slave *spi, struct spi_flash *flash)
Definition at line 162 of file spi.c.