From 45e91a278cd31019ad6ed5a465661001fbaee065 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Mon, 4 Jun 2018 13:46:29 +0100 Subject: programmer: Add Developerbox/CP2104 bit bang driver The 96Boards Developerbox (a.k.a. Synquacer E-series) provides a CP2102 debug UART with its GPIO pins hooked up to the SPI NOR FLASH. The circuit is intended to provide emergency recovery functions without requiring any additional tools (such as a JTAG or SPI programmer). This was expected to be very slow (and it is) but CP2102 is much cheaper than a full dual channel USB comms chip. Read performance is roughly on par with a 2400 baud modem (between 60 and 70 minutes per megabyte if you prefer) and write performance is 50% slower still. The full recovery process, with backup and verification of 4MB data written takes between 14 and 15 hours. Thus it is only really practical as an emergency recovery tool, firmware developers will need to use an alternative programmer. Change-Id: I2547a96c1a2259ad0d52cd4b6ef42261b37cccf3 Signed-off-by: Daniel Thompson Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/26948 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Paul Menzel --- programmer.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'programmer.h') diff --git a/programmer.h b/programmer.h index 7e530b632..300cf5f16 100644 --- a/programmer.h +++ b/programmer.h @@ -73,6 +73,9 @@ enum programmer { #if CONFIG_DEDIPROG == 1 PROGRAMMER_DEDIPROG, #endif +#if CONFIG_DEVELOPERBOX_SPI == 1 + PROGRAMMER_DEVELOPERBOX_SPI, +#endif #if CONFIG_RAYER_SPI == 1 PROGRAMMER_RAYER_SPI, #endif @@ -172,6 +175,9 @@ enum bitbang_spi_master_type { #if CONFIG_OGP_SPI == 1 BITBANG_SPI_MASTER_OGP, #endif +#if CONFIG_DEVELOPERBOX_SPI == 1 + BITBANG_SPI_MASTER_DEVELOPERBOX, +#endif }; struct bitbang_spi_master { @@ -548,6 +554,12 @@ int dediprog_init(void); extern const struct dev_entry devs_dediprog[]; #endif +/* developerbox_spi.c */ +#if CONFIG_DEVELOPERBOX_SPI == 1 +int developerbox_spi_init(void); +extern const struct dev_entry devs_developerbox_spi[]; +#endif + /* ch341a_spi.c */ #if CONFIG_CH341A_SPI == 1 int ch341a_spi_init(void); -- cgit v1.2.3