coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
spi.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef MTK_MT8173_SPI_H
4 #define MTK_MT8173_SPI_H
5 
6 #include <soc/spi_common.h>
7 
8 #define SPI_BUS_NUMBER 1
9 
10 #define GET_SCK_REG(x) x->spi_cfg0_reg
11 
12 DEFINE_BITFIELD(SPI_CFG_SCK_HIGH, 7, 0)
13 DEFINE_BITFIELD(SPI_CFG_SCK_LOW, 15, 8)
14 DEFINE_BITFIELD(SPI_CFG_CS_HOLD, 23, 16)
15 DEFINE_BITFIELD(SPI_CFG_CS_SETUP, 31, 24)
16 
17 DEFINE_BITFIELD(SPI_CFG1_CS_IDLE, 7, 0)
18 DEFINE_BITFIELD(SPI_CFG1_PACKET_LOOP, 15, 8)
19 DEFINE_BITFIELD(SPI_CFG1_PACKET_LENGTH, 28, 16)
20 DEFINE_BITFIELD(SPI_CFG1_TICK_DLY, 31, 29)
21 
22 #endif
#define DEFINE_BITFIELD(name, high_bit, low_bit)
Definition: mmio.h:124