From d97f87b00cc8301b91023301a24e690146d74cef Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Thu, 26 Mar 2020 00:00:41 +1100 Subject: Initial Realtek MST i2c_spi support This spi master allows for programming of a Realtek RTD2142 MST with external SPI flash chip routed via its internal i2c transport mechanism. BUG=b:152558985,b:148745673 BRANCH=none TEST=echo "00000000:0004ffff fw" > layout && \ flashrom -p realtek_mst_i2c_spi:bus=8 -l layout -i fw:dump.bin -r && \ flashrom -p realtek_mst_i2c_spi:bus=8 -l layout -i fw:dump.bin -w && \ flashrom -p realtek_mst_i2c_spi:bus=8 --flash-size && \ flashrom -p realtek_mst_i2c_spi:bus=8 --flash-name Change-Id: I892e0be776fe605e69fb39c77abf3016591d7123 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/40667 Reviewed-by: Edward Hill Reviewed-by: Shiyu Sun Tested-by: build bot (Jenkins) --- flashrom.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'flashrom.c') diff --git a/flashrom.c b/flashrom.c index 07ce734ba..4a3098616 100644 --- a/flashrom.c +++ b/flashrom.c @@ -401,6 +401,18 @@ const struct programmer_entry programmer_table[] = { }, #endif +#if CONFIG_REALTEK_MST_I2C_SPI == 1 + { + .name = "realtek_mst_i2c_spi", + .type = OTHER, + .devs.note = "Device files /dev/i2c-*.\n", + .init = realtek_mst_i2c_spi_init, + .map_flash_region = fallback_map, + .unmap_flash_region = fallback_unmap, + .delay = internal_delay, + }, +#endif + #if CONFIG_USBBLASTER_SPI == 1 { .name = "usbblaster_spi", -- cgit v1.2.3