timvideos / HDMI2USB-litex-firmware

A version of the HDMI2USB firmware based around LiteX tools produced by @Enjoy-Digital (based on misoc+migen created by @M-Labs)
https://hdmi2usb.tv
BSD 2-Clause "Simplified" License
145 stars 71 forks source link

WIP - Adding support for chubby75 hardware. #473

Open mithro opened 5 years ago

mithro commented 5 years ago

This is a WIP pull request to add support to the HDMI2USB-litex-firmware for the RV901T LED "Receiver Card". The board is a very cheap FPGA board which has;

See more info below and at q3k's chubby75 repository.

RV901T LED "Receiver Card"

image

This repository contains bits and pieces about the Linsn RV901T HUB75 LED driver card, also known as a "Receiver Card". Its stock function is to receive and forward framebuffer data using a proprietary protocol (from a "Sender Card") and blit out control signals to LED panels (via shields, like a HUB75 shield).

As it contains a user-reprogrammable Spartan 6 FPGA (LX16, 14k 'logic cells', 9112 LUTs) and 2x GbE, it has potential to be usable as a general purpose FPGA development board, an interface card for various purposes, or a logic analyzer.

Chubby75 is a project to reverse engineer, document and provide tools based on this card.

danielkucera commented 5 years ago

It also works on the real device:

       / /  (_) /____ | |/_/
      / /__/ / __/ -_)>  <
     /____/_/\__/\__/_/|_|
 SoC BIOS / CPU: LM32 /  75MHz
(c) Copyright 2012-2018 Enjoy-Digital
(c) Copyright 2007-2018 M-Labs Limited
Built Jun  5 2019 09:52:57

BIOS CRC passed (8e3a570a)
Initializing SDRAM...
SDRAM now under hardware control
Memtest OK
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
Timeout
No boot medium found
BIOS> 

Next I'd like to make the ethernet work. The problem is that I don't know how...

mithro commented 5 years ago

@danielkucera Let's start by merging what you have working so far. I'll review it shortly.

danielkucera commented 5 years ago

@mithro can you help a bit please? I cannot make the board load bios from SPI flash. I put it to 0x80000. You can check the last commit to see what I tried. On misoc it was working for me like this: https://github.com/danielkucera/flipsyfat/blob/sdstream/flipsyfat/targets/qm_xc6slx16_sdram.py#L162

GitHub
danielkucera/flipsyfat
FPGA-based emulator to assist with guessing bootloader SD card filenames - danielkucera/flipsyfat
danielkucera commented 5 years ago

I've enable the internal rom back to check if it can read from SPI correctly and it seems ok:

BIOS> mr 0x0 100
Memory dump:
0x00000000  98 00 00 00 d0 00 00 00 78 01 00 00 38 21 00 00  ........x...8!..
0x00000010  d0 e1 00 00 e0 00 00 3b 34 00 00 00 34 00 00 00  .......;4...4...
0x00000020  e0 00 00 00 34 00 00 00 34 00 00 00 34 00 00 00  ....4...4...4...
0x00000030  34 00 00 00 34 00 00 00 34 00 00 00 34 00 00 00  4...4...4...4...
0x00000040  e0 00 00 00 34 00 00 00 34 00 00 00 34 00 00 00  ....4...4...4...
0x00000050  34 00 00 00 34 00 00 00 34 00 00 00 34 00 00 00  4...4...4...4...
0x00000060  e0 00 00 00                                      ....            
BIOS> mr 0x20080000 100
Memory dump:
0x20080000  98 00 00 00 d0 00 00 00 78 01 00 00 38 21 00 00  ........x...8!..
0x20080010  d0 e1 00 00 e0 00 00 3b 34 00 00 00 34 00 00 00  .......;4...4...
0x20080020  e0 00 00 00 34 00 00 00 34 00 00 00 34 00 00 00  ....4...4...4...
0x20080030  34 00 00 00 34 00 00 00 34 00 00 00 34 00 00 00  4...4...4...4...
0x20080040  e0 00 00 00 34 00 00 00 34 00 00 00 34 00 00 00  ....4...4...4...
0x20080050  34 00 00 00 34 00 00 00 34 00 00 00 34 00 00 00  4...4...4...4...
0x20080060  e0 00 00 00                                      ....            

How do I say it to boot from there?