Commit Graph

524 Commits

Author SHA1 Message Date
Sean Cross
5a587c5752 booster: README: document how to make and use make-booster
Previously we missed some crucial information about how to use it.
Document that information here now.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 20:06:21 +08:00
Sean Cross
ea04c290eb booster: foboot-2 compatibility
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 15:14:07 +08:00
Sean Cross
95e6e8c211 deps: litex-boards: add moduledoc for fomu crg
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 14:13:36 +08:00
Sean Cross
f751f51722 foboot-bitstream: move "reset" block below USB pads
This keeps the modules in an order that roughly matches the memory
order.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 13:57:49 +08:00
Sean Cross
b40530df41 foboot-bitstream: fix comments and reorder to improve timing
Reordering the file seems to improve timing by quite a lot, even after
adjusting the pnr seed.  With this reordering we now meet timing.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 13:29:08 +08:00
Sean Cross
824470a974 foboot-bitstream: start documenting soc
lxsocdoc can't yet document this, but add it anyway in preparation.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 12:57:09 +08:00
Sean Cross
45e3b5b617 rtl: break foboot modules into their own files
These are all independent modules, so break each one out into its own
file.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 10:03:56 +08:00
Sean Cross
c8e632dd7e foboot: version: work even if git is untagged
Allow the "version" block to not crash python when the git repository is
untagged or doesn't exist.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 22:53:50 +08:00
Sean Cross
ce777d5057 bitstream: touch: remove "field" support to fix inputs
The "touch" block doesn't need field support, since it's just one field.
Remove support, which simplifies the layout and unbreaks "input"
support.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 22:47:37 +08:00
Sean Cross
d6292f5dd3 foboot-bitstream: use little-endian for SPI device
If we don't do this, then the words will all be backwards.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 22:04:45 +08:00
Sean Cross
80056860b6 booster: allow alternate spi id
If the alternate spi id is detected, force it to the original spi id.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 19:04:32 +08:00
Sean Cross
bb8079711b booster: document alternate SPI id
Some boards have this alternate SPI id.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 19:03:16 +08:00
Sean Cross
cba427a7fb spi: switch from SPI mode 1 to mode 0
We got CPHA wrong before.  Set the pin before the clock.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 19:03:05 +08:00
Sean Cross
99f36ceca4 litex-boards: fix pin mapping on pvt
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 18:58:15 +08:00
Sean Cross
b920660d71 booster: compile with -O2
Maybe that's why it was running slowly...

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 12:34:59 +08:00
Sean Cross
449f408cfe booster: finish documenting flash sequence
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 12:34:41 +08:00
Sean Cross
dcb75f1e7e usb: fix interface descriptors
Windows wouldn't enumerate the device because the descriptor was buggy.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 12:18:38 +08:00
Sean Cross
95efe4681e dfu: set manifest-wait-reset timeout to 10ms
This removes the one-second delay after we're done flashing.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 11:44:08 +08:00
Sean Cross
cc8e9d5af8 sw: eptri: remove rgb led calls
These are an abstraction violation, and emit warnings.  They shouldn't
be needed anymore, now that debugging is finished.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 11:42:00 +08:00
Sean Cross
a6c888ba50 sw: spi: remove unused gpio functions
Now that we hardcode gpio output, remove the abstracted functions.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 11:41:36 +08:00
Sean Cross
2d8b8cb047 foboot-bitstream: fix conflict with spibone
Previously, we had two different spibone implementations due to a failed
merge.  This removes the second one.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 11:37:27 +08:00
Sean Cross
d4b1a64dca sw: get usb working with eptri
This commit is the final commit necessary to get foboot working with the
new eptri api.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 11:37:27 +08:00
Sean Cross
1ee442d407 dfu: parameterize all timeouts
This makes it easier to try out different timeouts for various DFU
operations.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 11:31:46 +08:00
Sean Cross
1ed2e4ce5e dfu: use 4 kb erase blocks
There is no benefit to using larger erase block sizes, so stick to using
the smallest available size.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 11:31:19 +08:00
Sean Cross
c6c3ae8c47 spi: speed up bit banging and special case everything
This patch significantly improves SPI throughput by avoiding
many duplicated writes.  For example, we now only adjust the MISO
direction once during every byte rather than for every bit.

This improves the time it takes to upload a 128 kilobyte file from 29
seconds to 6 seconds.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 11:28:53 +08:00
Sean Cross
1f91f81f8e eptri: work-in-progress to get eptri working
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 08:03:35 +08:00
Sean Cross
6766c9323c Merge branch 'foboot-2' of github.com:im-tomu/foboot into foboot-2 2019-11-22 08:00:41 +08:00
Sean Cross
f536429bff deps: update valentyusb and add spibone
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-12 21:34:43 -08:00
Sean Cross
58f99aebf2 eptri: wip commit
This commit includes the spibone support we're using to debug eptri.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-01 17:07:27 +08:00
Sean Cross
7edde2c26e deps: use fixed litex-boards evt commit
Signed-off-by: Sean Cross <sean@xobs.io>
2019-10-11 21:40:22 +08:00
Sean Cross
5e33feee21 deps: lxsocdoc: fix various document generation issues
Signed-off-by: Sean Cross <sean@xobs.io>
2019-10-07 12:11:44 +08:00
Sean Cross
985de5bde8 hw: bitstream: use 5 dummy cycles for spi flash
With the default of 15, it doesn't actually work.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-10-07 12:10:40 +08:00
Sean Cross
c667d1769e hw: bitstream: document version register
Signed-off-by: Sean Cross <sean@xobs.io>
2019-10-07 12:10:18 +08:00
Sean Cross
25bf6c4335 rtl: add mcycle and minstret CSRs to vexriscv
Signed-off-by: Sean Cross <sean@xobs.io>
2019-10-07 12:08:33 +08:00
Sean Cross
527c6347b8 valentyusb: use master branch
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-26 12:17:28 +08:00
Sean Cross
b6c7cdae88 foboot-bitstream: correct yet more rst quotes
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-26 11:50:14 +08:00
Sean Cross
6198be045b lxsocdoc: reflow split csrs
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-26 11:39:55 +08:00
Sean Cross
8879fc7824 foboot: more fixing of rst-style backticks
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-26 09:29:40 +08:00
Sean Cross
645fcabc54 lxsocdoc: commit svd formatting fixes
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-26 09:28:18 +08:00
Sean Cross
6baf74c074 hw: add more documentation to top modules
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-26 09:27:12 +08:00
Sean Cross
e5e760ef44 valentyusb: reformat documentation
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 15:48:11 +08:00
Sean Cross
9d65dbb67a valentyusb: fix eptri bulk documentation
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 15:38:27 +08:00
Sean Cross
ba137818b8 foboot: set project name and author
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 15:11:25 +08:00
Sean Cross
eca00aeeac lxsocdoc: csr reformatting updates
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 14:57:23 +08:00
Sean Cross
129944e1b5 hw: update lxsocdoc
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 14:24:25 +08:00
Sean Cross
298aefed9f sw: don't ack the fifo reads
This is no longer required.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 14:09:33 +08:00
Sean Cross
9bdb53ca78 hw: include pnr seed in design
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 13:31:57 +08:00
Sean Cross
5d2798588c hw: put csr file in build
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 12:58:47 +08:00
Sean Cross
af6c1e9cbc hw: add an interrupt for timer0
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 12:58:08 +08:00
Sean Cross
8bb7f5cb9a hw: fix build by specifying fields directly
Since we use fields now, these values must be specified rather than
specifying the whole `status` register at once.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-25 12:57:34 +08:00