Question regarding FPGA firmware load in u-boot
Hello List,
I want to boot a (Lattice) FPGA from u-boot by using Slave Serial configuration on a Marvell Kirkwood device.
As seen there is an (Xilinx and Altera) FPGA loader driver allready available in u-boot.
Please can somebody explain how I have to provide a FPGA bitstream image to u-boot?
It seems I have to create a image with mkimage?
This image have to be loaded into ram and the address has to be provided to the load command?
Is there a maintainer for the FPGA code inside u-boot?
I'm willing to contribute some extensions for Lattice FPGAs if I'm successful!
Thanks to all,
Dieter
Dieter,
Quoted 4 lines · Dieter Kiermaier
Hello List,
I want to boot a (Lattice) FPGA from u-boot by using Slave Serial configuration on a Marvell Kirkwood device.
Should be no problem as long as you'll have access to GPIO.
Quoted 4 lines
As seen there is an (Xilinx and Altera) FPGA loader driver allready available in u-boot.
Please can somebody explain how I have to provide a FPGA bitstream image to u-boot?
The easiest way is to reserve some unused flash sectors and use the first sector's start adress as arg for "fpga load".
Quoted 1 line
It seems I have to create a image with mkimage?
no - Lattice specififc bitstream can be stored in raw format. mkimage may be useful for update, but personally I prefer update via dedicated linux mtd partition.
Quoted 2 lines
This image have to be loaded into ram and the address has to be provided to the load command?
Usually an FPGA is *very* board specific. I'd suggest to use flash and create a corresponding mtd partition for linux, i.e. make it maintainable.
Quoted 2 lines
Is there a maintainer for the FPGA code inside u-boot?
I'm willing to contribute some extensions for Lattice FPGAs if I'm successful!
excellent - all you'll need is the Lattice specific bit toggle sequence.
submitting a proper patch will surely do.
Regards,
Andr??
Quoted 7 lines
Thanks to all,
Dieter
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
Andr??,
Quoted 9 lines
Dieter,
Quoted 4 lines · Dieter Kiermaier
Hello List,
I want to boot a (Lattice) FPGA from u-boot by using Slave Serial configuration on a Marvell Kirkwood device.
Should be no problem as long as you'll have access to GPIO.
I'm working on it :)
But more likely I would have the SPI controller to do the serializing of the bitstream. But maybe this would be the second step.
Quoted 9 lines
Quoted 5 lines
As seen there is an (Xilinx and Altera) FPGA loader driver allready available in u-boot.
Please can somebody explain how I have to provide a FPGA bitstream image to u-boot?The easiest way is to reserve some unused flash sectors and use the first sector's start adress as arg for "fpga load".
I assume this will only work with NOR flash, right? If I'm using NAND flash I have to copy the image to ram first?
Quoted 6 lines
Quoted 1 line
It seems I have to create a image with mkimage?
no - Lattice specififc bitstream can be stored in raw format. mkimage may be useful for update, but personally I prefer update via dedicated linux mtd partition.
Quoted 7 lines
Quoted 2 lines
This image have to be loaded into ram and the address has to be provided to the load command?
Usually an FPGA is *very* board specific. I'd suggest to use flash and create a corresponding mtd partition for linux, i.e. make it maintainable.
Seems to be a good way.
Is there a cmd in u-boot to read a file from a jffs2 filesystem inside a nand flash partition?
Quoted 8 lines
Quoted 3 lines
Is there a maintainer for the FPGA code inside u-boot? I'm willing to contribute some extensions for Lattice FPGAs if I'm successful!
excellent - all you'll need is the Lattice specific bit toggle sequence.
submitting a proper patch will surely do.
I'm trying to get an idea what place is the best to integrate the lattice architecture in to the fpga framework.
If I have any further questions - can I ask you again?
Quoted 4 lines
Regards,
Andr??
Many thanks for helping,
Dieter
Quoted 12 lines
Quoted 7 lines
Thanks to all,
Dieter
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootMATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
Dieter,
Quoted 7 lines · Dieter Kiermaier
Andr??,
Quoted 5 lines
Dieter,
Quoted 2 lines · Dieter Kiermaier
Hello List,
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
I want to boot a (Lattice) FPGA from u-boot by using Slave Serial configuration on a Marvell Kirkwood device.
Should be no problem as long as you'll have access to GPIO.
I'm working on it :)
But more likely I would have the SPI controller to do the serializing of the bitstream. But maybe this would be the second step.
Bitbanging is not critical and works pretty fast.
You definitely have to control maximum frequency and observe errors during load. If you'll use SPI make sure to disconnect the bus from the FPGA and keep the config pins in a sane state.
Quoted 11 lines
Quoted 9 lines
Quoted 5 lines
As seen there is an (Xilinx and Altera) FPGA loader driver allready available in u-boot.
Please can somebody explain how I have to provide a FPGA bitstream image to u-boot?The easiest way is to reserve some unused flash sectors and use the first sector's start adress as arg for "fpga load".
I assume this will only work with NOR flash, right?
I'm using NOR flash, but it will work with any adressable memory.
Quoted 1 line
If I'm using NAND flash I have to copy the image to ram first?
yes.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It seems I have to create a image with mkimage?
you can store e.g. fpga.bin as a single file inside jffs, read it and load your fpga.
Quoted 8 lines
Quoted 8 lines
no - Lattice specififc bitstream can be stored in raw format. mkimage may be useful for update, but personally I prefer update via dedicated linux mtd partition.
Quoted 2 lines
This image have to be loaded into ram and the address has to be provided to the load command?
Quoted 6 lines
Quoted 4 lines
Usually an FPGA is *very* board specific. I'd suggest to use flash and create a corresponding mtd partition for linux, i.e. make it maintainable.
Seems to be a good way.
yes - but not for jffs2 on NAND. You can use a plain binary file instead.
Quoted 2 lines
Is there a cmd in u-boot to read a file from a jffs2 filesystem inside a nand flash partition?
Have a look at the end of common/cmd_jffs2.c : fsload is the one for you.
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Is there a maintainer for the FPGA code inside u-boot? I'm willing to contribute some extensions for Lattice FPGAs if I'm successful!
Quoted 7 lines
Quoted 4 lines
excellent - all you'll need is the Lattice specific bit toggle sequence.
submitting a proper patch will surely do.
I'm trying to get an idea what place is the best to integrate the lattice architecture in to the fpga framework.
If I have any further questions - can I ask you again?
of course, but since I'm a PowerPC user I can't tell anything specific to ARM ...
Cheers,
Andr??
Quoted 23 lines
Quoted 5 lines
Regards,
Andr??
Many thanks for helping,
DieterQuoted 12 lines
Quoted 7 lines
Thanks to all,
Dieter
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootMATRIX VISION GmbH, Talstrae 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschftsfhrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
Andr??,
Quoted 15 lines
Dieter,
Quoted 12 lines · Dieter Kiermaier
Andr??,
Quoted 9 lines
Dieter,
Quoted 4 lines · Dieter Kiermaier
Hello List,
I want to boot a (Lattice) FPGA from u-boot by using Slave Serial configuration on a Marvell Kirkwood device.
Should be no problem as long as you'll have access to GPIO.
Quoted 9 lines
Quoted 3 lines
I'm working on it :)
But more likely I would have the SPI controller to do the serializing of the bitstream. But maybe this would be the second step.Bitbanging is not critical and works pretty fast.
You definitely have to control maximum frequency and observe errors during load. If you'll use SPI make sure to disconnect the bus from the FPGA and keep the config pins in a sane state.
Do you have some time values how long your FPGA needs to boot by using bitbanging?
Quoted 34 lines
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines
As seen there is an (Xilinx and Altera) FPGA loader driver allready available in u-boot.
Please can somebody explain how I have to provide a FPGA bitstream image to u-boot?The easiest way is to reserve some unused flash sectors and use the first sector's start adress as arg for "fpga load".
I assume this will only work with NOR flash, right?
I'm using NOR flash, but it will work with any adressable memory.
Quoted 1 line
If I'm using NAND flash I have to copy the image to ram first?
yes.
Quoted 1 line
Quoted 1 line
Quoted 1 line
It seems I have to create a image with mkimage?
you can store e.g. fpga.bin as a single file inside jffs, read it and load your fpga.
Quoted 4 lines
Quoted 4 lines
no - Lattice specififc bitstream can be stored in raw format. mkimage may be useful for update, but personally I prefer update via dedicated linux mtd partition.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
This image have to be loaded into ram and the address has to be provided to the load command?
Usually an FPGA is *very* board specific. I'd suggest to use flash and create a corresponding mtd partition for linux, i.e. make it maintainable.
Seems to be a good way.
Quoted 9 lines
yes - but not for jffs2 on NAND. You can use a plain binary file instead.
Quoted 2 lines
Is there a cmd in u-boot to read a file from a jffs2 filesystem inside a nand flash partition?
Have a look at the end of
common/cmd_jffs2.c: fsload is the one for you.
Thanks for that link :)
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Is there a maintainer for the FPGA code inside u-boot? I'm willing to contribute some extensions for Lattice FPGAs if I'm successful!
excellent - all you'll need is the Lattice specific bit toggle sequence.
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
submitting a proper patch will surely do.
I'm trying to get an idea what place is the best to integrate the lattice architecture in to the fpga framework.
If I have any further questions - can I ask you again?of course, but since I'm a PowerPC user I can't tell anything specific to ARM ...
Thanks again!
So I would try to bring it up and see what happens :)
Dieter
Quoted 28 lines
Cheers,
Andr??
Quoted 18 lines
Quoted 3 lines
Regards,
Andr??
Many thanks for helping,
DieterQuoted 11 lines
Quoted 6 lines
Thanks to all,
Dieter
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootMATRIX VISION GmbH, Talstrae 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschftsfhrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim ReichMATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
Quoted 21 lines · Dieter Kiermaier
Andr??,
Quoted 19 lines
Dieter,
Quoted 15 lines · Dieter Kiermaier
Andr??,
Quoted 9 lines
Dieter,
Quoted 4 lines · Dieter Kiermaier
Hello List,
I want to boot a (Lattice) FPGA from u-boot by using Slave Serial configuration on a Marvell Kirkwood device.
Should be no problem as long as you'll have access to GPIO.
I'm working on it :)
But more likely I would have the SPI controller to do the serializing of the bitstream. But maybe this would be the second step.
Quoted 7 lines
Quoted 5 lines
Bitbanging is not critical and works pretty fast.
You definitely have to control maximum frequency and observe errors during load. If you'll use SPI make sure to disconnect the bus from the FPGA and keep the config pins in a sane state.Do you have some time values how long your FPGA needs to boot by using bitbanging?
less than a second.
Quoted 59 lines
Quoted 35 lines
Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
As seen there is an (Xilinx and Altera) FPGA loader driver allready available in u-boot.
Please can somebody explain how I have to provide a FPGA bitstream image to u-boot?The easiest way is to reserve some unused flash sectors and use the first sector's start adress as arg for "fpga load".
I assume this will only work with NOR flash, right?
I'm using NOR flash, but it will work with any adressable memory.
Quoted 1 line
If I'm using NAND flash I have to copy the image to ram first?
yes.
Quoted 1 line
Quoted 1 line
Quoted 1 line
It seems I have to create a image with mkimage?
you can store e.g. fpga.bin as a single file inside jffs, read it and load your fpga.
Quoted 4 lines
Quoted 4 lines
no - Lattice specififc bitstream can be stored in raw format. mkimage may be useful for update, but personally I prefer update via dedicated linux mtd partition.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
This image have to be loaded into ram and the address has to be provided to the load command?
Usually an FPGA is *very* board specific. I'd suggest to use flash and create a corresponding mtd partition for linux, i.e. make it maintainable.
Seems to be a good way.
Quoted 9 lines
yes - but not for jffs2 on NAND. You can use a plain binary file instead.
Quoted 2 lines
Is there a cmd in u-boot to read a file from a jffs2 filesystem inside a nand flash partition?
Have a look at the end of
common/cmd_jffs2.c: fsload is the one for you.Thanks for that link :)
Quoted 13 lines
Quoted 12 lines
Quoted 8 lines
Quoted 3 lines
Is there a maintainer for the FPGA code inside u-boot? I'm willing to contribute some extensions for Lattice FPGAs if I'm successful!
excellent - all you'll need is the Lattice specific bit toggle sequence.
submitting a proper patch will surely do.
I'm trying to get an idea what place is the best to integrate the lattice architecture in to the fpga framework.
If I have any further questions - can I ask you again?
Quoted 6 lines
Quoted 3 lines
of course, but since I'm a PowerPC user I can't tell anything specific to ARM ...
Thanks again!
So I would try to bring it up and see what happens :)
yes - to get it done quickly I'd recommend to add a new Lattice device family. Please create e.g. drivers/fpga/lattice.c and lattice_ecp3.c (matching your device) according to the xilinx and altera templates. It will integrate into common/cmd_fpga.c smoothly.
GPIO accessor functions have to be defined inside the board specific code. If you definitely want to use spi please do it there, i.e. *not* in the general code unless this is useful for all boards.
You can have a look at board/matrix_vision/mvbc_p/fpga.c+h
Regards,
Andr??
Quoted 33 lines
Dieter
Quoted 28 lines
Cheers,
Andr??
Quoted 18 lines
Quoted 3 lines
Regards,
Andr??
Many thanks for helping,
DieterQuoted 11 lines
Quoted 6 lines
Thanks to all,
Dieter
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootMATRIX VISION GmbH, Talstrae 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschftsfhrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim ReichMATRIX VISION GmbH, Talstrae 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschftsfhrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
Am Montag 22 Juni 2009 11:17:34 schrieb Andr?? Schwarz:
Quoted 27 lines · Dieter Kiermaier
Quoted 26 lines
Andr??,
Quoted 23 lines
Dieter,
Quoted 7 lines · Dieter Kiermaier
Andr??,
Quoted 5 lines
Dieter,
Quoted 2 lines · Dieter Kiermaier
Hello List,
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
I want to boot a (Lattice) FPGA from u-boot by using Slave Serial configuration on a Marvell Kirkwood device.
Should be no problem as long as you'll have access to GPIO.
I'm working on it :)
But more likely I would have the SPI controller to do the serializing of the bitstream. But maybe this would be the second step.Bitbanging is not critical and works pretty fast.
You definitely have to control maximum frequency and observe errors during load. If you'll use SPI make sure to disconnect the bus from the FPGA and keep the config pins in a sane state.
Quoted 5 lines
Quoted 2 lines
Do you have some time values how long your FPGA needs to boot by using bitbanging?
less than a second.
Thats fine!
Quoted 70 lines
Quoted 58 lines
Quoted 34 lines
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines
As seen there is an (Xilinx and Altera) FPGA loader driver allready available in u-boot.
Please can somebody explain how I have to provide a FPGA bitstream image to u-boot?The easiest way is to reserve some unused flash sectors and use the first sector's start adress as arg for "fpga load".
I assume this will only work with NOR flash, right?
I'm using NOR flash, but it will work with any adressable memory.
Quoted 1 line
If I'm using NAND flash I have to copy the image to ram first?
yes.
Quoted 1 line
Quoted 1 line
Quoted 1 line
It seems I have to create a image with mkimage?
you can store e.g. fpga.bin as a single file inside jffs, read it and load your fpga.
Quoted 4 lines
Quoted 4 lines
no - Lattice specififc bitstream can be stored in raw format. mkimage may be useful for update, but personally I prefer update via dedicated linux mtd partition.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
This image have to be loaded into ram and the address has to be provided to the load command?
Usually an FPGA is *very* board specific. I'd suggest to use flash and create a corresponding mtd partition for linux, i.e. make it maintainable.
Seems to be a good way.
Quoted 8 lines
yes - but not for jffs2 on NAND. You can use a plain binary file instead.
Quoted 2 lines
Is there a cmd in u-boot to read a file from a jffs2 filesystem inside a nand flash partition?
Have a look at the end of
common/cmd_jffs2.c: fsload is the one for you.Thanks for that link :)
Quoted 13 lines
Quoted 12 lines
Quoted 8 lines
Quoted 3 lines
Is there a maintainer for the FPGA code inside u-boot? I'm willing to contribute some extensions for Lattice FPGAs if I'm successful!
excellent - all you'll need is the Lattice specific bit toggle sequence.
submitting a proper patch will surely do.
I'm trying to get an idea what place is the best to integrate the lattice architecture in to the fpga framework.
If I have any further questions - can I ask you again?Quoted 6 lines
Quoted 2 lines
of course, but since I'm a PowerPC user I can't tell anything specific to ARM ...
Thanks again!
So I would try to bring it up and see what happens :)
yes - to get it done quickly I'd recommend to add a new Lattice device family. Please create e.g.
drivers/fpga/lattice.candlattice_ecp3.c(matching your device) according to the xilinx and altera templates. It will integrate intocommon/cmd_fpga.csmoothly.
Quoted 6 lines
GPIO accessor functions have to be defined inside the board specific code. If you definitely want to use spi please do it there, i.e. *not* in the general code unless this is useful for all boards.
You can have a look at board/matrix_vision/mvbc_p/fpga.c+h
Ahh, thats what I want to hear. This will save much time to figure it all out.
Sorry, but I'm a newbie compared with all these experts here. So what is clear for everybody isn't clear for me (at least until now...)
But hopefully this becomes better :)
Many thanks!
Cheers,
Dieter
Quoted 38 lines
Regards,
Andr??
Quoted 29 lines
Dieter
Quoted 27 lines
Cheers,
Andr??
Quoted 18 lines
Quoted 3 lines
Regards,
Andr??
Many thanks for helping,
DieterQuoted 11 lines
Quoted 6 lines
Thanks to all,
Dieter
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootMATRIX VISION GmbH, Talstrae 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschftsfhrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim ReichMATRIX VISION GmbH, Talstrae 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschftsfhrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim ReichMATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich