Add support for loading FPGA bitstream
cover Add support for loading FPGA bitstream
From: Tien Fong Chee <[email protected]>
These series of patches enable peripheral bitstream being programmed into FPGA to get the DDR up running. This's also called early IO release, because the peripheral bitstream is only initializing FPGA IOs, PLL, IO48 and DDR.
Once DDR is up running, core bitstream from MMC which contains user FPGA design would be loaded into DDR location. socfpga loadfs would be called to program core bitstream into FPGA and entering user mode.
Lastly, u-boot-dtb.img from MMC FAT partition would be loaded to DDR, and up running from there.
For this whole mechanism to work, the SDMMC flash layout would be designed as shown in below:
RAW partition:
1. spl_w_dtb-mkpimage.bin
mkpimage -hv 1 -o spl/spl_w_dtb-mkpimage.bin spl/u-boot-spl-dtb.bin
spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.bin
FAT partition contains:
Bitstreams
----------
Early IO release method is recommended for the sake of performance, improve up to 86% compare to full RBF.
1. ghrd_10as066n2.periph.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage
2. ghrd_10as066n2.core.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.core.rbf ghrd_10as066n2.core.rbf.mkimage
OR
1. ghrd_10as066n2.rbf.mkimage (full RBF)
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.rbf ghrd_10as066n2.rbf.mkimage
U-Boot image
------------
3. u-boot-dtb.img
For the testing purpose, these two patches are required to apply 1st before applying this series of patches.
1. [U-Boot] [PATCH] misc: fs_loader: Switching private data allocation to DM auto allocation
https://www.mail-archive.com/u-boot at lists.denx.de/msg308954.html
2. [U-Boot] [PATCH v2] Add support for initializing MMC
https://www.mail-archive.com/u-boot at lists.denx.de/msg310532.html Version 2 under review.
This series is working on top of u-boot.git -
http://git.denx.de/u-boot.git .
Marek Vasut (1):
ARM: socfpga: Synchronize the configuration for A10 SoCDK
Tien Fong Chee (5):
ARM: socfpga: Description on FPGA bitstream type and file name for
Arria 10
ARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading
ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
ARM: dts: socfpga: Add missing SDMMC reset
spl : socfpga: Implement fpga bitstream loading with socfpga loadfs
arch/arm/dts/socfpga_arria10.dtsi | 1 + arch/arm/dts/socfpga_arria10_socdk_sdmmc.dts | 18 + .../include/mach/fpga_manager_arria10.h | 40 ++- arch/arm/mach-socfpga/spl_a10.c | 46 +++- configs/socfpga_arria10_defconfig | 46 ++- .../fpga/altera-socfpga-a10-fpga-mgr.txt | 21 + drivers/fpga/Kconfig | 9 + drivers/fpga/socfpga_arria10.c | 396 +++++++++++++++++++- 8 files changed, 558 insertions(+), 19 deletions(-)
Signature · 1 line
1.7.7.4
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name used for both peripheral bitstream and core bitstream.
--- .../fpga/altera-socfpga-a10-fpga-mgr.txt | 21 ++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)
doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +21 -0
@@ -7,13 +7,34 @@ Required properties: - The second index is for writing FPGA configuration data. - resets : Phandle and reset specifier for the device's reset. - clocks : Clocks used by the device. +- altr,bitstream : File name for FPGA peripheral raw binary which is used + to initialize FPGA IOs, PLL, IO48 and DDR. + or + File name for full RBF, consist of periph RBF and core RBF +- altr,bitstream-core : File name for core RBF which contains FPGA design + which is used to program FPGA CRAM and ERAM. Example: +- Examples for booting with early IO release, enter early user mode(periph RBF): + + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr"; + reg = <0xffd03000 0x100 + 0xffcfe400 0x20>; + clocks = <&l4_mp_clk>; + resets = <&rst FPGAMGR_RESET>; + altr,bitstream = "ghrd_10as066n2.periph.rbf.mkimage"; + altr,bitstream-core = "ghrd_10as066n2.core.rbf.mkimage"; + }; + +- Examples for booting with full release, enter user mode with full RBF: + fpga_mgr: fpga-mgr at ffd03000 { compatible = "altr,socfpga-a10-fpga-mgr"; reg = <0xffd03000 0x100 0xffcfe400 0x20>; clocks = <&l4_mp_clk>; resets = <&rst FPGAMGR_RESET>; + altr,bitstream = "ghrd_10as066n2.rbf.mkimage"; };
Signature · 1 line
1.7.7.4
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 27 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name used for both peripheral bitstream and core bitstream.
Signed-off-by Tien Fong Chee <[email protected]>--- .../fpga/altera-socfpga-a10-fpga-mgr.txt | 21 ++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +6
-0@@ -7,13 +7,34 @@ Required properties: - The second index is for writing FPGA configuration data. - resets : Phandle and reset specifier for the device's reset. - clocks : Clocks used by the device. +- altr,bitstream : File name for FPGA peripheral raw binary which is used + to initialize FPGA IOs, PLL, IO48 and DDR. + or + File name for full RBF, consist of periph RBF and core RBF +- altr,bitstream-core : File name for core RBF which contains FPGA design + which is used to program FPGA CRAM and ERAM. Example:
doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt Required properties: · line 28
Quoted 10 lines
doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +10
-0+- Examples for booting with early IO release, enter early user mode(periph RBF): + + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr"; + reg = <0xffd03000 0x100 + 0xffcfe400 0x20>; + clocks = <&l4_mp_clk>; + resets = <&rst FPGAMGR_RESET>; + altr,bitstream = "ghrd_10as066n2.periph.rbf.mkimage"; + altr,bitstream-core = "ghrd_10as066n2.core.rbf.mkimage";
What is this .mkimage format about ? Is that uImage ? Since it's two files, it could probably be bundled into fitImage instead ?
Quoted 13 lines
doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +5
-0+ }; + +- Examples for booting with full release, enter user mode with full RBF: + fpga_mgr: fpga-mgr at ffd03000 { compatible = "altr,socfpga-a10-fpga-mgr"; reg = <0xffd03000 0x100 0xffcfe400 0x20>; clocks = <&l4_mp_clk>; resets = <&rst FPGAMGR_RESET>; + altr,bitstream = "ghrd_10as066n2.rbf.mkimage"; };
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 45 lines · Marek Vasut
Quoted 44 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name used for both
peripheral bitstream and core bitstream.Signed-off-by Tien Fong Chee <[email protected]>---
.../fpga/altera-socfpga-a10-fpga-mgr.txt | 21
++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)(quoted diff) +0
-0mgr.txt b/doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga- mgr.txt
index 2fd8e7a..4552edc 100644doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +0
-0@@ -7,13 +7,34 @@ Required properties:- The second index is for writing FPGA configuration data.
- resets : Phandle and reset specifier for the device's reset.
- clocks : Clocks used by the device.
+- altr,bitstream : File name for FPGA peripheral raw binary which is useddoc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +3
-0+ to initialize FPGA IOs, PLL, IO48 and DDR. + or + File name for full RBF, consist of periph RBFand core RBF
+- altr,bitstream-core : File name for core RBF which contains FPGA designdoc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +1
-0+ which is used to program FPGA CRAM andERAM.
Example:
+- Examples for booting with early IO release, enter early user mode(periph RBF):doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +5
-0+ + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr"; + reg = <0xffd03000 0x100 + 0xffcfe400 0x20>;
Quoted 9 lines
Quoted 6 lines
doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +3
-0+ clocks = <&l4_mp_clk>; + resets = <&rst FPGAMGR_RESET>; + altr,bitstream ="ghrd_10as066n2.periph.rbf.mkimage";
doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +1
-0+ altr,bitstream-core ="ghrd_10as066n2.core.rbf.mkimage";
What is this .mkimage format about ? Is that uImage ? Since it's two files, it could probably be bundled into fitImage instead ?
What is this .mkimage format about ? Is that uImage ? mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage. Yeah, this is uImage. The reason of using it for appending the header contains file size and CRC checksum to the ghrd_10as066n2.periph.rbf. These both file size and CRC checksum are required in socfpga loadfs driver.
Since it's two> files, it could probably be bundled into fitImage instead ?
I assume you are saying the series fitImage implementation patches as i had previously submitted which contains U-Boot, and FPGA core bitstream in fitImage. core bitstream can be bundled into fitImage, with the file name as ghrd_10as066n2.core.rbf, without mkimage, so this bitstream would be loadded into DDR with function fpga load instead of fpga loadfs. ghrd_10as066n2.periph.rbf.mkimage is separate file required for getting DDR up 1st before loading fitImage.
Quoted 16 lines
Quoted 15 lines
doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +3
-0+ }; + +- Examples for booting with full release, enter user mode withfull RBF:
+
fpga_mgr: fpga-mgr atffd03000{ compatible = "altr,socfpga-a10-fpga-mgr"; reg = <0xffd030000x1000xffcfe4000x20>;
clocks = <&l4_mp_clk>;
resets = <&rstFPGAMGR_RESET>;doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +1
-0+ altr,bitstream = "ghrd_10as066n2.rbf.mkimage";};
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 55 lines · Tien Fong
Quoted 45 lines · Marek Vasut
Quoted 44 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name used for both
peripheral bitstream and core bitstream.Signed-off-by Tien Fong Chee <[email protected]>---
.../fpga/altera-socfpga-a10-fpga-mgr.txt | 21
++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)(quoted diff) +0
-0mgr.txt b/doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga- mgr.txt
index 2fd8e7a..4552edc 100644doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +0
-0@@ -7,13 +7,34 @@ Required properties:- The second index is for writing FPGA configuration data.
- resets : Phandle and reset specifier for the device's reset.
- clocks : Clocks used by the device.
+- altr,bitstream : File name for FPGA peripheral raw binary which is useddoc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +3
-0+ to initialize FPGA IOs, PLL, IO48 and DDR. + or + File name for full RBF, consist of periph RBFand core RBF
+- altr,bitstream-core : File name for core RBF which contains FPGA designdoc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +1
-0+ which is used to program FPGA CRAM andERAM.
Example:
+- Examples for booting with early IO release, enter early user mode(periph RBF):doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +5
-0+ + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr"; + reg = <0xffd03000 0x100 + 0xffcfe400 0x20>;Quoted 9 lines
Quoted 6 lines
doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +3
-0+ clocks = <&l4_mp_clk>; + resets = <&rst FPGAMGR_RESET>; + altr,bitstream ="ghrd_10as066n2.periph.rbf.mkimage";
doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +1
-0+ altr,bitstream-core ="ghrd_10as066n2.core.rbf.mkimage";
What is this .mkimage format about ? Is that uImage ? Since it's two files, it could probably be bundled into fitImage instead ?
Quoted 7 lines
What is this .mkimage format about ? Is that uImage ? mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage. Yeah, this is uImage. The reason of using it for appending the header contains file size and CRC checksum to the ghrd_10as066n2.periph.rbf. These both file size and CRC checksum are required in socfpga loadfs driver.
CRC32 is real weak. fitImage supports all kinds of more fitting checksum algorithms and more.
Quoted 5 lines
Since it's two> files, it could probably be bundled into fitImage instead ?
I assume you are saying the series fitImage implementation patches as i had previously submitted which contains U-Boot, and FPGA core bitstream in fitImage.
No, just bundle the bitstream in a fitImage if it's multiple files and if it makes sense.
Quoted 5 lines
core bitstream can be bundled into fitImage, with the file name as ghrd_10as066n2.core.rbf, without mkimage, so this bitstream would be loadded into DDR with function fpga load instead of fpga loadfs. ghrd_10as066n2.periph.rbf.mkimage is separate file required for getting DDR up 1st before loading fitImage.
Does that mean you only need to load one of the files (you can do that with fitImage too) ? But then, what's the point of specifying both in the DT if only one is needed ?
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 80 lines · Marek Vasut
Quoted 68 lines · Tien Fong
Quoted 57 lines · Marek Vasut
Quoted 55 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name used for
both
peripheral bitstream and core bitstream.Signed-off-by Tien Fong Chee <[email protected]>---
.../fpga/altera-socfpga-a10-fpga-mgr.txt | 21
++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)(quoted diff) +0
-0fpga-
mgr.txt b/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt
index 2fd8e7a..4552edc 100644
--- a/doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga- mgr.txt
+++ b/doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga- mgr.txt(quoted diff) +0
-0@@ -7,13 +7,34 @@ Required properties:- The second index is for writing FPGA configuration data.
- resets : Phandle and reset specifier for the device's reset.
- clocks : Clocks used by the device.
+- altr,bitstream : File name for FPGA peripheral raw binary which
is useddoc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +3
-0+ to initialize FPGA IOs, PLL, IO48 and DDR. + or + File name for full RBF, consist of periphRBF
and core RBF
+- altr,bitstream-core : File name for core RBF which contains FPGA
design(quoted diff) +1
-0+ which is used to program FPGA CRAM andERAM.
Example:
+- Examples for booting with early IO release, enter early user mode(periph RBF):doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +6
-0+ + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr"; + reg = <0xffd03000 0x100 + 0xffcfe400 0x20>; + clocks = <&l4_mp_clk>;Quoted 9 lines
Quoted 5 lines
(quoted diff) +2
-0+ resets = <&rst FPGAMGR_RESET>; + altr,bitstream ="ghrd_10as066n2.periph.rbf.mkimage";
(quoted diff) +1
-0+ altr,bitstream-core ="ghrd_10as066n2.core.rbf.mkimage";
What is this .mkimage format about ? Is that uImage ? Since it's two
files, it could probably be bundled into fitImage instead ?Quoted 11 lines
What is this .mkimage format about ? Is that uImage ? mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage. Yeah, this is uImage. The reason of using it for appending the header
contains file size and CRC checksum to the ghrd_10as066n2.periph.rbf.
These both file size and CRC checksum are required in socfpga loadfs
driver.
Quoted 3 lines
CRC32 is real weak. fitImage supports all kinds of more fitting checksum
algorithms and more.
Okay.
Quoted 9 lines
Quoted 9 lines
Since it's two> files, it could probably be bundled into fitImage instead ?
I assume you are saying the series fitImage implementation patches as i
had previously submitted which contains U-Boot, and FPGA core bitstream
in fitImage.
Quoted 3 lines
No, just bundle the bitstream in a fitImage if it's multiple files and
if it makes sense.
I need to explore 1st what's already supported in mainstream for loading bitstream in a fitImage. That's would be good if you have ideas and details of implementation to share out.
Quoted 8 lines
Quoted 8 lines
core bitstream can be bundled into fitImage, with the file name as ghrd_10as066n2.core.rbf, without mkimage, so this bitstream would be loadded into DDR with function fpga load instead of fpga loadfs. ghrd_10as066n2.periph.rbf.mkimage is separate file required for
getting DDR up 1st before loading fitImage.
Quoted 4 lines
Does that mean you only need to load one of the files (you can do that
with fitImage too) ? But then, what's the point of specifying both in the DT if only one is needed ?
Here is the description of the flow based on the previous submitted series patches for setting up the DDR with periph.rbf.mkimage(standalone file), then followed by the core.rbf in fitImage loading into DDR for programming user design into FPGA. The implementation of loading core.rbf in fitImage into DDR is already supported in the common code, and programming into FPGA through a function called fpga load(which requires DDR get up running 1st).
Quoted 1 line
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 112 lines · Tien Fong
Quoted 80 lines · Marek Vasut
Quoted 68 lines · Tien Fong
Quoted 57 lines · Marek Vasut
Quoted 55 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name used for
both
peripheral bitstream and core bitstream.Signed-off-by Tien Fong Chee <[email protected]>---
.../fpga/altera-socfpga-a10-fpga-mgr.txt | 21
++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)(quoted diff) +0
-0fpga-
mgr.txt b/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt
index 2fd8e7a..4552edc 100644
--- a/doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga- mgr.txt
+++ b/doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga- mgr.txt(quoted diff) +0
-0@@ -7,13 +7,34 @@ Required properties:- The second index is for writing FPGA configuration data.
- resets : Phandle and reset specifier for the device's reset.
- clocks : Clocks used by the device.
+- altr,bitstream : File name for FPGA peripheral raw binary which
is useddoc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +3
-0+ to initialize FPGA IOs, PLL, IO48 and DDR. + or + File name for full RBF, consist of periphRBF
and core RBF
+- altr,bitstream-core : File name for core RBF which contains FPGA
design(quoted diff) +1
-0+ which is used to program FPGA CRAM andERAM.
Example:
+- Examples for booting with early IO release, enter early user mode(periph RBF):doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +6
-0+ + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr"; + reg = <0xffd03000 0x100 + 0xffcfe400 0x20>; + clocks = <&l4_mp_clk>;Quoted 9 lines
Quoted 5 lines
(quoted diff) +2
-0+ resets = <&rst FPGAMGR_RESET>; + altr,bitstream ="ghrd_10as066n2.periph.rbf.mkimage";
(quoted diff) +1
-0+ altr,bitstream-core ="ghrd_10as066n2.core.rbf.mkimage";
What is this .mkimage format about ? Is that uImage ? Since it's two
files, it could probably be bundled into fitImage instead ?Quoted 11 lines
What is this .mkimage format about ? Is that uImage ? mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage. Yeah, this is uImage. The reason of using it for appending the header
contains file size and CRC checksum to the ghrd_10as066n2.periph.rbf.
These both file size and CRC checksum are required in socfpga loadfs
driver.Quoted 3 lines
CRC32 is real weak. fitImage supports all kinds of more fitting checksum
algorithms and more.Okay.
Quoted 9 lines
Quoted 9 lines
Since it's two> files, it could probably be bundled into fitImage instead ?
I assume you are saying the series fitImage implementation patches as i
had previously submitted which contains U-Boot, and FPGA core bitstream
in fitImage.Quoted 3 lines
No, just bundle the bitstream in a fitImage if it's multiple files and
if it makes sense.I need to explore 1st what's already supported in mainstream for loading bitstream in a fitImage. That's would be good if you have ideas and details of implementation to share out.
Quoted 8 lines
Quoted 8 lines
core bitstream can be bundled into fitImage, with the file name as ghrd_10as066n2.core.rbf, without mkimage, so this bitstream would be loadded into DDR with function fpga load instead of fpga loadfs. ghrd_10as066n2.periph.rbf.mkimage is separate file required for
getting DDR up 1st before loading fitImage.Quoted 4 lines
Does that mean you only need to load one of the files (you can do that
with fitImage too) ? But then, what's the point of specifying both in the DT if only one is needed ?
Quoted 7 lines
Here is the description of the flow based on the previous submitted series patches for setting up the DDR with
periph.rbf.mkimage(standalone file), then followed by the core.rbf in fitImage loading into DDR for programming user design into FPGA. The implementation of loading core.rbf in fitImage into DDR is already supported in the common code, and programming into FPGA through a function called fpga load(which requires DDR get up running 1st).
So the core.rbf is optional ? I think you can try looking at mkimage -E , which would allow you to do partial image loading in SPL.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 152 lines · Marek Vasut
Quoted 142 lines · Tien Fong
Quoted 97 lines · Marek Vasut
Quoted 83 lines · Tien Fong
Quoted 71 lines · Marek Vasut
Quoted 68 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name used
for
both
peripheral bitstream and core bitstream.Signed-off-by Tien Fong Chee <[email protected]>---
.../fpga/altera-socfpga-a10-fpga-mgr.txt | 21
++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)(quoted diff) +0
-0a10-
fpga-
mgr.txt b/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt
index 2fd8e7a..4552edc 100644
--- a/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt
+++ b/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt(quoted diff) +0
-0@@ -7,13 +7,34 @@ Required properties:- The second index is for writing FPGA configuration data.
- resets : Phandle and reset specifier for the device's
reset.
- clocks : Clocks used by the device.
+- altr,bitstream : File name for FPGA peripheral raw binary
which
is used(quoted diff) +1
-0+ to initialize FPGA IOs, PLL, IO48 andDDR.
(quoted diff) +2
-0+ or + File name for full RBF, consist ofperiph
RBF
and core RBF
+- altr,bitstream-core : File name for core RBF which contains
FPGA
design(quoted diff) +1
-0+ which is used to program FPGA CRAMand
ERAM.
Example:
+- Examples for booting with early IO release, enter early user
mode(periph RBF):doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +7
-0+ + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr"; + reg = <0xffd03000 0x100 + 0xffcfe400 0x20>; + clocks = <&l4_mp_clk>; + resets = <&rst FPGAMGR_RESET>;Quoted 9 lines
Quoted 4 lines
(quoted diff) +1
-0+ altr,bitstream ="ghrd_10as066n2.periph.rbf.mkimage";
(quoted diff) +1
-0+ altr,bitstream-core ="ghrd_10as066n2.core.rbf.mkimage";
What is this .mkimage format about ? Is that uImage ? Since it's
two
files, it could probably be bundled into fitImage instead ?Quoted 12 lines
What is this .mkimage format about ? Is that uImage ? mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage. Yeah, this is uImage. The reason of using it for appending the header
contains file size and CRC checksum to the ghrd_10as066n2.periph.rbf.
These both file size and CRC checksum are required in socfpga loadfs
driver.Quoted 3 lines
CRC32 is real weak. fitImage supports all kinds of more fitting checksum
algorithms and more.Okay.
Quoted 13 lines
Quoted 4 lines
Quoted 9 lines
Since it's two> files, it could probably be bundled into fitImage
instead ?
I assume you are saying the series fitImage implementation patches
as i
had previously submitted which contains U-Boot, and FPGA core bitstream
in fitImage.Quoted 4 lines
No, just bundle the bitstream in a fitImage if it's multiple files
and
if it makes sense.I need to explore 1st what's already supported in mainstream for loading bitstream in a fitImage. That's would be good if you have ideas
and details of implementation to share out.Quoted 13 lines
Quoted 4 lines
Quoted 9 lines
core bitstream can be bundled into fitImage, with the file name as ghrd_10as066n2.core.rbf, without mkimage, so this bitstream
would be loadded into DDR with function fpga load instead of fpga
loadfs. ghrd_10as066n2.periph.rbf.mkimage is separate file required
for
getting DDR up 1st before loading fitImage.Quoted 5 lines
Does that mean you only need to load one of the files (you can do that
with fitImage too) ? But then, what's the point of specifying both in
the DT if only one is needed ?Quoted 9 lines
Here is the description of the flow based on the previous submitted series patches for setting up the DDR with
periph.rbf.mkimage(standalone file), then followed by the core.rbf in
fitImage loading into DDR for programming user design into FPGA. The
implementation of loading core.rbf in fitImage into DDR is already supported in the common code, and programming into FPGA through a function called fpga load(which requires DDR get up running 1st).
Quoted 1 line
So the core.rbf is optional ?
Yes, it can be optional if no user design.
Quoted 2 lines
I think you can try looking at mkimage -E
, which would allow you to do partial image loading in SPL.
Okay.
Quoted 1 line
Chee
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
In reply to Marek VasutQuoted 152 lines · Marek Vasut
Quoted 142 lines · Tien Fong
Quoted 97 lines · Marek Vasut
Quoted 83 lines · Tien Fong
Quoted 71 lines · Marek Vasut
Quoted 68 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name used
for
both
peripheral bitstream and core bitstream.Signed-off-by Tien Fong Chee <[email protected]>---
.../fpga/altera-socfpga-a10-fpga-mgr.txt | 21
++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)(quoted diff) +0
-0a10-
fpga-
mgr.txt b/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt
index 2fd8e7a..4552edc 100644
--- a/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt
+++ b/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt(quoted diff) +0
-0@@ -7,13 +7,34 @@ Required properties:- The second index is for writing FPGA configuration data.
- resets : Phandle and reset specifier for the device's
reset.
- clocks : Clocks used by the device.
+- altr,bitstream : File name for FPGA peripheral raw binary
which
is used(quoted diff) +1
-0+ to initialize FPGA IOs, PLL, IO48 andDDR.
(quoted diff) +2
-0+ or + File name for full RBF, consist ofperiph
RBF
and core RBF
+- altr,bitstream-core : File name for core RBF which contains
FPGA
design(quoted diff) +1
-0+ which is used to program FPGA CRAMand
ERAM.
Example:
+- Examples for booting with early IO release, enter early user
mode(periph RBF):doc/device-tree-bindings/fpga/altera-socfpga-a10-fpga-mgr.txt +7
-0+ + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr"; + reg = <0xffd03000 0x100 + 0xffcfe400 0x20>; + clocks = <&l4_mp_clk>; + resets = <&rst FPGAMGR_RESET>;Quoted 9 lines
Quoted 4 lines
(quoted diff) +1
-0+ altr,bitstream ="ghrd_10as066n2.periph.rbf.mkimage";
(quoted diff) +1
-0+ altr,bitstream-core ="ghrd_10as066n2.core.rbf.mkimage";
What is this .mkimage format about ? Is that uImage ? Since it's
two
files, it could probably be bundled into fitImage instead ?Quoted 12 lines
What is this .mkimage format about ? Is that uImage ? mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage. Yeah, this is uImage. The reason of using it for appending the header
contains file size and CRC checksum to the ghrd_10as066n2.periph.rbf.
These both file size and CRC checksum are required in socfpga loadfs
driver.Quoted 3 lines
CRC32 is real weak. fitImage supports all kinds of more fitting checksum
algorithms and more.Okay.
Quoted 13 lines
Quoted 4 lines
Quoted 9 lines
Since it's two> files, it could probably be bundled into fitImage
instead ?
I assume you are saying the series fitImage implementation patches
as i
had previously submitted which contains U-Boot, and FPGA core bitstream
in fitImage.Quoted 4 lines
No, just bundle the bitstream in a fitImage if it's multiple files
and
if it makes sense.I need to explore 1st what's already supported in mainstream for loading bitstream in a fitImage. That's would be good if you have ideas
and details of implementation to share out.Quoted 13 lines
Quoted 4 lines
Quoted 9 lines
core bitstream can be bundled into fitImage, with the file name as ghrd_10as066n2.core.rbf, without mkimage, so this bitstream
would be loadded into DDR with function fpga load instead of fpga
loadfs. ghrd_10as066n2.periph.rbf.mkimage is separate file required
for
getting DDR up 1st before loading fitImage.Quoted 5 lines
Does that mean you only need to load one of the files (you can do that
with fitImage too) ? But then, what's the point of specifying both in
the DT if only one is needed ?Quoted 9 lines
Here is the description of the flow based on the previous submitted series patches for setting up the DDR with
periph.rbf.mkimage(standalone file), then followed by the core.rbf in
fitImage loading into DDR for programming user design into FPGA. The
implementation of loading core.rbf in fitImage into DDR is already supported in the common code, and programming into FPGA through a function called fpga load(which requires DDR get up running 1st).
Quoted 3 lines
So the core.rbf is optional ? I think you can try looking at mkimage -E
, which would allow you to do partial image loading in SPL.
1. Is it mkimage -e, which -e==> set entry point to 'ep' (hex)?
2. What you means with partial loading? partial loading for periph.rbf or core.rbf or both rbfs?
3. Is this partial loading come from common code or already supported?
Quoted 1 line
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 153 lines · Tien Fong
Quoted 152 lines · Marek Vasut
Quoted 151 lines · Tien Fong
Quoted 97 lines · Marek Vasut
Quoted 83 lines · Tien Fong
Quoted 71 lines · Marek Vasut
Quoted 68 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name used
for
both
peripheral bitstream and core bitstream.Signed-off-by Tien Fong Chee <[email protected]>---
.../fpga/altera-socfpga-a10-fpga-mgr.txt | 21
++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)(quoted diff) +0
-0a10-
fpga-
mgr.txt b/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt
index 2fd8e7a..4552edc 100644
--- a/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt
+++ b/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt(quoted diff) +0
-0@@ -7,13 +7,34 @@ Required properties:- The second index is for writing FPGA configuration data.
- resets : Phandle and reset specifier for the device's
reset.
- clocks : Clocks used by the device.
+- altr,bitstream : File name for FPGA peripheral raw binary
which
is used(quoted diff) +1
-0+ to initialize FPGA IOs, PLL, IO48 andDDR.
(quoted diff) +2
-0+ or + File name for full RBF, consist ofperiph
RBF
and core RBF
+- altr,bitstream-core : File name for core RBF which contains
FPGA
design(quoted diff) +1
-0+ which is used to program FPGA CRAMand
ERAM.
Example:
+- Examples for booting with early IO release, enter early user
mode(periph RBF):(quoted diff) +7
-0+ + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr"; + reg = <0xffd03000 0x100 + 0xffcfe400 0x20>; + clocks = <&l4_mp_clk>; + resets = <&rst FPGAMGR_RESET>;Quoted 9 lines
Quoted 4 lines
(quoted diff) +1
-0+ altr,bitstream ="ghrd_10as066n2.periph.rbf.mkimage";
(quoted diff) +1
-0+ altr,bitstream-core ="ghrd_10as066n2.core.rbf.mkimage";
What is this .mkimage format about ? Is that uImage ? Since it's
two
files, it could probably be bundled into fitImage instead ?Quoted 12 lines
What is this .mkimage format about ? Is that uImage ? mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage. Yeah, this is uImage. The reason of using it for appending the header
contains file size and CRC checksum to the ghrd_10as066n2.periph.rbf.
These both file size and CRC checksum are required in socfpga loadfs
driver.Quoted 3 lines
CRC32 is real weak. fitImage supports all kinds of more fitting checksum
algorithms and more.Okay.
Quoted 13 lines
Quoted 4 lines
Quoted 9 lines
Since it's two> files, it could probably be bundled into fitImage
instead ?
I assume you are saying the series fitImage implementation patches
as i
had previously submitted which contains U-Boot, and FPGA core bitstream
in fitImage.Quoted 4 lines
No, just bundle the bitstream in a fitImage if it's multiple files
and
if it makes sense.I need to explore 1st what's already supported in mainstream for loading bitstream in a fitImage. That's would be good if you have ideas
and details of implementation to share out.Quoted 13 lines
Quoted 4 lines
Quoted 9 lines
core bitstream can be bundled into fitImage, with the file name as ghrd_10as066n2.core.rbf, without mkimage, so this bitstream
would be loadded into DDR with function fpga load instead of fpga
loadfs. ghrd_10as066n2.periph.rbf.mkimage is separate file required
for
getting DDR up 1st before loading fitImage.Quoted 5 lines
Does that mean you only need to load one of the files (you can do that
with fitImage too) ? But then, what's the point of specifying both in
the DT if only one is needed ?Here is the description of the flow based on the previous submitted series patches for setting up the DDR with
periph.rbf.mkimage(standalone file), then followed by the core.rbf in
fitImage loading into DDR for programming user design into FPGA. The
implementation of loading core.rbf in fitImage into DDR is already supported in the common code, and programming into FPGA through a function called fpga load(which requires DDR get up running 1st).
Quoted 4 lines
Quoted 3 lines
So the core.rbf is optional ? I think you can try looking at mkimage -E
, which would allow you to do partial image loading in SPL.1. Is it mkimage -e, which -e==> set entry point to 'ep' (hex)?
No, it is -E => place data outside of the FIT structure
Quoted 2 lines
2. What you means with partial loading? partial loading for periph.rbf or core.rbf or both rbfs?
That you can only load the relevant image from the fitImage, not the entire fitImage, which lets you load the core bitstream in SPL.
Quoted 1 line
3. Is this partial loading come from common code or already supported?
Loading subsets of fitImage is supported in SPL, see mkimage -E above.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 191 lines · Marek Vasut
Quoted 190 lines · Tien Fong
Quoted 188 lines · Marek Vasut
Quoted 186 lines · Tien Fong
Quoted 115 lines · Marek Vasut
Quoted 97 lines · Tien Fong
Quoted 84 lines · Marek Vasut
Quoted 80 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This patch adds description on properties about file name
used
for
both
peripheral bitstream and core bitstream.Signed-off-by Tien Fong Chee <[email protected]Quoted 1 line
---
.../fpga/altera-socfpga-a10-fpga-
mgr.txt | 21
++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)(quoted diff) +0
-0socfpga-
a10-
fpga-
mgr.txt b/doc/device-tree-bindings/fpga/altera-socfpga- a10-
fpga-
mgr.txt
index 2fd8e7a..4552edc 100644
--- a/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt
+++ b/doc/device-tree-bindings/fpga/altera-socfpga-a10- fpga-
mgr.txt(quoted diff) +0
-0@@ -7,13 +7,34 @@ Required properties:- The second index is for writing FPGA configuration data.
- resets : Phandle and reset specifier for the device's
reset.
- clocks : Clocks used by the device.
+- altr,bitstream : File name for FPGA peripheral raw binary
which
is used(quoted diff) +1
-0+ to initialize FPGA IOs, PLL, IO48and
DDR.(quoted diff) +2
-0+ or + File name for full RBF, consist ofperiph
RBF
and core RBF
+- altr,bitstream-core : File name for core RBF which contains
FPGA
design(quoted diff) +1
-0+ which is used to program FPGACRAM
and
ERAM.
Example:
+- Examples for booting with early IO release, enter early
user
mode(periph RBF):(quoted diff) +3
-0+ + fpga_mgr: fpga-mgr at ffd03000 { + compatible = "altr,socfpga-a10-fpga-mgr";
(quoted diff) +5
-0+ reg = <0xffd03000 0x100 + 0xffcfe400 0x20>; + clocks = <&l4_mp_clk>; + resets = <&rst FPGAMGR_RESET>; + altr,bitstream ="ghrd_10as066n2.periph.rbf.mkimage";
Quoted 9 lines
Quoted 2 lines
(quoted diff) +1
-0+ altr,bitstream-core ="ghrd_10as066n2.core.rbf.mkimage";
What is this .mkimage format about ? Is that uImage ? Since
it's
two
files, it could probably be bundled into fitImage instead ?Quoted 15 lines
What is this .mkimage format about ? Is that uImage ? mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage.
Yeah, this is uImage. The reason of using it for appending the
header
contains file size and CRC checksum to the ghrd_10as066n2.periph.rbf.
These both file size and CRC checksum are required in socfpga
loadfs
driver.Quoted 4 lines
CRC32 is real weak. fitImage supports all kinds of more fitting
checksum
algorithms and more.Okay.
Quoted 16 lines
Quoted 6 lines
Quoted 10 lines
Since it's two> files, it could probably be bundled into fitImage
instead ?
I assume you are saying the series fitImage implementation patches
as i
had previously submitted which contains U-Boot, and FPGA core
bitstream
in fitImage.Quoted 4 lines
No, just bundle the bitstream in a fitImage if it's multiple files
and
if it makes sense.I need to explore 1st what's already supported in mainstream for
loading bitstream in a fitImage. That's would be good if you have
ideas
and details of implementation to share out.Quoted 16 lines
Quoted 6 lines
Quoted 10 lines
core bitstream can be bundled into fitImage, with the file name as ghrd_10as066n2.core.rbf, without mkimage, so this bitstream
would be loadded into DDR with function fpga load instead of
fpga
loadfs. ghrd_10as066n2.periph.rbf.mkimage is separate file required
for
getting DDR up 1st before loading fitImage.Quoted 6 lines
Does that mean you only need to load one of the files (you can do
that
with fitImage too) ? But then, what's the point of specifying both in
the DT if only one is needed ?Here is the description of the flow based on the previous submitted
series patches for setting up the DDR withperiph.rbf.mkimage(standalone file), then followed by the core.rbf
in
fitImage loading into DDR for programming user design into FPGA.
The
implementation of loading core.rbf in fitImage into DDR is already
supported in the common code, and programming into FPGA through a
function called fpga load(which requires DDR get up running 1st).
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
So the core.rbf is optional ? I think you can try looking at mkimage
-E
, which would allow you to do partial image loading in SPL.1. Is it mkimage -e, which -e==> set entry point to 'ep' (hex)?
No, it is -E => place data outside of the FIT structure
Yes, i found it in mkimage.c
Quoted 7 lines
Quoted 5 lines
2. What you means with partial loading? partial loading for periph.rbf
or core.rbf or both rbfs?That you can only load the relevant image from the fitImage, not the entire fitImage, which lets you load the core bitstream in SPL.
So, you want 2 files periph.rbf.mkimage, and fitImage(contains core.rbf) or both periph.rbf and core.rbf in one fitImage?
Quoted 6 lines
Quoted 4 lines
3. Is this partial loading come from common code or already supported?
Loading subsets of fitImage is supported in SPL, see mkimage -E above.
Okay, i will explore.
Quoted 1 line
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
On 1/4/19 1:46 AM, Chee, Tien Fong wrote:
[...]
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
2. What you means with partial loading? partial loading for periph.rbf
or core.rbf or both rbfs?That you can only load the relevant image from the fitImage, not the entire fitImage, which lets you load the core bitstream in SPL.
So, you want 2 files periph.rbf.mkimage, and fitImage(contains core.rbf) or both periph.rbf and core.rbf in one fitImage?
Does it make sense ?
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 9 lines · Marek Vasut
On 1/4/19 1:46 AM, Chee, Tien Fong wrote:
[...]Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
2. What you means with partial loading? partial loading for periph.rbf
or core.rbf or both rbfs?
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
That you can only load the relevant image from the fitImage, not the
entire fitImage, which lets you load the core bitstream in SPL.So, you want 2 files periph.rbf.mkimage, and fitImage(contains core.rbf) or both periph.rbf and core.rbf in one fitImage?
Does it make sense ?
Which one you refer, 1 or 2?
1. Two files => periph.rbf.mkimage, and fitImage(contains core.rbf) in FAT partition
2. Both periph.rbf and core.rbf in one fitImage in FAT partition
Quoted 1 line
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 13 lines · Tien Fong
Quoted 12 lines · Marek Vasut
On 1/4/19 1:46 AM, Chee, Tien Fong wrote:
[...]Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
2. What you means with partial loading? partial loading for periph.rbf
or core.rbf or both rbfs?That you can only load the relevant image from the fitImage, not the
entire fitImage, which lets you load the core bitstream in SPL.
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
So, you want 2 files periph.rbf.mkimage, and fitImage(contains core.rbf) or both periph.rbf and core.rbf in one fitImage?
Does it make sense ?
Which one you refer, 1 or 2?
1. Two files => periph.rbf.mkimage, and fitImage(contains core.rbf) in FAT partition
2. Both periph.rbf and core.rbf in one fitImage in FAT partition
One fitImage file containing both .rbf files , stored in whatever storage the user needs.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 1/6 ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Quoted 23 lines · Marek Vasut
Quoted 22 lines · Tien Fong
Quoted 20 lines · Marek Vasut
On 1/4/19 1:46 AM, Chee, Tien Fong wrote:
[...]Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
Quoted 8 lines
Quoted 3 lines
2. What you means with partial loading? partial loading for periph.rbf
or core.rbf or both rbfs?That you can only load the relevant image from the fitImage, not
the
entire fitImage, which lets you load the core bitstream in SPL.So, you want 2 files periph.rbf.mkimage, and fitImage(contains core.rbf) or both periph.rbf and core.rbf in one fitImage?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Does it make sense ?
Which one you refer, 1 or 2?
1. Two files => periph.rbf.mkimage, and fitImage(contains core.rbf) in
FAT partition
2. Both periph.rbf and core.rbf in one fitImage in FAT partitionOne fitImage file containing both .rbf files , stored in whatever storage the user needs.
Okay, let me explore feasibility of this kind implementation.
Quoted 1 line
PATCH 2/6 ARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading
In reply to tien.fong.chee at intel.comFrom: Tien Fong Chee <[email protected]>
Add FPGA driver to support program FPGA with FPGA bitstream loading from filesystem. The driver are designed based on generic firmware loader framework. The driver can handle FPGA program operation from loading FPGA bitstream in flash to memory and then to program FPGA.
--- arch/arm/dts/socfpga_arria10_socdk_sdmmc.dts | 18 + .../include/mach/fpga_manager_arria10.h | 40 ++- drivers/fpga/Kconfig | 9 + drivers/fpga/socfpga_arria10.c | 396 +++++++++++++++++++- 4 files changed, 451 insertions(+), 12 deletions(-)
arch/arm/dts/socfpga_arria10_socdk_sdmmc.dts +18 -0
@@ -18,6 +18,24 @@ /dts-v1/; #include "socfpga_arria10_socdk.dtsi" +/ { + chosen { + firmware-loader = &fs_loader0; + }; + + fs_loader0: fs-loader at 0 { + u-boot,dm-pre-reloc; + compatible = "u-boot,fs-loader"; + phandlepart = <&mmc 1>; + }; +}; + +&fpga_mgr { + u-boot,dm-pre-reloc; + altr,bitstream = "ghrd_10as066n2.periph.rbf.mkimage"; + altr,bitstream-core = "ghrd_10as066n2.core.rbf.mkimage"; +}; + &mmc { u-boot,dm-pre-reloc; status = "okay";
arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h +38 -2
@@ -1,9 +1,12 @@/* SPDX-License-Identifier: GPL-2.0 */ /* -* Copyright (C) 2017 Intel Corporation <www.intel.com> +* Copyright (C) 2017-2018 Intel Corporation <www.intel.com> * All rights reserved. */ +#include <altera.h> +#include <image.h> +#ifndef _FPGA_MANAGER_ARRIA10_H_#define _FPGA_MANAGER_ARRIA10_H_
@@ -51,6 +54,10 @@#define ALT_FPGAMGR_IMGCFG_CTL_02_CFGWIDTH_SET_MSK BIT(24)#define ALT_FPGAMGR_IMGCFG_CTL_02_CDRATIO_LSB 16 +#define FPGA_SOCFPGA_A10_RBF_UNENCRYPTED 0xa65c +#define FPGA_SOCFPGA_A10_RBF_ENCRYPTED 0xa65d +#define FPGA_SOCFPGA_A10_RBF_PERIPH 0x0001 +#define FPGA_SOCFPGA_A10_RBF_CORE 0x8001#ifndef __ASSEMBLY__ struct socfpga_fpga_manager {
@@ -88,12 +95,41 @@ struct socfpga_fpga_manager {u32 imgcfg_fifo_status; }; +enum rbf_type { + unknown, + periph_section, + core_section +}; + +enum rbf_security { + invalid, + unencrypted, + encrypted +}; + +struct rbf_info { +enum rbf_type section; +enum rbf_security security; +}; + +struct fpga_loadfs_info { +fpga_fs_info *fpga_fsinfo; +u32 remaining; +u32 offset; +u32 datacrc; +struct rbf_info rbfinfo; +struct image_header header; +}; +/* Functions */ int fpgamgr_program_init (u32 * rbf_data,size_t rbf_size);int fpgamgr_program_finish (void );int is_fpgamgr_user_mode (void );int fpgamgr_wait_early_user_mode (void ); - +int is_fpgamgr_early_user_mode (void ); +const char *get_fpga_filename (const void *fdt,int *len,u32 rbf_type); +int socfpga_loadfs (fpga_fs_info *fpga_fsinfo,const void *buf,size_t bsize, +u32 offset);#endif /* __ASSEMBLY__ */ #endif /* _FPGA_MANAGER_ARRIA10_H_ */
drivers/fpga/Kconfig +9 -0
@@ -21,6 +21,15 @@ config FPGA_SOCFPGA This provides common functionality for Gen5 and Arria10 devices. +config FPGA_SOCFPGA_A10_CRC_CHECK + bool "Enable CRC cheking on Arria10 FPGA bistream" + default y if FPGA_SOCFPGA + help + Enable the CRC checking on Arria 10 FPGA bitstream + + This provides CRC checking to ensure integrated of Arria 10 FPGA + bitstream is programmed into FPGA. + config FPGA_CYCLON2 bool "Enable Altera FPGA driver for Cyclone II" depends on FPGA_ALTERA
drivers/fpga/socfpga_arria10.c +386 -10
433 lines not on this page · raw message
Signature · 1 line
1.7.7.4
PATCH 2/6 ARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading
Quoted 8 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Add FPGA driver to support program FPGA with FPGA bitstream loading from filesystem. The driver are designed based on generic firmware loader framework. The driver can handle FPGA program operation from loading FPGA bitstream in flash to memory and then to program FPGA.
Signed-off-by Tien Fong Chee <[email protected]>
What changed from V5 in each of those patches ?
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 2/6 ARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading
Quoted 12 lines · Marek Vasut
Quoted 11 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Add FPGA driver to support program FPGA with FPGA bitstream loading from
filesystem. The driver are designed based on generic firmware loader
framework. The driver can handle FPGA program operation from loading FPGA
bitstream in flash to memory and then to program FPGA.
Quoted 3 lines
Quoted 1 line
Signed-off-by Tien Fong Chee <[email protected]>What changed from V5 in each of those patches ?
I assume you are saying the v5 i had submmited in 2017.
The major changes i have made are:
1. Stripping of the "fpga loadfs" command support layer on U-Boot console because the DDR would be corrupted if FPGA is reprogrammed.
2. Minor restructure and codes clean up such as understandable name for functions.
3. Using finalized generic firmware loader interface in this driver.
PATCH 2/6 ARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading
Quoted 16 lines · Tien Fong
Quoted 12 lines · Marek Vasut
Quoted 11 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Add FPGA driver to support program FPGA with FPGA bitstream loading from
filesystem. The driver are designed based on generic firmware loader
framework. The driver can handle FPGA program operation from loading FPGA
bitstream in flash to memory and then to program FPGA.Quoted 3 lines
Quoted 1 line
Signed-off-by Tien Fong Chee <[email protected]>What changed from V5 in each of those patches ?
Quoted 8 lines
I assume you are saying the v5 i had submmited in 2017.
The major changes i have made are:
1. Stripping of the "fpga loadfs" command support layer on U-Boot console because the DDR would be corrupted if FPGA is reprogrammed.
2. Minor restructure and codes clean up such as understandable name for functions.
3. Using finalized generic firmware loader interface in this driver.
This should be in the changelog.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 2/6 ARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading
Quoted 31 lines · Marek Vasut
Quoted 22 lines · Tien Fong
Quoted 15 lines · Marek Vasut
Quoted 13 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Add FPGA driver to support program FPGA with FPGA bitstream loading
from
filesystem. The driver are designed based on generic firmware loader
framework. The driver can handle FPGA program operation from loading FPGA
bitstream in flash to memory and then to program FPGA.Quoted 3 lines
Quoted 1 line
Signed-off-by Tien Fong Chee <[email protected]>What changed from V5 in each of those patches ?
I assume you are saying the v5 i had submmited in 2017.
Quoted 8 lines
The major changes i have made are:
1. Stripping of the "fpga loadfs" command support layer on U-Boot console because the DDR would be corrupted if FPGA is reprogrammed.
2. Minor restructure and codes clean up such as understandable name for
functions.
3. Using finalized generic firmware loader interface in this driver.
Quoted 1 line
This should be in the changelog.
Okay.
Quoted 1 line
PATCH 3/6 ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
In reply to tien.fong.chee at intel.comFrom: Tien Fong Chee <[email protected]>
Update the default configuration file to enable the necessary functionality to get the SoCFPGA loadfs driver support. This would enable the implementation of programming bitstream into FPGA from MMC.
--- configs/socfpga_arria10_defconfig | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
configs/socfpga_arria10_defconfig +8 -0
@@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc" CONFIG_ENV_IS_IN_MMC=y +CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y +CONFIG_SPL_DM_MMC=y +CONFIG_SPL_MMC_SUPPORT=y +CONFIG_SPL_EXT_SUPPORT=y +CONFIG_SPL_FAT_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 +CONFIG_FS_LOADER=y CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y
Signature · 1 line
1.7.7.4
PATCH 3/6 ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
Quoted 18 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Update the default configuration file to enable the necessary functionality to get the SoCFPGA loadfs driver support. This would enable the implementation of programming bitstream into FPGA from MMC.
Signed-off-by Tien Fong Chee <[email protected]>--- configs/socfpga_arria10_defconfig | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)configs/socfpga_arria10_defconfig +0
-0@@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
configs/socfpga_arria10_defconfig CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" · line 38
Quoted 10 lines
configs/socfpga_arria10_defconfig +7
-0CONFIG_ENV_IS_IN_MMC=y +CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y +CONFIG_SPL_DM_MMC=y +CONFIG_SPL_MMC_SUPPORT=y +CONFIG_SPL_EXT_SUPPORT=y +CONFIG_SPL_FAT_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
This breaks systems with large FAT clusters. Why is this needed for programming the FPGA from MMC ?
Quoted 5 lines
configs/socfpga_arria10_defconfig +1
-0+CONFIG_FS_LOADER=y CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 3/6 ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
Quoted 26 lines · Marek Vasut
Quoted 25 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Update the default configuration file to enable the necessary functionality
to get the SoCFPGA loadfs driver support. This would enable the implementation of programming bitstream into FPGA from MMC.Signed-off-by Tien Fong Chee <[email protected]>---
configs/socfpga_arria10_defconfig | 8 ++++++++1 files changed, 8 insertions(+), 0 deletions(-)configs/socfpga_arria10_defconfig +0
-0@@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" # CONFIG_EFI_PARTITION is not setCONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
CONFIG_ENV_IS_IN_MMC=y+CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
Quoted 8 lines
configs/socfpga_arria10_defconfig CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" · line 38
Quoted 6 lines
configs/socfpga_arria10_defconfig +6
-0+CONFIG_SPL_DM_MMC=y +CONFIG_SPL_MMC_SUPPORT=y +CONFIG_SPL_EXT_SUPPORT=y +CONFIG_SPL_FAT_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384This breaks systems with large FAT clusters. Why is this needed for programming the FPGA from MMC ?
This is final tuning in term of getting balance between performance and SPL image size for the socdk devkit. User can change that if they need large FAT cluster in their design, right?
Quoted 8 lines
Quoted 7 lines
+CONFIG_FS_LOADER=y
CONFIG_FPGA_SOCFPGA=y
CONFIG_DM_GPIO=y
CONFIG_DWAPB_GPIO=y
PATCH 3/6 ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
Quoted 35 lines · Tien Fong
Quoted 26 lines · Marek Vasut
Quoted 25 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Update the default configuration file to enable the necessary functionality
to get the SoCFPGA loadfs driver support. This would enable the implementation of programming bitstream into FPGA from MMC.Signed-off-by Tien Fong Chee <[email protected]>---
configs/socfpga_arria10_defconfig | 8 ++++++++1 files changed, 8 insertions(+), 0 deletions(-)configs/socfpga_arria10_defconfig +0
-0@@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" # CONFIG_EFI_PARTITION is not setCONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
CONFIG_ENV_IS_IN_MMC=y+CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=yQuoted 8 lines
configs/socfpga_arria10_defconfig CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" · line 38
Quoted 6 lines
configs/socfpga_arria10_defconfig +6
-0+CONFIG_SPL_DM_MMC=y +CONFIG_SPL_MMC_SUPPORT=y +CONFIG_SPL_EXT_SUPPORT=y +CONFIG_SPL_FAT_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384This breaks systems with large FAT clusters. Why is this needed for programming the FPGA from MMC ?
Quoted 3 lines
This is final tuning in term of getting balance between performance and SPL image size for the socdk devkit. User can change that if they need large FAT cluster in their design, right?
I think it'd rather make sense to fix the FAT driver to avoid statically allocating those massive buffers for big clusters. I think that can be done by allocating those on stack instead ... or mallocating them.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 3/6 ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
Quoted 45 lines · Marek Vasut
Quoted 39 lines · Tien Fong
Quoted 29 lines · Marek Vasut
Quoted 27 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Update the default configuration file to enable the necessary functionality
to get the SoCFPGA loadfs driver support. This would enable the implementation of programming bitstream into FPGA from MMC.Signed-off-by Tien Fong Chee <[email protected]>---
configs/socfpga_arria10_defconfig | 8 ++++++++1 files changed, 8 insertions(+), 0 deletions(-)configs/socfpga_arria10_defconfig +0
-0@@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" # CONFIG_EFI_PARTITION is not setCONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
CONFIG_ENV_IS_IN_MMC=y+CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SPL_DM_MMC=yQuoted 8 lines
configs/socfpga_arria10_defconfig CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" · line 38
Quoted 5 lines
configs/socfpga_arria10_defconfig +5
-0+CONFIG_SPL_MMC_SUPPORT=y +CONFIG_SPL_EXT_SUPPORT=y +CONFIG_SPL_FAT_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384This breaks systems with large FAT clusters. Why is this needed for
programming the FPGA from MMC ?Quoted 5 lines
This is final tuning in term of getting balance between performance and
SPL image size for the socdk devkit. User can change that if they need
large FAT cluster in their design, right?
Quoted 5 lines
I think it'd rather make sense to fix the FAT driver to avoid statically
allocating those massive buffers for big clusters. I think that can be
done by allocating those on stack instead ... or mallocating them.
I need to explore 1st as i'm not familiar with FAT driver. Or can we temporary keeping this patch 1st until FAT issue is separately fixed?
Quoted 1 line
PATCH 3/6 ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
Quoted 46 lines · Tien Fong
Quoted 45 lines · Marek Vasut
Quoted 44 lines · Tien Fong
Quoted 29 lines · Marek Vasut
Quoted 27 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Update the default configuration file to enable the necessary functionality
to get the SoCFPGA loadfs driver support. This would enable the implementation of programming bitstream into FPGA from MMC.Signed-off-by Tien Fong Chee <[email protected]>---
configs/socfpga_arria10_defconfig | 8 ++++++++1 files changed, 8 insertions(+), 0 deletions(-)configs/socfpga_arria10_defconfig +0
-0@@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" # CONFIG_EFI_PARTITION is not setCONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
CONFIG_ENV_IS_IN_MMC=y+CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SPL_DM_MMC=yQuoted 8 lines
configs/socfpga_arria10_defconfig CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" · line 38
Quoted 5 lines
configs/socfpga_arria10_defconfig +5
-0+CONFIG_SPL_MMC_SUPPORT=y +CONFIG_SPL_EXT_SUPPORT=y +CONFIG_SPL_FAT_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384This breaks systems with large FAT clusters. Why is this needed for
programming the FPGA from MMC ?This is final tuning in term of getting balance between performance and
SPL image size for the socdk devkit. User can change that if they need
large FAT cluster in their design, right?
Quoted 7 lines
Quoted 5 lines
I think it'd rather make sense to fix the FAT driver to avoid statically
allocating those massive buffers for big clusters. I think that can be
done by allocating those on stack instead ... or mallocating them.I need to explore 1st as i'm not familiar with FAT driver. Or can we temporary keeping this patch 1st until FAT issue is separately fixed?
Please explore this, it'll be beneficial in the long run.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 3/6 ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
Quoted 65 lines · Marek Vasut
Quoted 64 lines · Tien Fong
Quoted 62 lines · Marek Vasut
Quoted 46 lines · Tien Fong
Quoted 35 lines · Marek Vasut
Quoted 32 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Update the default configuration file to enable the necessary
functionality
to get the SoCFPGA loadfs driver support. This would enable the
implementation of programming bitstream into FPGA from MMC.Signed-off-by Tien Fong Chee <[email protected]>---
configs/socfpga_arria10_defconfig | 8 ++++++++1 files changed, 8 insertions(+), 0 deletions(-)configs/socfpga_arria10_defconfig +0
-0@@ -27,8 +27,16 @@
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
#CONFIG_EFI_PARTITIONis not setCONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"CONFIG_ENV_IS_IN_MMC=y+CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=yconfigs/socfpga_arria10_defconfig +2
-0+CONFIG_SPL_DM_MMC=y +CONFIG_SPL_MMC_SUPPORT=yQuoted 8 lines
configs/socfpga_arria10_defconfig CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" · line 38
Quoted 4 lines
configs/socfpga_arria10_defconfig +4
-0+CONFIG_SPL_EXT_SUPPORT=y +CONFIG_SPL_FAT_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384This breaks systems with large FAT clusters. Why is this needed
for
programming the FPGA from MMC ?Quoted 7 lines
This is final tuning in term of getting balance between performance
and
SPL image size for the socdk devkit. User can change that if they
need
large FAT cluster in their design, right?I think it'd rather make sense to fix the FAT driver to avoid statically
allocating those massive buffers for big clusters. I think that can
be
done by allocating those on stack instead ... or mallocating them.
Quoted 5 lines
Quoted 4 lines
I need to explore 1st as i'm not familiar with FAT driver. Or can we
temporary keeping this patch 1st until FAT issue is separately fixed?Please explore this, it'll be beneficial in the long run.
Okay.
Quoted 1 line
Chee
PATCH 3/6 ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
In reply to Marek VasutQuoted 65 lines · Marek Vasut
Quoted 64 lines · Tien Fong
Quoted 62 lines · Marek Vasut
Quoted 46 lines · Tien Fong
Quoted 35 lines · Marek Vasut
Quoted 32 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Update the default configuration file to enable the necessary
functionality
to get the SoCFPGA loadfs driver support. This would enable the
implementation of programming bitstream into FPGA from MMC.Signed-off-by Tien Fong Chee <[email protected]>---
configs/socfpga_arria10_defconfig | 8 ++++++++1 files changed, 8 insertions(+), 0 deletions(-)configs/socfpga_arria10_defconfig +0
-0@@ -27,8 +27,16 @@
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
#CONFIG_EFI_PARTITIONis not setCONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"CONFIG_ENV_IS_IN_MMC=y+CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=yconfigs/socfpga_arria10_defconfig +2
-0+CONFIG_SPL_DM_MMC=y +CONFIG_SPL_MMC_SUPPORT=yQuoted 8 lines
configs/socfpga_arria10_defconfig CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" · line 38
Quoted 4 lines
configs/socfpga_arria10_defconfig +4
-0+CONFIG_SPL_EXT_SUPPORT=y +CONFIG_SPL_FAT_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384This breaks systems with large FAT clusters. Why is this needed
for
programming the FPGA from MMC ?Quoted 7 lines
This is final tuning in term of getting balance between performance
and
SPL image size for the socdk devkit. User can change that if they
need
large FAT cluster in their design, right?I think it'd rather make sense to fix the FAT driver to avoid statically
allocating those massive buffers for big clusters. I think that can
be
done by allocating those on stack instead ... or mallocating them.
Quoted 5 lines
Quoted 4 lines
I need to explore 1st as i'm not familiar with FAT driver. Or can we
temporary keeping this patch 1st until FAT issue is separately fixed?Please explore this, it'll be beneficial in the long run.
There is a progress on working to move statically allocating into dynamically allocation https://www.mail-archive.com/u-boot at lists.denx.d e/msg308353.html .
I quickly apply the patch and having minor fixing on it. This indeed reduce the SPL image size, but creating overflow/corruption during runtime. So, the problem is still not enough memory for the SPL.
I think we can add a new SPL_FAT_WRITE config to exclude the fat_write.c from SPL, because most of the time, SPL needs very simple FAT reading. This would help us save 64KB memory space if that's default value for FAT cluster.
What do you think?
Quoted 1 line
PATCH 3/6 ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
Quoted 79 lines · Tien Fong
Quoted 65 lines · Marek Vasut
Quoted 64 lines · Tien Fong
Quoted 62 lines · Marek Vasut
Quoted 46 lines · Tien Fong
Quoted 35 lines · Marek Vasut
Quoted 32 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Update the default configuration file to enable the necessary
functionality
to get the SoCFPGA loadfs driver support. This would enable the
implementation of programming bitstream into FPGA from MMC.Signed-off-by Tien Fong Chee <[email protected]>---
configs/socfpga_arria10_defconfig | 8 ++++++++1 files changed, 8 insertions(+), 0 deletions(-)configs/socfpga_arria10_defconfig +0
-0@@ -27,8 +27,16 @@
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
#CONFIG_EFI_PARTITIONis not setCONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"CONFIG_ENV_IS_IN_MMC=y+CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=yconfigs/socfpga_arria10_defconfig +2
-0+CONFIG_SPL_DM_MMC=y +CONFIG_SPL_MMC_SUPPORT=yQuoted 8 lines
configs/socfpga_arria10_defconfig
Quoted 4 lines
configs/socfpga_arria10_defconfig +4
-0+CONFIG_SPL_EXT_SUPPORT=y +CONFIG_SPL_FAT_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384This breaks systems with large FAT clusters. Why is this needed
for
programming the FPGA from MMC ?Quoted 7 lines
This is final tuning in term of getting balance between performance
and
SPL image size for the socdk devkit. User can change that if they
need
large FAT cluster in their design, right?I think it'd rather make sense to fix the FAT driver to avoid statically
allocating those massive buffers for big clusters. I think that can
be
done by allocating those on stack instead ... or mallocating them.Quoted 5 lines
Quoted 4 lines
I need to explore 1st as i'm not familiar with FAT driver. Or can we
temporary keeping this patch 1st until FAT issue is separately fixed?Please explore this, it'll be beneficial in the long run.
There is a progress on working to move statically allocating into dynamically allocation https://www.mail-archive.com/u-boot at lists.denx.d e/msg308353.html .
I quickly apply the patch and having minor fixing on it. This indeed reduce the SPL image size, but creating overflow/corruption during runtime. So, the problem is still not enough memory for the SPL.
Quoted 6 lines
I think we can add a new
SPL_FAT_WRITEconfig to exclude thefat_write.cfrom SPL, because most of the time, SPL needs very simple FAT reading. This would help us save 64KB memory space if that's default value for FAT cluster.What do you think?
Sounds good.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 4/6 ARM: dts: socfpga: Add missing SDMMC reset
In reply to tien.fong.chee at intel.comFrom: Tien Fong Chee <[email protected]>
The SDMMC reset is missing from DT, so the reset manager cannot unreset the SDMMC. Add the missing DT reset entry.
--- arch/arm/dts/socfpga_arria10.dtsi | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/dts/socfpga_arria10.dtsi +1 -0
@@ -660,6 +660,7 @@ fifo-depth = <0x400>; clocks = <&l4_mp_clk>, <&sdmmc_clk>; clock-names = "biu", "ciu"; + resets = <&rst SDMMC_RESET>; status = "disabled"; };
Signature · 1 line
1.7.7.4
Marek Vasut
AppliedPATCH 4/6 ARM: dts: socfpga: Add missing SDMMC reset
Quoted 16 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
The SDMMC reset is missing from DT, so the reset manager cannot unreset the SDMMC. Add the missing DT reset entry.
Signed-off-by Tien Fong Chee <[email protected]>--- arch/arm/dts/socfpga_arria10.dtsi | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/dts/socfpga_arria10.dtsi +0
-0
arch/arm/dts/socfpga_arria10.dtsi line 666
Quoted 7 lines
arch/arm/dts/socfpga_arria10.dtsi +1
-0@@ -660,6 +660,7 @@ fifo-depth = <0x400>; clocks = <&l4_mp_clk>, <&sdmmc_clk>; clock-names = "biu", "ciu"; + resets = <&rst SDMMC_RESET>; status = "disabled"; };
Applied, thanks
Signature · 2 lines
Best regards, Marek Vasut
PATCH 5/6 spl : socfpga: Implement fpga bitstream loading with socfpga loadfs
In reply to tien.fong.chee at intel.comFrom: Tien Fong Chee <[email protected]>
Add support for loading FPGA bitstream to get DDR up running before U-Boot is loaded into DDR. Boot device initialization, generic firmware loader and SPL FAT support are required for this whole mechanism to work.
--- arch/arm/mach-socfpga/spl_a10.c | 46 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 45 insertions(+), 1 deletions(-)
arch/arm/mach-socfpga/spl_a10.c +45 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright (C) 2012 Altera Corporation <www.altera.com> +* Copyright (C) 2012-2018 Altera Corporation <www.altera.com> */ #include <common.h>
@@ -23,9 +23,14 @@#include <fdtdec.h> #include <watchdog.h> #include <asm/arch/pinmux.h> +#include <asm/arch/fpga_manager.h> +#include <mmc.h> DECLARE_GLOBAL_DATA_PTR ; +#define FPGA_SOCFGA_A10_RBF_CORE_LOAD_DDR (1 * 1024) +#define FPGA_SOCFGA_A10_RBF_CORE_BUFFER_SIZE (40 * 1024 * 1024) +static const struct socfpga_system_manager *sysmgr_regs = (struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS ;
@@ -73,6 +78,45 @@ void spl_board_init(void)WATCHDOG_RESET ();arch_early_init_r (); + +/* If the full FPGA is already loaded, ie.from EPCQ, config fpga pins */ +if (is_fpgamgr_user_mode ()) { +config_pins (gd->fdt_blob,"shared" ); +config_pins (gd->fdt_blob,"fpga" ); + }else if (!is_fpgamgr_early_user_mode ()) { +/* Program IOSSM(early IO release) or full FPGA */ +fpga_fs_info fpga_fsinfo; +int len; +char buf[16 *1024 ]__aligned(ARCH_DMA_MINALIGN) ; + + fpga_fsinfo.filename = (char *)get_fpga_filename ( + gd->fdt_blob, + &len, +FPGA_SOCFPGA_A10_RBF_PERIPH ); + +if (fpga_fsinfo.filename) +socfpga_loadfs (&fpga_fsinfo, buf,sizeof (buf),0 ); + } + +/* If the IOSSM/full FPGA is already loaded, start DDR */ +if (is_fpgamgr_early_user_mode () ||is_fpgamgr_user_mode ()) +ddr_calibration_sequence (); + +if (!is_fpgamgr_user_mode ()) { +fpga_fs_info fpga_fsinfo; +int len; + + fpga_fsinfo.filename = (char *)get_fpga_filename ( + gd->fdt_blob, + &len, +FPGA_SOCFPGA_A10_RBF_CORE ); + +if (fpga_fsinfo.filename) +socfpga_loadfs (&fpga_fsinfo, + (const void *)FPGA_SOCFGA_A10_RBF_CORE_LOAD_DDR , + (size_t )FPGA_SOCFGA_A10_RBF_CORE_BUFFER_SIZE , +0 ); + } }void board_init_f (ulong dummy)
Signature · 1 line
1.7.7.4
PATCH 5/6 spl : socfpga: Implement fpga bitstream loading with socfpga loadfs
Quoted 39 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Add support for loading FPGA bitstream to get DDR up running before U-Boot is loaded into DDR. Boot device initialization, generic firmware loader and SPL FAT support are required for this whole mechanism to work.
Signed-off-by Tien Fong Chee <[email protected]>--- arch/arm/mach-socfpga/spl_a10.c | 46 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 45 insertions(+), 1 deletions(-)arch/arm/mach-socfpga/spl_a10.c +6
-1@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright (C) 2012 Altera Corporation <www.altera.com> +* Copyright (C) 2012-2018 Altera Corporation <www.altera.com> */ #include <common.h> @@ -23,9 +23,14 @@#include <fdtdec.h> #include <watchdog.h> #include <asm/arch/pinmux.h> +#include <asm/arch/fpga_manager.h> +#include <mmc.h> DECLARE_GLOBAL_DATA_PTR ; +#define FPGA_SOCFGA_A10_RBF_CORE_LOAD_DDR (1 * 1024) +#define FPGA_SOCFGA_A10_RBF_CORE_BUFFER_SIZE (40 * 1024 * 1024) +static const struct socfpga_system_manager *sysmgr_regs = (struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS ;
arch/arm/mach-socfpga/spl_a10.c void spl_board_init(void) · line 85
Quoted 8 lines
arch/arm/mach-socfpga/spl_a10.c +5
-0@@ -73,6 +78,45 @@ void spl_board_init(void)WATCHDOG_RESET ();arch_early_init_r (); + +/* If the full FPGA is already loaded, ie.from EPCQ, config fpga pins */ +if (is_fpgamgr_user_mode ()) { +config_pins (gd->fdt_blob,"shared" ); +config_pins (gd->fdt_blob,"fpga" );
What happens if config_pins() fails ? The function returns some return value.
arch/arm/mach-socfpga/spl_a10.c void spl_board_init(void) · line 92
Quoted 7 lines
arch/arm/mach-socfpga/spl_a10.c +7
-0+ }else if (!is_fpgamgr_early_user_mode ()) { +/* Program IOSSM(early IO release) or full FPGA */ +fpga_fs_info fpga_fsinfo; +int len; +char buf[16 *1024 ]__aligned(ARCH_DMA_MINALIGN) ; + + fpga_fsinfo.filename = (char *)get_fpga_filename(
Is the cast needed ?
Quoted 31 lines
arch/arm/mach-socfpga/spl_a10.c +27
-0+ gd->fdt_blob, + &len, + FPGA_SOCFPGA_A10_RBF_PERIPH); + +if (fpga_fsinfo.filename) +socfpga_loadfs (&fpga_fsinfo, buf,sizeof (buf),0 ); + } + +/* If the IOSSM/full FPGA is already loaded, start DDR */ +if (is_fpgamgr_early_user_mode () ||is_fpgamgr_user_mode ()) +ddr_calibration_sequence (); + +if (!is_fpgamgr_user_mode ()) { +fpga_fs_info fpga_fsinfo; +int len; + + fpga_fsinfo.filename = (char *)get_fpga_filename ( + gd->fdt_blob, + &len, +FPGA_SOCFPGA_A10_RBF_CORE ); + +if (fpga_fsinfo.filename) +socfpga_loadfs (&fpga_fsinfo, + (const void *)FPGA_SOCFGA_A10_RBF_CORE_LOAD_DDR , + (size_t )FPGA_SOCFGA_A10_RBF_CORE_BUFFER_SIZE , +0 ); + } }void board_init_f (ulong dummy)
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 5/6 spl : socfpga: Implement fpga bitstream loading with socfpga loadfs
Quoted 50 lines · Marek Vasut
Quoted 49 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Add support for loading FPGA bitstream to get DDR up running before U-Boot is loaded into DDR. Boot device initialization, generic firmware
loader and SPL FAT support are required for this whole mechanism to work.Signed-off-by Tien Fong Chee <[email protected]>---
arch/arm/mach-socfpga/spl_a10.c | 46
++++++++++++++++++++++++++++++++++++++-1 files changed, 45 insertions(+), 1 deletions(-)arch/arm/mach- renamed from arch/arm/mach-socfpga/spl_a10.c +0
-0
socfpga/spl_a10.c
index 3ea64f7..93f5f46 100644arch/arm/mach-socfpga/spl_a10.c +1
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* -* Copyright (C) 2012 Altera Corporation <www.altera.com> +* Copyright (C) 2012-2018 Altera Corporation <www.altera.com> */
#include <common.h>arch/arm/mach-socfpga/spl_a10.c +2
-0@@ -23,9 +23,14 @@ #include <fdtdec.h> #include <watchdog.h> #include <asm/arch/pinmux.h> +#include <asm/arch/fpga_manager.h> +#include <mmc.h>
DECLARE_GLOBAL_DATA_PTR;arch/arm/mach-socfpga/spl_a10.c +2
-0+#define FPGA_SOCFGA_A10_RBF_CORE_LOAD_DDR (1 * 1024) +#define FPGA_SOCFGA_A10_RBF_CORE_BUFFER_SIZE (40 * 1024 *1024)
+
static const structsocfpga_system_manager*sysmgr_regs= (structsocfpga_system_manager*)SOCFPGA_SYSMGR_ADDRESS;arch/arm/mach-socfpga/spl_a10.c +0
-0@@ -73,6 +78,45 @@ void spl_board_init(void) WATCHDOG_RESET();
arch_early_init_r();
+
Quoted 8 lines
arch/arm/mach-socfpga/spl_a10.c void spl_board_init(void) · line 85
Quoted 5 lines
arch/arm/mach-socfpga/spl_a10.c +1
-0+/* If the full FPGA is already loaded, ie.from EPCQ, config fpga pins */
arch/arm/mach-socfpga/spl_a10.c +3
-0+if (is_fpgamgr_user_mode ()) { +config_pins (gd->fdt_blob,"shared" ); +config_pins (gd->fdt_blob,"fpga" );What happens if
config_pins()fails ? The function returns some return
value.
There is return value for config_pins, i can add the debug print out for the return value.
Quoted 10 lines
arch/arm/mach-socfpga/spl_a10.c void spl_board_init(void) · line 92
Quoted 9 lines
arch/arm/mach-socfpga/spl_a10.c +7
-0+ }else if (!is_fpgamgr_early_user_mode ()) { +/* Program IOSSM(early IO release) or full FPGA */ +fpga_fs_info fpga_fsinfo; +int len; +char buf[16 *1024 ]__aligned(ARCH_DMA_MINALIGN) ; + + fpga_fsinfo.filename = (char *)get_fpga_filename(Is the cast needed ?
there is a warning arch/arm/mach-socfpga/spl_a10.c:109:24: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] fpga_fsinfo.filename = get_fpga_filename(
Quoted 40 lines
Quoted 39 lines
arch/arm/mach-socfpga/spl_a10.c +3
-0+ gd->fdt_blob, + &len, +FPGA_SOCFPGA_A10_R
BF_PERIPH);arch/arm/mach-socfpga/spl_a10.c +3
-0+ +if (fpga_fsinfo.filename) + socfpga_loadfs(&fpga_fsinfo, buf,sizeof(buf), 0);
arch/arm/mach-socfpga/spl_a10.c +4
-0+ } + +/* If the IOSSM/full FPGA is already loaded, start DDR */ + if (is_fpgamgr_early_user_mode() ||
is_fpgamgr_user_mode())arch/arm/mach-socfpga/spl_a10.c +10
-0+ddr_calibration_sequence (); + +if (!is_fpgamgr_user_mode ()) { +fpga_fs_info fpga_fsinfo; +int len; + + fpga_fsinfo.filename = (char *)get_fpga_filename ( + gd->fdt_blob, + &len, + FPGA_SOCFPGA_A10_R
BF_CORE);arch/arm/mach-socfpga/spl_a10.c +4
-0+ +if (fpga_fsinfo.filename) + socfpga_loadfs(&fpga_fsinfo, + (const void*)FPGA_SOCFGA_A10_RBF_CORE_LOAD_DDR,
arch/arm/mach-socfpga/spl_a10.c +1
-0+ (size_t )FPGA_SOCFGA_A10_RBF_CORE_B
UFFER_SIZE,arch/arm/mach-socfpga/spl_a10.c +2
-0+ 0); + }}
voidboard_init_f(ulong dummy)
PATCH 5/6 spl : socfpga: Implement fpga bitstream loading with socfpga loadfs
Quoted 59 lines · Tien Fong
Quoted 50 lines · Marek Vasut
Quoted 49 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Add support for loading FPGA bitstream to get DDR up running before U-Boot is loaded into DDR. Boot device initialization, generic firmware
loader and SPL FAT support are required for this whole mechanism to work.Signed-off-by Tien Fong Chee <[email protected]>---
arch/arm/mach-socfpga/spl_a10.c | 46
++++++++++++++++++++++++++++++++++++++-1 files changed, 45 insertions(+), 1 deletions(-)arch/arm/mach- renamed from arch/arm/mach-socfpga/spl_a10.c +0
-0
socfpga/spl_a10.c
index 3ea64f7..93f5f46 100644arch/arm/mach-socfpga/spl_a10.c +1
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* -* Copyright (C) 2012 Altera Corporation <www.altera.com> +* Copyright (C) 2012-2018 Altera Corporation <www.altera.com> */
#include <common.h>arch/arm/mach-socfpga/spl_a10.c +2
-0@@ -23,9 +23,14 @@ #include <fdtdec.h> #include <watchdog.h> #include <asm/arch/pinmux.h> +#include <asm/arch/fpga_manager.h> +#include <mmc.h>
DECLARE_GLOBAL_DATA_PTR;arch/arm/mach-socfpga/spl_a10.c +2
-0+#define FPGA_SOCFGA_A10_RBF_CORE_LOAD_DDR (1 * 1024) +#define FPGA_SOCFGA_A10_RBF_CORE_BUFFER_SIZE (40 * 1024 *1024)
+
static const structsocfpga_system_manager*sysmgr_regs= (structsocfpga_system_manager*)SOCFPGA_SYSMGR_ADDRESS;arch/arm/mach-socfpga/spl_a10.c +0
-0@@ -73,6 +78,45 @@ void spl_board_init(void) WATCHDOG_RESET();
arch_early_init_r();
+Quoted 8 lines
arch/arm/mach-socfpga/spl_a10.c void spl_board_init(void) · line 85
Quoted 5 lines
arch/arm/mach-socfpga/spl_a10.c +1
-0+/* If the full FPGA is already loaded, ie.from EPCQ, config fpga pins */
arch/arm/mach-socfpga/spl_a10.c +3
-0+if (is_fpgamgr_user_mode ()) { +config_pins (gd->fdt_blob,"shared" ); +config_pins (gd->fdt_blob,"fpga" );What happens if
config_pins()fails ? The function returns some return
value.
Quoted 2 lines
There is return value for
config_pins, i can add the debug print out for the return value.
And if the function fails, for whatever reason, what does that mean for the system ? Does the system fail ? I think so, right ?
Quoted 8 lines
Quoted 8 lines
arch/arm/mach-socfpga/spl_a10.c void spl_board_init(void) · line 92
Quoted 7 lines
arch/arm/mach-socfpga/spl_a10.c +7
-0+ }else if (!is_fpgamgr_early_user_mode ()) { +/* Program IOSSM(early IO release) or full FPGA */ +fpga_fs_info fpga_fsinfo; +int len; +char buf[16 *1024 ]__aligned(ARCH_DMA_MINALIGN) ; + + fpga_fsinfo.filename = (char *)get_fpga_filename(Is the cast needed ?
Quoted 4 lines
there is a warning
arch/arm/mach-socfpga/spl_a10.c:109:24: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] fpga_fsinfo.filename = get_fpga_filename(
Which tells you that you're forcibly turning a string which the compiler assumes to be constant into one which is not. You're missing const somewhere or you need to remove it from somewhere.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 5/6 spl : socfpga: Implement fpga bitstream loading with socfpga loadfs
Quoted 68 lines · Marek Vasut
Quoted 67 lines · Tien Fong
Quoted 65 lines · Marek Vasut
Quoted 57 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Add support for loading FPGA bitstream to get DDR up running before
U-Boot is loaded into DDR. Boot device initialization, generic firmware
loader and SPL FAT support are required for this whole mechanism to
work.Signed-off-by Tien Fong Chee <[email protected]>---
arch/arm/mach-socfpga/spl_a10.c | 46
++++++++++++++++++++++++++++++++++++++-1 files changed, 45 insertions(+), 1 deletions(-)arch/arm/mach- renamed from arch/arm/mach-socfpga/spl_a10.c +0
-0
socfpga/spl_a10.c
index 3ea64f7..93f5f46 100644arch/arm/mach-socfpga/spl_a10.c +1
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* -* Copyright (C) 2012 Altera Corporation <www.altera.com> +* Copyright (C) 2012-2018 Altera Corporation <www.altera.com Quoted 1 line
*/
#include <common.h>arch/arm/mach-socfpga/spl_a10.c +2
-0@@ -23,9 +23,14 @@ #include <fdtdec.h> #include <watchdog.h> #include <asm/arch/pinmux.h> +#include <asm/arch/fpga_manager.h> +#include <mmc.h>
DECLARE_GLOBAL_DATA_PTR;arch/arm/mach-socfpga/spl_a10.c +2
-0+#define FPGA_SOCFGA_A10_RBF_CORE_LOAD_DDR (1 * 1024) +#define FPGA_SOCFGA_A10_RBF_CORE_BUFFER_SIZE (40 * 1024*
1024)
+
static const structsocfpga_system_manager*sysmgr_regs= (structsocfpga_system_manager*)SOCFPGA_SYSMGR_ADDRESS;arch/arm/mach-socfpga/spl_a10.c +0
-0@@ -73,6 +78,45 @@ void spl_board_init(void) WATCHDOG_RESET();
arch_early_init_r();arch/arm/mach-socfpga/spl_a10.c +2
-0+ +/* If the full FPGA is already loaded, ie.from EPCQ, config fpga pins */
arch/arm/mach-socfpga/spl_a10.c void spl_board_init(void) · line 85
Quoted 3 lines
arch/arm/mach-socfpga/spl_a10.c +3
-0+if (is_fpgamgr_user_mode ()) { +config_pins (gd->fdt_blob,"shared" ); +config_pins (gd->fdt_blob,"fpga" );What happens if
config_pins()fails ? The function returns some return
value.
Quoted 6 lines
Quoted 3 lines
There is return value for
config_pins, i can add the debug print out
for the return value.And if the function fails, for whatever reason, what does that mean for
the system ? Does the system fail ? I think so, right ?
Unexpected behavior. I can put the hang here or you got better idea?
Quoted 20 lines
Quoted 15 lines
Quoted 4 lines
Quoted 4 lines
Quoted 11 lines
Quoted 10 lines
arch/arm/mach-socfpga/spl_a10.c +2
-0+ }else if (!is_fpgamgr_early_user_mode ()) { +/* Program IOSSM(early IO release) or full FPGA */
arch/arm/mach-socfpga/spl_a10.c +3
-0+fpga_fs_info fpga_fsinfo; +int len; +char buf[16 *1024 ]
__aligned(ARCH_DMA_MINALIGN);arch/arm/mach-socfpga/spl_a10.c +2
-0+ + fpga_fsinfo.filename = (char*)get_fpga_filename(
Is the cast needed ?
Quoted 5 lines
there is a warning
arch/arm/mach-socfpga/spl_a10.c:109:24: warning: assignment discards
'const' qualifier from pointer target type [-Wdiscarded-qualifiers] fpga_fsinfo.filename = get_fpga_filename(
Quoted 4 lines
Which tells you that you're forcibly turning a string which the compiler
assumes to be constant into one which is not. You're missing const somewhere or you need to remove it from somewhere.
Yes, i can fix it.
Quoted 1 line
PATCH 6/6 ARM: socfpga: Synchronize the configuration for A10 SoCDK
In reply to tien.fong.chee at intel.comFrom: Marek Vasut <[email protected]>
Update the default configuration file to enable the necessary functionality the get the kit working. That includes SPL SD/MMC support, USB, and I2C.
--- configs/socfpga_arria10_defconfig | 38 +++++++++++++++++++++++++++++++----- 1 files changed, 32 insertions(+), 6 deletions(-)
configs/socfpga_arria10_defconfig +32 -6
@@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_MALLOC_F_LEN=0x8000 CONFIG_TARGET_SOCFPGA_ARRIA10_SOCDK=y CONFIG_SPL=y CONFIG_IDENT_STRING="socfpga_arria10"
@@ -10,26 +10,35 @@ CONFIG_NR_DRAM_BANKS=1 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" # CONFIG_USE_BOOTCOMMAND is not set +CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb" +CONFIG_VERSION_VARIABLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_FPGA_SUPPORT=y -CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y +CONFIG_CMD_DFU=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_CACHE=y CONFIG_CMD_EXT4_WRITE=y CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" -# CONFIG_SPL_DOS_PARTITION is not set -# CONFIG_ISO_PARTITION is not set -# CONFIG_EFI_PARTITION is not set +CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names" CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc" CONFIG_ENV_IS_IN_MMC=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y +CONFIG_DFU_MMC=y CONFIG_SPL_DM_MMC=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_EXT_SUPPORT=y
@@ -40,13 +49,30 @@ CONFIG_FS_LOADER=y CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y +CONFIG_SYS_I2C_DW=y CONFIG_DM_MMC=y CONFIG_MTD_DEVICE=y +CONFIG_MTD_PARTITIONS=y +CONFIG_MMC_DW=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_BAR=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_PHY_MICREL=y +CONFIG_PHY_MICREL_KSZ90X1=y CONFIG_DM_ETH=y CONFIG_ETH_DESIGNWARE=y CONFIG_MII=y +CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_TIMER=y CONFIG_SPL_TIMER=y CONFIG_DESIGNWARE_APB_TIMER=y -CONFIG_USE_TINY_PRINTF=y +CONFIG_DESIGNWARE_SPI=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_DWC2=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DOWNLOAD=y
Signature · 1 line
1.7.7.4
PATCH 6/6 ARM: socfpga: Synchronize the configuration for A10 SoCDK
Quoted 7 lines · tien.fong.chee at intel.com
From: Marek Vasut <[email protected]>
Update the default configuration file to enable the necessary functionality the get the kit working. That includes SPL SD/MMC support, USB, and I2C.
Signed-off-by Marek Vasut <[email protected]>Signed-off-by Tien Fong Chee <[email protected]>
Is this patch needed ? Why ? This enables a whole lot of stuff ....
Quoted 90 lines
--- configs/socfpga_arria10_defconfig | 38 +++++++++++++++++++++++++++++++----- 1 files changed, 32 insertions(+), 6 deletions(-)configs/socfpga_arria10_defconfig +32
-6@@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_MALLOC_F_LEN=0x8000 CONFIG_TARGET_SOCFPGA_ARRIA10_SOCDK=y CONFIG_SPL=y CONFIG_IDENT_STRING="socfpga_arria10"@@ -10,26 +10,35 @@ CONFIG_NR_DRAM_BANKS=1 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" # CONFIG_USE_BOOTCOMMAND is not set +CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb" +CONFIG_VERSION_VARIABLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_FPGA_SUPPORT=y -CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y +CONFIG_CMD_DFU=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_CACHE=y CONFIG_CMD_EXT4_WRITE=y CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" -# CONFIG_SPL_DOS_PARTITION is not set -# CONFIG_ISO_PARTITION is not set -# CONFIG_EFI_PARTITION is not set +CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names" CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc" CONFIG_ENV_IS_IN_MMC=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y +CONFIG_DFU_MMC=y CONFIG_SPL_DM_MMC=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_EXT_SUPPORT=y@@ -40,13 +49,30 @@ CONFIG_FS_LOADER=y CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y +CONFIG_SYS_I2C_DW=y CONFIG_DM_MMC=y CONFIG_MTD_DEVICE=y +CONFIG_MTD_PARTITIONS=y +CONFIG_MMC_DW=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_BAR=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_PHY_MICREL=y +CONFIG_PHY_MICREL_KSZ90X1=y CONFIG_DM_ETH=y CONFIG_ETH_DESIGNWARE=y CONFIG_MII=y +CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_TIMER=y CONFIG_SPL_TIMER=y CONFIG_DESIGNWARE_APB_TIMER=y -CONFIG_USE_TINY_PRINTF=y +CONFIG_DESIGNWARE_SPI=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_DWC2=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DOWNLOAD=y
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 6/6 ARM: socfpga: Synchronize the configuration for A10 SoCDK
Quoted 4 lines · Marek Vasut
Quoted 3 lines · tien.fong.chee at intel.com
From: Marek Vasut <[email protected]>
Quoted 8 lines
Quoted 7 lines
Update the default configuration file to enable the necessary functionality
the get the kit working. That includes SPL SD/MMC support, USB, and I2C.Signed-off-by Marek Vasut <[email protected]>Signed-off-by Tien Fong Chee <[email protected]>Is this patch needed ? Why ? This enables a whole lot of stuff ....
These settings are mostly syn up from gen5 and our own downstream A10. These settings are mostly required to boot U-Boot and supporting A10 golden system reference design.
Quoted 95 lines
Quoted 94 lines
---
configs/socfpga_arria10_defconfig | 38
+++++++++++++++++++++++++++++++-----1 files changed, 32 insertions(+), 6 deletions(-)configs/socfpga_arria10_defconfig +0
-0@@ -1,7 +1,7 @@CONFIG_ARM=y
CONFIG_ARCH_SOCFPGA=y
CONFIG_SYS_TEXT_BASE=0x01000040configs/socfpga_arria10_defconfig +1
-1-CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_MALLOC_F_LEN=0x8000CONFIG_TARGET_SOCFPGA_ARRIA10_SOCDK=y
CONFIG_SPL=y
CONFIG_IDENT_STRING="socfpga_arria10"configs/socfpga_arria10_defconfig +0
-0@@ -10,26 +10,35 @@ CONFIG_NR_DRAM_BANKS=1CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttyS0,115200"
#CONFIG_USE_BOOTCOMMANDis not setconfigs/socfpga_arria10_defconfig +3
-0+CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=yCONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb" +CONFIG_VERSION_VARIABLE=y
CONFIG_DISPLAY_BOARDINFO_LATE=y+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800CONFIG_SPL_FPGA_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DFU=y
#CONFIG_CMD_FLASHis not set
CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=yconfigs/socfpga_arria10_defconfig +4
-0+CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=yCONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"configs/socfpga_arria10_defconfig +1
-3-# CONFIG_SPL_DOS_PARTITION is not set -# CONFIG_ISO_PARTITION is not set -# CONFIG_EFI_PARTITION is not set +CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names"
CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_DFU_MMC=y
CONFIG_SPL_DM_MMC=y
CONFIG_SPL_MMC_SUPPORT=yCONFIG_SPL_EXT_SUPPORT=yconfigs/socfpga_arria10_defconfig +0
-0@@ -40,13 +49,30 @@ CONFIG_FS_LOADER=yCONFIG_FPGA_SOCFPGA=y
CONFIG_DM_GPIO=y
CONFIG_DWAPB_GPIO=y
+CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MTD_DEVICE=yconfigs/socfpga_arria10_defconfig +8
-0+CONFIG_MTD_PARTITIONS=y +CONFIG_MMC_DW=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_BAR=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_PHY_MICREL=y +CONFIG_PHY_MICREL_KSZ90X1=yCONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
+CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
CONFIG_DESIGNWARE_APB_TIMER=yconfigs/socfpga_arria10_defconfig +8
-1-CONFIG_USE_TINY_PRINTF=y +CONFIG_DESIGNWARE_SPI=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_DWC2=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DOWNLOAD=y
PATCH 6/6 ARM: socfpga: Synchronize the configuration for A10 SoCDK
Quoted 10 lines · Tien Fong
Quoted 9 lines · Marek Vasut
Quoted 8 lines · tien.fong.chee at intel.com
From: Marek Vasut <[email protected]>
Update the default configuration file to enable the necessary functionality
the get the kit working. That includes SPL SD/MMC support, USB, and I2C.
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Signed-off-by Marek Vasut <[email protected]>Signed-off-by Tien Fong Chee <[email protected]>Is this patch needed ? Why ? This enables a whole lot of stuff ....
These settings are mostly syn up from gen5 and our own downstream A10. These settings are mostly required to boot U-Boot and supporting A10 golden system reference design.
Hmmm, mind you, all the MTD and SPI stuff is not needed for the SDMMC configuration of the kit, which this patch would imply is the target. You want to split this into smaller config changes which enable logical blocks, not everything at once, and document why is each thing needed.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
---
configs/socfpga_arria10_defconfig | 38
+++++++++++++++++++++++++++++++-----1 files changed, 32 insertions(+), 6 deletions(-)
Quoted 11 lines
Quoted 11 lines
configs/socfpga_arria10_defconfig line 4
Quoted 11 lines
configs/socfpga_arria10_defconfig +0
-0@@ -1,7 +1,7 @@CONFIG_ARM=y
CONFIG_ARCH_SOCFPGA=y
CONFIG_SYS_TEXT_BASE=0x01000040configs/socfpga_arria10_defconfig +1
-1-CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_MALLOC_F_LEN=0x8000
Why is this increase in malloc area needed ?
Quoted 68 lines
Quoted 68 lines
Quoted 68 lines
CONFIG_TARGET_SOCFPGA_ARRIA10_SOCDK=y
CONFIG_SPL=y
CONFIG_IDENT_STRING="socfpga_arria10"configs/socfpga_arria10_defconfig +0
-0@@ -10,26 +10,35 @@ CONFIG_NR_DRAM_BANKS=1CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttyS0,115200"
#CONFIG_USE_BOOTCOMMANDis not setconfigs/socfpga_arria10_defconfig +3
-0+CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=yCONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb" +CONFIG_VERSION_VARIABLE=y
CONFIG_DISPLAY_BOARDINFO_LATE=y+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800CONFIG_SPL_FPGA_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DFU=y
#CONFIG_CMD_FLASHis not set
CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=yconfigs/socfpga_arria10_defconfig +4
-0+CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=yCONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"configs/socfpga_arria10_defconfig +1
-3-# CONFIG_SPL_DOS_PARTITION is not set -# CONFIG_ISO_PARTITION is not set -# CONFIG_EFI_PARTITION is not set +CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names"
CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_DFU_MMC=y
CONFIG_SPL_DM_MMC=y
CONFIG_SPL_MMC_SUPPORT=yCONFIG_SPL_EXT_SUPPORT=yconfigs/socfpga_arria10_defconfig +0
-0@@ -40,13 +49,30 @@ CONFIG_FS_LOADER=yCONFIG_FPGA_SOCFPGA=y
CONFIG_DM_GPIO=y
CONFIG_DWAPB_GPIO=y
+CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MTD_DEVICE=yconfigs/socfpga_arria10_defconfig +8
-0+CONFIG_MTD_PARTITIONS=y +CONFIG_MMC_DW=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_BAR=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_PHY_MICREL=y +CONFIG_PHY_MICREL_KSZ90X1=yCONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
+CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
CONFIG_DESIGNWARE_APB_TIMER=y
-CONFIG_USE_TINY_PRINTF=y
Quoted 8 lines
Quoted 8 lines
configs/socfpga_arria10_defconfig CONFIG_FS_LOADER=y · line 78
Quoted 8 lines
configs/socfpga_arria10_defconfig +8
-0+CONFIG_DESIGNWARE_SPI=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_DWC2=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DOWNLOAD=y
USB and DFU could be enabled separately.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH 6/6 ARM: socfpga: Synchronize the configuration for A10 SoCDK
Quoted 24 lines · Marek Vasut
Quoted 16 lines · Tien Fong
Quoted 14 lines · Marek Vasut
Quoted 12 lines · tien.fong.chee at intel.com
From: Marek Vasut <[email protected]>
Update the default configuration file to enable the necessary functionality
the get the kit working. That includes SPL SD/MMC support, USB, and
I2C.Signed-off-by Marek Vasut <[email protected]>Signed-off-by Tien Fong Chee <[email protected]>Quoted 7 lines
Quoted 2 lines
Is this patch needed ? Why ? This enables a whole lot of stuff
....These settings are mostly syn up from gen5 and our own downstream A10.
These settings are mostly required to boot U-Boot and supporting A10
golden system reference design.
Quoted 6 lines
Hmmm, mind you, all the MTD and SPI stuff is not needed for the SDMMC configuration of the kit, which this patch would imply is the target. You want to split this into smaller config changes which enable logical
blocks, not everything at once, and document why is each thing needed.
I can keep them minimal, enable them when required in separate patch.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
---
configs/socfpga_arria10_defconfig | 38
+++++++++++++++++++++++++++++++-----1 files changed, 32 insertions(+), 6 deletions(-)
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
configs/socfpga_arria10_defconfig line 4
Quoted 11 lines
configs/socfpga_arria10_defconfig +0
-0@@ -1,7 +1,7 @@CONFIG_ARM=y
CONFIG_ARCH_SOCFPGA=y
CONFIG_SYS_TEXT_BASE=0x01000040configs/socfpga_arria10_defconfig +1
-1-CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_MALLOC_F_LEN=0x8000Why is this increase in malloc area needed ?
This is set in the arria10_sdmmc_next, i guess you need this value for your use case? I can revert it if it is no longer required.
Quoted 74 lines
Quoted 74 lines
Quoted 74 lines
Quoted 74 lines
CONFIG_TARGET_SOCFPGA_ARRIA10_SOCDK=y
CONFIG_SPL=y
CONFIG_IDENT_STRING="socfpga_arria10"configs/socfpga_arria10_defconfig +0
-0@@ -10,26 +10,35 @@ CONFIG_NR_DRAM_BANKS=1CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttyS0,115200"
#CONFIG_USE_BOOTCOMMANDis not setconfigs/socfpga_arria10_defconfig +3
-0+CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=yCONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb" +CONFIG_VERSION_VARIABLE=y
CONFIG_DISPLAY_BOARDINFO_LATE=y+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800CONFIG_SPL_FPGA_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DFU=y
#CONFIG_CMD_FLASHis not set
CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=yconfigs/socfpga_arria10_defconfig +4
-0+CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=yCONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"configs/socfpga_arria10_defconfig +1
-3-# CONFIG_SPL_DOS_PARTITION is not set -# CONFIG_ISO_PARTITION is not set -# CONFIG_EFI_PARTITION is not set +CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmasdma-
names"CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_DFU_MMC=y
CONFIG_SPL_DM_MMC=y
CONFIG_SPL_MMC_SUPPORT=yCONFIG_SPL_EXT_SUPPORT=yconfigs/socfpga_arria10_defconfig +0
-0@@ -40,13 +49,30 @@ CONFIG_FS_LOADER=yCONFIG_FPGA_SOCFPGA=y
CONFIG_DM_GPIO=y
CONFIG_DWAPB_GPIO=y
+CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MTD_DEVICE=yconfigs/socfpga_arria10_defconfig +8
-0+CONFIG_MTD_PARTITIONS=y +CONFIG_MMC_DW=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_BAR=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_PHY_MICREL=y +CONFIG_PHY_MICREL_KSZ90X1=yCONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
+CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
CONFIG_DESIGNWARE_APB_TIMER=yconfigs/socfpga_arria10_defconfig +1
-1-CONFIG_USE_TINY_PRINTF=y +CONFIG_DESIGNWARE_SPI=y
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
configs/socfpga_arria10_defconfig CONFIG_FS_LOADER=y · line 78
Quoted 7 lines
configs/socfpga_arria10_defconfig +7
-0+CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_DWC2=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DOWNLOAD=yUSB and DFU could be enabled separately.
Okay.
Quoted 1 line
PATCH 6/6 ARM: socfpga: Synchronize the configuration for A10 SoCDK
Quoted 25 lines · Tien Fong
Quoted 24 lines · Marek Vasut
Quoted 23 lines · Tien Fong
Quoted 12 lines · Marek Vasut
Quoted 10 lines · tien.fong.chee at intel.com
From: Marek Vasut <[email protected]>
Update the default configuration file to enable the necessary functionality
the get the kit working. That includes SPL SD/MMC support, USB, and
I2C.Quoted 4 lines
Quoted 2 lines
Signed-off-by Marek Vasut <[email protected]>Signed-off-by Tien Fong Chee <[email protected]>Is this patch needed ? Why ? This enables a whole lot of stuff
....These settings are mostly syn up from gen5 and our own downstream A10.
These settings are mostly required to boot U-Boot and supporting A10
golden system reference design.
Quoted 7 lines
Quoted 6 lines
Hmmm, mind you, all the MTD and SPI stuff is not needed for the SDMMC configuration of the kit, which this patch would imply is the target. You want to split this into smaller config changes which enable logical
blocks, not everything at once, and document why is each thing needed.I can keep them minimal, enable them when required in separate patch.
Please do
Quoted 22 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
---
configs/socfpga_arria10_defconfig | 38
+++++++++++++++++++++++++++++++-----1 files changed, 32 insertions(+), 6 deletions(-)Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
configs/socfpga_arria10_defconfig line 4
Quoted 11 lines
configs/socfpga_arria10_defconfig +0
-0@@ -1,7 +1,7 @@CONFIG_ARM=y
CONFIG_ARCH_SOCFPGA=y
CONFIG_SYS_TEXT_BASE=0x01000040configs/socfpga_arria10_defconfig +1
-1-CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_MALLOC_F_LEN=0x8000Why is this increase in malloc area needed ?
Quoted 2 lines
This is set in the
arria10_sdmmc_next, i guess you need this value for your use case? I can revert it if it is no longer required.
I mean, you're sending a patch, I'd expect you know what it does ? :-)
[...]
Signature · 2 lines
Best regards, Marek Vasut
cover Add support for loading FPGA bitstream
In reply to tien.fong.chee at intel.comQuoted 50 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
These series of patches enable peripheral bitstream being programmed into FPGA to get the DDR up running. This's also called early IO release, because the peripheral bitstream is only initializing FPGA IOs, PLL, IO48 and DDR.
Once DDR is up running, core bitstream from MMC which contains user FPGA design would be loaded into DDR location. socfpga loadfs would be called to program core bitstream into FPGA and entering user mode.
Lastly, u-boot-dtb.img from MMC FAT partition would be loaded to DDR, and up running from there.
For this whole mechanism to work, the SDMMC flash layout would be designed as shown in below:
RAW partition:
1. spl_w_dtb-mkpimage.bin
mkpimage -hv 1 -o spl/spl_w_dtb-mkpimage.bin spl/u-boot-spl-dtb.bin
spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.binFAT partition contains:
Bitstreams
----------
Early IO release method is recommended for the sake of performance, improve up to 86% compare to full RBF.1. ghrd_10as066n2.periph.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage2. ghrd_10as066n2.core.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.core.rbf ghrd_10as066n2.core.rbf.mkimageOR
1. ghrd_10as066n2.rbf.mkimage (full RBF)
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.rbf ghrd_10as066n2.rbf.mkimageU-Boot image
------------
3. u-boot-dtb.imgFor the testing purpose, these two patches are required to apply 1st before applying this series of patches.
1. [U-Boot] [PATCH] misc:fs_loader: Switching private data allocation to DM auto allocation
https://www.mail-archive.com/u-boot at lists.denx.de/msg308954.html
Quoted 5 lines
Reviewed-by Simon Glass <[email protected]>2. [U-Boot] [PATCH v2] Add support for initializing MMC
https://www.mail-archive.com/u-boot at lists.denx.de/msg310532.html Version 2 under review.
The above should be made into documentation, since cover letters are dropped.
Signature · 2 lines
Best regards, Marek Vasut
Chee
cover Add support for loading FPGA bitstream
Quoted 68 lines · Marek Vasut
Quoted 67 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
These series of patches enable peripheral bitstream being programmed into FPGA
to get the DDR up running. This's also called early IO release, because the
peripheral bitstream is only initializing FPGA IOs, PLL, IO48 and DDR.Once DDR is up running, core bitstream from MMC which contains user FPGA
design would be loaded into DDR location. socfpga loadfs would be called to
program core bitstream into FPGA and entering user mode.Lastly, u-boot-dtb.img from MMC FAT partition would be loaded to DDR, and up
running from there.For this whole mechanism to work, the SDMMC flash layout would be designed as
shown in below:RAW partition:
1. spl_w_dtb-mkpimage.bin
mkpimage -hv 1 -o spl/spl_w_dtb-mkpimage.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl- dtb.binFAT partition contains:
Bitstreams
----------
Early IO release method is recommended for the sake of performance, improve
up to 86% compare to full RBF.1. ghrd_10as066n2.periph.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage2. ghrd_10as066n2.core.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.core.rbf ghrd_10as066n2.core.rbf.mkimageOR
1. ghrd_10as066n2.rbf.mkimage (full RBF)
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.rbf ghrd_10as066n2.rbf.mkimageU-Boot image
------------
3. u-boot-dtb.imgFor the testing purpose, these two patches are required to apply 1st before
applying this series of patches.
1. [U-Boot] [PATCH] misc:fs_loader: Switching private data allocation to DM
auto allocation
https://www.mail-archive.com/u-boot at lists.denx.de/msg308954.htmlReviewed-by Simon Glass <[email protected]>
Quoted 5 lines
Quoted 3 lines
2. [U-Boot] [PATCH v2] Add support for initializing MMC
https://www.mail-archive.com/u-boot at lists.denx.de/msg310532.html Version 2 under review.The above should be made into documentation, since cover letters are dropped.
Happy new year Marek.
Yeah, the document would be sent out once the implementation is finalized. Hence, we need your mercy and help to get this done :-P, just kidding.
Quoted 1 line
cover Add support for loading FPGA bitstream
Quoted 69 lines · Tien Fong
Quoted 68 lines · Marek Vasut
Quoted 67 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
These series of patches enable peripheral bitstream being programmed into FPGA
to get the DDR up running. This's also called early IO release, because the
peripheral bitstream is only initializing FPGA IOs, PLL, IO48 and DDR.Once DDR is up running, core bitstream from MMC which contains user FPGA
design would be loaded into DDR location. socfpga loadfs would be called to
program core bitstream into FPGA and entering user mode.Lastly, u-boot-dtb.img from MMC FAT partition would be loaded to DDR, and up
running from there.For this whole mechanism to work, the SDMMC flash layout would be designed as
shown in below:RAW partition:
1. spl_w_dtb-mkpimage.bin
mkpimage -hv 1 -o spl/spl_w_dtb-mkpimage.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl- dtb.binFAT partition contains:
Bitstreams
----------
Early IO release method is recommended for the sake of performance, improve
up to 86% compare to full RBF.1. ghrd_10as066n2.periph.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage2. ghrd_10as066n2.core.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.core.rbf ghrd_10as066n2.core.rbf.mkimageOR
1. ghrd_10as066n2.rbf.mkimage (full RBF)
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\" -d
ghrd_10as066n2.rbf ghrd_10as066n2.rbf.mkimageU-Boot image
------------
3. u-boot-dtb.imgFor the testing purpose, these two patches are required to apply 1st before
applying this series of patches.
1. [U-Boot] [PATCH] misc:fs_loader: Switching private data allocation to DM
auto allocation
https://www.mail-archive.com/u-boot at lists.denx.de/msg308954.htmlReviewed-by Simon Glass <[email protected]>
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
2. [U-Boot] [PATCH v2] Add support for initializing MMC
https://www.mail-archive.com/u-boot at lists.denx.de/msg310532.html Version 2 under review.The above should be made into documentation, since cover letters are dropped.
Happy new year Marek.
Happy New Year to you too.
Quoted 3 lines
Yeah, the document would be sent out once the implementation is finalized. Hence, we need your mercy and help to get this done :-P, just kidding.
I hope you can wrap this into V7 .
Signature · 2 lines
Best regards, Marek Vasut
Chee
cover Add support for loading FPGA bitstream
Quoted 92 lines · Marek Vasut
Quoted 91 lines · Tien Fong
Quoted 89 lines · Marek Vasut
Quoted 78 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
These series of patches enable peripheral bitstream being programmed into FPGA
to get the DDR up running. This's also called early IO release, because the
peripheral bitstream is only initializing FPGA IOs, PLL, IO48 and
DDR.Once DDR is up running, core bitstream from MMC which contains user
FPGA
design would be loaded into DDR location. socfpga loadfs would be
called to
program core bitstream into FPGA and entering user mode.Lastly, u-boot-dtb.img from MMC FAT partition would be loaded to
DDR, and up
running from there.For this whole mechanism to work, the SDMMC flash layout would be
designed as
shown in below:RAW partition:
1. spl_w_dtb-mkpimage.bin
mkpimage -hv 1 -o spl/spl_w_dtb-mkpimage.bin spl/u-boot-spl- dtb.bin
spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl- dtb.binFAT partition contains:
Bitstreams
----------
Early IO release method is recommended for the sake of performance,
improve
up to 86% compare to full RBF.1. ghrd_10as066n2.periph.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage2. ghrd_10as066n2.core.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.core.rbf ghrd_10as066n2.core.rbf.mkimageOR
1. ghrd_10as066n2.rbf.mkimage (full RBF)
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.rbf ghrd_10as066n2.rbf.mkimageU-Boot image
------------
3. u-boot-dtb.imgFor the testing purpose, these two patches are required to apply
1st before
applying this series of patches.
1. [U-Boot] [PATCH] misc:fs_loader: Switching private data allocation to DM
auto allocation
https://www.mail-archive.com/u-boot at lists.denx.de/msg308954. htmlQuoted 6 lines
Reviewed-by Simon Glass <[email protected]>2. [U-Boot] [PATCH v2] Add support for initializing MMC
https://www.mail-archive.com/u-boot at lists.denx.de/msg310532. html
Version 2 under review.The above should be made into documentation, since cover letters are
dropped.
Quoted 8 lines
Quoted 1 line
Happy new year Marek.
Happy New Year to you too.
Quoted 4 lines
Yeah, the document would be sent out once the implementation is finalized. Hence, we need your mercy and help to get this done :-P, just kidding.
I hope you can wrap this into V7 .
Sure.
Quoted 1 line
cover Add support for loading FPGA bitstream
Quoted 94 lines · Tien Fong
Quoted 93 lines · Marek Vasut
Quoted 92 lines · Tien Fong
Quoted 82 lines · Marek Vasut
Quoted 80 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
These series of patches enable peripheral bitstream being programmed into FPGA
to get the DDR up running. This's also called early IO release, because the
peripheral bitstream is only initializing FPGA IOs, PLL, IO48 and
DDR.Once DDR is up running, core bitstream from MMC which contains user
FPGA
design would be loaded into DDR location. socfpga loadfs would be
called to
program core bitstream into FPGA and entering user mode.Lastly, u-boot-dtb.img from MMC FAT partition would be loaded to
DDR, and up
running from there.For this whole mechanism to work, the SDMMC flash layout would be
designed as
shown in below:RAW partition:
1. spl_w_dtb-mkpimage.bin
mkpimage -hv 1 -o spl/spl_w_dtb-mkpimage.bin spl/u-boot-spl- dtb.bin
spl/u-boot-spl-dtb.bin spl/u-boot-spl-dtb.bin spl/u-boot-spl- dtb.binFAT partition contains:
Bitstreams
----------
Early IO release method is recommended for the sake of performance,
improve
up to 86% compare to full RBF.1. ghrd_10as066n2.periph.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage2. ghrd_10as066n2.core.rbf.mkimage
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.core.rbf ghrd_10as066n2.core.rbf.mkimageOR
1. ghrd_10as066n2.rbf.mkimage (full RBF)
mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n \"RBF\"
-d
ghrd_10as066n2.rbf ghrd_10as066n2.rbf.mkimageU-Boot image
------------
3. u-boot-dtb.imgFor the testing purpose, these two patches are required to apply
1st before
applying this series of patches.
1. [U-Boot] [PATCH] misc:fs_loader: Switching private data allocation to DM
auto allocation
https://www.mail-archive.com/u-boot at lists.denx.de/msg308954. htmlReviewed-by Simon Glass <[email protected]>Quoted 7 lines
Quoted 4 lines
2. [U-Boot] [PATCH v2] Add support for initializing MMC
https://www.mail-archive.com/u-boot at lists.denx.de/msg310532. html
Version 2 under review.The above should be made into documentation, since cover letters are
dropped.Happy new year Marek.
Quoted 8 lines
Quoted 7 lines
Happy New Year to you too.
Quoted 4 lines
Yeah, the document would be sent out once the implementation is finalized. Hence, we need your mercy and help to get this done :-P, just kidding.
I hope you can wrap this into V7 .
Sure.
Thanks
Signature · 2 lines
Best regards, Marek Vasut