[solved] Need help with RV901T as MESA 7i90: SPI isn't working

More
2 years 7 months ago #296968 by ago_tm

what does:
Code:
sudo ./mesaflash --device 7i90 --spi --addr /dev/spidev0.0 --verbose
report?

Honestly... not too much:
Code:
unable to set bpw32, fallback to bpw8
and this is it.
Code:
sudo ./mesaflash --device 7i90 --spi --addr /dev/spidev0.0 --verbose --readhmid

gives more:
Code:
unable to set bpw32, fallback to bpw8 Configuration Name: HOSTMOT2 General configuration information: BoardName : MESA7I90 FPGA Size: 16 KGates FPGA Pins: 256 Number of IO Ports: 3 Width of one I/O port: 24 Clock Low frequency: 100.0000 MHz Clock High frequency: 200.0000 MHz IDROM Type: 3 Instance Stride 0: 4 Instance Stride 1: 64 Register Stride 0: 256 Register Stride 1: 256 Modules in configuration: Module: WatchDog There are 1 of WatchDog in configuration Version: 0 Registers: 3 BaseAddress: 0C00 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Module: IOPort There are 3 of IOPort in configuration Version: 0 Registers: 5 BaseAddress: 1000 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Module: LED There are 1 of LED in configuration Version: 0 Registers: 1 BaseAddress: 0200 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Configuration pin-out: IO Connections for P1 Pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir 1 0 IOPort None 3 1 IOPort None 5 2 IOPort None 7 3 IOPort None 9 4 IOPort None 11 5 IOPort None 13 6 IOPort None 15 7 IOPort None 17 8 IOPort None 19 9 IOPort None 21 10 IOPort None 23 11 IOPort None 25 12 IOPort None 27 13 IOPort None 29 14 IOPort None 31 15 IOPort None 33 16 IOPort None 35 17 IOPort None 37 18 IOPort None 39 19 IOPort None 41 20 IOPort None 43 21 IOPort None 45 22 IOPort None 47 23 IOPort None IO Connections for P2 Pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir 1 24 IOPort None 3 25 IOPort None 5 26 IOPort None 7 27 IOPort None 9 28 IOPort None 11 29 IOPort None 13 30 IOPort None 15 31 IOPort None 17 32 IOPort None 19 33 IOPort None 21 34 IOPort None 23 35 IOPort None 25 36 IOPort None 27 37 IOPort None 29 38 IOPort None 31 39 IOPort None 33 40 IOPort None 35 41 IOPort None 37 42 IOPort None 39 43 IOPort None 41 44 IOPort None 43 45 IOPort None 45 46 IOPort None 47 47 IOPort None IO Connections for P3 Pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir 1 48 IOPort None 3 49 IOPort None 5 50 IOPort None 7 51 IOPort None 9 52 IOPort None 11 53 IOPort None 13 54 IOPort None 15 55 IOPort None 17 56 IOPort None 19 57 IOPort None 21 58 IOPort None 23 59 IOPort None 25 60 IOPort None 27 61 IOPort None 29 62 IOPort None 31 63 IOPort None 33 64 IOPort None 35 65 IOPort None 37 66 IOPort None 39 67 IOPort None 41 68 IOPort None 43 69 IOPort None 45 70 IOPort None 47 71 IOPort None

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #297003 by PCW
Ahh I had forgotten that only Ethernet and serial cards provide
a lot of info from the --verbose command, including the FPGA
flash memory size, ID code and write and erase page sizes:

    3: FPGAFlsh (flash, RW, 32-bit) [size=16M], page size: 256, erase size: 65536

  [space 3] FPGA flash eeprom:
    flash size: 16Mb (id: 0x14)

I suspect some error either with an unsupported flash chip or maybe a
SPI pinout issue
The following user(s) said Thank You: ago_tm

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #297041 by ago_tm
I finally get flash written with just using the same SPI0 on RPI and JP5 connector
JP5 connector on RV901T

In Xilinx ISE it it required to set the output bitstream format as bin (right click on the "Generate Programming File" > "Process Properties..." > "Create Binary Configuration File" ☑ ).
Then
Code:
sudo apt install -y flashrom sudo flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=10000 > Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on linux_spi. sudo flashrom -f -p linux_spi:dev=/dev/spidev0.0,spispeed=10000 -w ~/Downloads/TopGCSPIHostMot2.bin > Error: Image size (524288 B) doesn't match the expected size (4194304 B)! dd if=/dev/zero bs=1 count=1 seek=4194303 of=TopGCSPIHostMot2.bin sudo flashrom -f -p linux_spi:dev=/dev/spidev0.0,spispeed=10000 -w ~/Downloads/TopGCSPIHostMot2.bin > Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on linux_spi. > Reading old flash chip contents... done. > Erasing and writing flash chip... Erase/write done. > Verifying flash... VERIFIED.

I also tried to make a kind of SPI-bridge bitstream for the board to avoid disconnecting of the rv901t board from the RPi, but it is not my level of fpga configuring yet.

Anyway, I think I can mark it as [solved].

Many thanks to PCW and cornholio!

Not sure, probably this thread better to move to the Hardware & Machines section.

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #297301 by ago_tm
As a bottom line I did a rebase to remove unnecessary changes and save the only required changes for running RV901T as Mesa 7i90 via spi in a single of the just the changes required to get it started with just 72 I/O pins:  github.com/golyakoff/hostmot2-rv901t-7i9...abf87a09ed5a3145c7d2

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #297334 by Cant do this anymore bye all
All my bit files are 464577 bytes for the RV901T. I suspect the bin files would be smaller as the bit files are text based. (guessing)

I can't say I've used bin format, so unsure how long the file should be.

I use a usb-blaster and OpenFPGAloader, to program the flash it first loads a a bit stream to load the flash via JTAG, then loads the flash with your bit stream.
The following user(s) said Thank You: ago_tm

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #297337 by Cant do this anymore bye all
This tread as well would be better off in "Driver Boards".
The following user(s) said Thank You: ago_tm

Please Log in or Create an account to join the conversation.

Moderators: PCW, jmelson
Time to create page: 0.292 seconds
Powered by Kunena Forum