Commit Graph

499 Commits

Author SHA1 Message Date
Sean Cross
e7b55338be hw: foboot-bitstream: hardcode memory map
Rather than relying on the memory map from litex, hardcode the
memory offsets.

This is required because sometimes the litex memory map changes,
and we want to have a consistent offset across builds.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-21 12:19:13 +08:00
Sean Cross
bd08f0bb06 hw: foboot-bitstream: correct spi pin mappings for "dq"
The "dq" mappings for SPI were wrong, and wouldn't work with the
SPI flash in dual/quad mode.  Correct these mappings for all platforms.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-21 12:17:19 +08:00
Sean Cross
1e34d27f47 hw: foboot-bitstream: don't hardcode sram offset
Use the values from the memory map instead of hardcoding the offset.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-21 12:15:13 +08:00
Sean Cross
a45b6be459 hw: foboot-bitstream: use buffered output from pll
The PLL has two outputs: buffered and unbuffered.  Take the clock
signal from the buffered output.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-21 12:13:30 +08:00
Sean Cross
ee30de7946 hw: foboot-bitstream: use all 13 bits of the clock reset
There are 13 bits on the clock reset line, but right now we only use
12 of them.  Set the counter to 8191 so we take advantage of
all 13 bits.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-21 12:12:41 +08:00
Sean Cross
8c84afa4d9 hw: bitstream: add dummyusb if no cpu is present
This will allow us to still access the wishbone bus without a CPU.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-20 16:29:48 +08:00
Sean Cross
e1a1b60821 hw: foboot-bitstream: use GENCLK_HALF from PLL
This removes a double-flop that we were using to get a 12 MHz clock,
which we were then multiplying back up to 48 MHz.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-20 16:15:02 +08:00
Sean Cross
541c765198 hw: foboot-bitstream: fix --no-cpu flag
If there is no CPU, then don't adjust the CPU reset vector.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-20 16:14:35 +08:00
Sean Cross
7452fe05eb releases: release v1.8.6
Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-09 13:42:45 +08:00
Sean Cross
eed9897cfc litex: pull latest spi flash changes
Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-08 14:14:14 +08:00
Sean Cross
a4a3dad324 hw: fix led ordering on hacker board and add id to "version"
Fix the ordering of the LEDs on the "hacker" board.

Add a "model id" to the "version" block.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-08 12:14:39 +08:00
Sean Cross
10454fa0be sbled: fix mapping of r,g,b and add bit-bang mode
Fix the mapping of red, green, and blue.  Now the LEDDPWRR, LEDDPWRG,
and LEDDPWRB map to their correct values.

Additionally, a bit-banged mode for the LED has been added to enable
fine-grained control in a simpler manner.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-08 10:13:09 +08:00
Sean Cross
c622551300
Merge pull request #15 from TomKeddie/tomk_20190701_flashaddr
Flash mapping address fixes
2019-07-07 09:20:57 +08:00
Sean Cross
a60b909b88 releases: add bios for v1.8.5
Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-06 17:26:32 +08:00
Sean Cross
c7aafa3865 releases: add v1.8.5
Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-06 17:25:38 +08:00
Sean Cross
5468cb914a sw: spi: remove lots of dual/quad/qpi code
This is an effort to fix boards that go into RO mode on their own.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-05 15:23:04 +08:00
Sean Cross
f070b2ab7c release: add v1.8.4
Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-04 16:50:38 +08:00
Sean Cross
d1cd68c232 hw: set debug bridge memory size to 0x100
Hardware breakpoints live at offset 0x40 from the start of this region,
so increase the size from 0x10 to 0x100.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-04 16:39:28 +08:00
Sean Cross
c5b45a4314 Merge branch 'master' of github.com:im-tomu/foboot 2019-07-03 18:13:09 +08:00
Sean Cross
6e0f255b7e releases: add v1.8.3
This has been tested on machines that were failing with v1.8.1, and is
reliable.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-03 18:12:36 +08:00
Sean Cross
a40dc8a570
Merge pull request #14 from TomKeddie/master
Create FLASHLAYOUT.md
2019-07-03 18:09:44 +08:00
Tom Keddie
1c8c1f3bc1 Flash mapping address fixes
- too many bits were allocated causing problems addressing 128Mbit devices
- the shift operator in python generates a signed shift in verilog which potentilly trashes the upper address bit, switch to padding
2019-07-03 02:59:20 -07:00
Sean Cross
be187f10d1 fix u16 name size from previous patch
Since it's a u16, we must remove two bytes not one.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-03 17:58:50 +08:00
Tom Keddie
841627d02f
Create FLASHLAYOUT.md 2019-07-03 02:54:19 -07:00
Sean Cross
f3f4971e09 sw: usb_desc: don't count trailing NULL in string len
Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-03 17:36:24 +08:00
Tim Ansell
1033016932
Merge pull request #13 from TomKeddie/tomk_20190630_warnings
sw: Fix warnings in dfu.h and usb-dev.c
2019-06-30 19:27:02 -07:00
Tom Keddie
9be328ead9 sw : fix warning in dfu.h and usb-dev.c 2019-06-30 18:28:05 -07:00
Sean Cross
520de140f7 README: correct documentation on "dfu-util -e"
It's no longer required.

