Attention is currently required from: Stefan Reinauer, Angel Pons.
Hello build bot (Jenkins), Stefan Reinauer, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49254
to look at the new patch set (#6).
Change subject: sysfsgpio.c implement spi interface via linux sysfs
......................................................................
sysfsgpio.c implement spi interface via linux sysfs
Linux can operate gpio through sysfs, this patch implements a bitbang
spi interface through sysfs. Through this patch, some SBC can be used
as flash programmers.
TEST=build and run flashrom with sysfsgpio on raspberrypi to read W25Q128.V
Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Signed-off-by: Xiang Wang <merle(a)hardenedliux.org>
---
M Makefile
M flashrom.c
M meson.build
M programmer.h
A sysfsgpio.c
5 files changed, 279 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/54/49254/6
--
To view, visit https://review.coreboot.org/c/flashrom/+/49254
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Gerrit-Change-Number: 49254
Gerrit-PatchSet: 6
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Xiang Wang.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49271 )
Change subject: [UNTESTED] bitbang_spi.c: Support changing clock polarity and phase
......................................................................
Patch Set 1:
(1 comment)
File bitbang_spi.c:
https://review.coreboot.org/c/flashrom/+/49271/comment/704c2248_903afe61
PS1, Line 71: cpha
> I think you need to take a closer look at https://en.wikipedia. […]
Have you tested this patch? Note that the clock phase is conditionally shifted in `bitbang_spi_send_command()`.
--
To view, visit https://review.coreboot.org/c/flashrom/+/49271
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I415a528c013f1a523e883d812b6890be39bfcc7b
Gerrit-Change-Number: 49271
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Comment-Date: Sun, 10 Jan 2021 14:13:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-MessageType: comment
Attention is currently required from: Angel Pons.
Xiang Wang has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49271 )
Change subject: [UNTESTED] bitbang_spi.c: Support changing clock polarity and phase
......................................................................
Patch Set 1:
(1 comment)
File bitbang_spi.c:
https://review.coreboot.org/c/flashrom/+/49271/comment/d5e6e3ce_ec6d4f99
PS1, Line 71: cpha
I think you need to take a closer look at https://en.wikipedia.org/wiki/Serial_Peripheral_Interface#Clock_polarity_an…. cpha does not mean this.
--
To view, visit https://review.coreboot.org/c/flashrom/+/49271
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I415a528c013f1a523e883d812b6890be39bfcc7b
Gerrit-Change-Number: 49271
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Sun, 10 Jan 2021 14:06:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Xiang Wang, Stefan Reinauer, Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49255 )
Change subject: bitbang-spi.c: support clock polarity and phase
......................................................................
Patch Set 16:
(1 comment)
Patchset:
PS16:
I ended up making a separate patch train: https://review.coreboot.org/q/topic:"bitbang-spi-clock-modes"
--
To view, visit https://review.coreboot.org/c/flashrom/+/49255
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I04c1dfe132d756119229b27c3cd611d1be1abc8d
Gerrit-Change-Number: 49255
Gerrit-PatchSet: 16
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Sun, 10 Jan 2021 13:58:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/49270 )
Change subject: bitbang_spi.c: Do not set MOSI during initialization
......................................................................
bitbang_spi.c: Do not set MOSI during initialization
With CS# deasserted, the value is ignored. Ensuring SCK is in the idle
state is enough here. This is necessary because setting MOSI will assert
SCK with CPHA=1, which is implemented in subsequent commits.
Change-Id: I925d0ae55ae006dfcc6e7fb90364235526c576ef
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M bitbang_spi.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/70/49270/1
diff --git a/bitbang_spi.c b/bitbang_spi.c
index dfcf503..00c631f 100644
--- a/bitbang_spi.c
+++ b/bitbang_spi.c
@@ -151,7 +151,7 @@
/* Only mess with the bus if we're sure nobody else uses it. */
bitbang_spi_request_bus(master);
bitbang_spi_set_cs(master, 1);
- bitbang_spi_set_mosi_set_sck(master, 0, 0);
+ bitbang_spi_set_sck(master, 0);
/* FIXME: Release SPI bus here and request it again for each command or
* don't release it now and only release it on programmer shutdown?
*/
--
To view, visit https://review.coreboot.org/c/flashrom/+/49270
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I925d0ae55ae006dfcc6e7fb90364235526c576ef
Gerrit-Change-Number: 49270
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange