Skip to content

Commit

Permalink
Add mediatek_i2c_spi interface
Browse files Browse the repository at this point in the history
Add a spi_master interface supporting MediaTek MST9U ISP mode.

Autodetect the bus type via I2C_FUNC_I2C, and use the appropriate
read/write commands, in case the MST9U is attached to smbus.

TEST=Successfully programmed SPI on test hardware.

Change-Id: I24adb14e7b4f7160e1c3ff941774064d5a81e820
Signed-off-by: Neill Corlett <[email protected]>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/61288
Tested-by: build bot (Jenkins) <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
  • Loading branch information
Neill Corlett authored and Edward O'Callaghan committed Feb 1, 2022
1 parent 55aa056 commit e98b2d1
Show file tree
Hide file tree
Showing 6 changed files with 531 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ CONFIG_STLINKV3_SPI ?= yes
# Disables LSPCON support until the i2c helper supports multiple systems.
CONFIG_LSPCON_I2C_SPI ?= no

# Disables MediaTek support until the i2c helper supports multiple systems.
CONFIG_MEDIATEK_I2C_SPI ?= no

# Disables REALTEK_MST support until the i2c helper supports multiple systems.
CONFIG_REALTEK_MST_I2C_SPI ?= no

Expand Down Expand Up @@ -698,6 +701,11 @@ FEATURE_FLAGS += -D'CONFIG_LSPCON_I2C_SPI=1'
PROGRAMMER_OBJS += lspcon_i2c_spi.o
endif

ifeq ($(CONFIG_MEDIATEK_I2C_SPI), yes)
FEATURE_FLAGS += -D'CONFIG_MEDIATEK_I2C_SPI=1'
PROGRAMMER_OBJS += mediatek_i2c_spi.o
endif

ifeq ($(CONFIG_REALTEK_MST_I2C_SPI), yes)
FEATURE_FLAGS += -D'CONFIG_REALTEK_MST_I2C_SPI=1'
PROGRAMMER_OBJS += realtek_mst_i2c_spi.o
Expand Down
Loading

0 comments on commit e98b2d1

Please sign in to comment.