Skip to content

Commit

Permalink
squishy: gateware: bootloader: started filling in the bits for the Re…
Browse files Browse the repository at this point in the history
…v2 bootloader
  • Loading branch information
lethalbit committed Nov 19, 2024
1 parent e8c47d8 commit fc0eb31
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions squishy/gateware/bootloader/rev2.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@ def __init__(self, fifo: AsyncFIFO) -> None:
def elaborate(self, platform: SquishyPlatformType | None) -> Module:
m = Module()

sup_int = platform.request('supervisor', 0)

su_attn = sup_int.su_attn.o
dfu_trg = sup_int.dfu_trg.o

m.submodules.regs = regs = SupervisorRegisters(name = 'supervisor')
m.submodules.spi = spi = SPIInterface(
clk = sup_int.clk, cipo = sup_int.cipo, copi = sup_int.copi,
cs_peripheral = sup_int.attn, cs_controller = sup_int.psram,
mode = SPIInterfaceMode.BOTH, reg_map = regs
)

spi_ctrl = spi.controller
spi_perh = spi.peripheral



return m

0 comments on commit fc0eb31

Please sign in to comment.