summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2020-03-26 00:00:41 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2020-05-04 00:52:42 +0000
commitd97f87b00cc8301b91023301a24e690146d74cef (patch)
tree17b3fe03e064bcafbdc74d3473a80983ee9ec0ff /flashrom.c
parent3ef0df067b4f14c230a411b2e3726492e60ae24b (diff)
downloadflashrom-d97f87b00cc8301b91023301a24e690146d74cef.tar.gz
flashrom-d97f87b00cc8301b91023301a24e690146d74cef.tar.bz2
flashrom-d97f87b00cc8301b91023301a24e690146d74cef.zip
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 <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/40667 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Shiyu Sun <sshiyu@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c12
1 files changed, 12 insertions, 0 deletions
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",