1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

buspirate_spi: Tristate IOs when using using pullup=on

Avoid putting 3.3V on IO pins when pullup=on to avoid damage to 1.8V
chips.

Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Change-Id: I9ac4c6b7a0079bb1022f2d70030a6eb29996108f
Reviewed-on: https://review.coreboot.org/23864
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Maxime Vincent 2017-11-24 13:04:08 +01:00 committed by Nico Huber
parent 2568357872
commit 2099c648b9

View File

@ -543,6 +543,10 @@ int buspirate_spi_init(void)
/* Set SPI config: output type, idle, clock edge, sample */
bp_commbuf[0] = 0x80 | 0xa;
if (pullup == 1) {
bp_commbuf[0] &= ~(1 << 3);
msg_pdbg("Pull-ups enabled, so using HiZ pin output! (Open-Drain mode)\n");
}
ret = buspirate_sendrecv(bp_commbuf, 1, 1);
if (ret)
return 1;