This addresses #11.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-25 09:14:25 -07:00
Sean Cross
0c8a8ba08e releases: add hacker installable file
Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-23 13:44:33 -07:00
Sean Cross
a60ed055fe examples: usb-cdcacm: correct arch
Use the correct architecture (no -m).

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-19 14:28:20 -07:00
Sean Cross
6b612211f4 examples: riscv-blink: fix cpu model and remove mul/div
mul/div aren't needed, since we include stdlib now.  Additionally, now
that we have the CPU model specified correctly, the correct files are
linked in as necessary.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-19 14:26:58 -07:00
Sean Cross
79fc2f6f5b examples: usb-cdcacm: update usb id and csr.h
Use the latest IDs and csr.h file for the cdcacm example.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-19 14:10:52 -07:00
Sean Cross
a758882e05 examples: riscv-blink: sync csr.h file
This file has been updated.  There shouldn't be functional changes, but
as an example project it's important to have the latest version.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-19 14:08:31 -07:00
Sean Cross
b41f4930cf csr: include generated macro for bitstream sync
The ICE40 bitstream sync byte is now available as a macro in csr.h.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-19 14:06:32 -07:00
Sean Cross
b051784a2c examples: riscv-blink: fix building on rpi
Make sure we look for the correct compiler.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-19 14:06:01 -07:00
Sean Cross
f2084ea817 hw: foboot-bitstream: tab -> spaces
I wonder how that got in there...

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-19 14:05:29 -07:00
Sean Cross
61d912b9fc valentyusb: update to include dummyusb fixes
Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-19 12:38:47 -07:00
Sean Cross
5fe9a814ea sw: support riscv64 on raspberry pi
The name of the compiler has changed on raspberry pi, so support the
previous name as well as the new one.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-19 08:20:43 -07:00
Sean Cross
62efe31608 gitattributes: add c and header files
Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-18 19:45:27 -07:00
Sean Cross
4d40bb5f18 sw: update csr.h to release version
Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-18 19:45:04 -07:00
Sean Cross
d60815f733 gitattributes: don't assume everything is text
This causes subtle problems later on.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-18 10:44:48 -07:00
Sean Cross
290e155630 releases: add dfu versions of installable 1.8.1
Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-18 10:44:27 -07:00
Sean Cross
8354617950 Merge branch 'master' of github.com:im-tomu/foboot 2019-06-17 15:33:49 -07:00
Sean Cross
ba11593f95 releases: add v1.8.1
Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-17 15:33:34 -07:00
Sean Cross
ccdf910ec1 hw: add --seed argument
Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-17 15:02:04 -07:00
Sean Cross
8a0df08507 foboot-bitstream: ce 5 again
Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-17 14:49:06 -07:00
Sean Cross
4057294332 sw: clean up underflows observed during updates
On some platforms, something overflows and puts the system in a state
where it cannot update.  By checking for underflow on various counters,
we can now update properly on these systems.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-17 14:48:08 -07:00
Sean Cross
da904828a0 foboot: add a check for the SPI Flash ID
This will prevent loading the wrong image on a device.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-17 13:03:07 -07:00
Sean Cross
8e2d2bd85f make-booster: get program to compile
Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-17 11:13:44 -07:00
Sean Cross
7c0e172587 fobootster: first working version
This now properly builds and runs on real hardware.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-17 11:13:14 -07:00