Skip to content
Snippets Groups Projects
Commit c1a16c3a authored by Tom Rini's avatar Tom Rini
Browse files

Merge branch 'master' of git://git.denx.de/u-boot-socfpga

parents af1b7286 09397d99
No related branches found
No related tags found
No related merge requests found
Showing
with 178 additions and 28 deletions
......@@ -7,7 +7,7 @@
#include "socfpga_cyclone5.dtsi"
/ {
model = "DENX MCVEVK";
model = "Aries MCVEVK";
compatible = "altr,socfpga-cyclone5", "altr,socfpga";
chosen {
......@@ -54,5 +54,6 @@
};
&usb1 {
disable-over-current;
status = "okay";
};
......@@ -54,10 +54,18 @@
rxc-skew-ps = <2000>;
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&i2c0 {
status = "okay";
......
......@@ -43,6 +43,7 @@ config TARGET_SOCFPGA_CYCLONE5
config TARGET_SOCFPGA_GEN5
bool
select ALTERA_SDRAM
choice
prompt "Altera SOCFPGA board select"
......@@ -56,8 +57,8 @@ config TARGET_SOCFPGA_CYCLONE5_SOCDK
bool "Altera SOCFPGA SoCDK (Cyclone V)"
select TARGET_SOCFPGA_CYCLONE5
config TARGET_SOCFPGA_DENX_MCVEVK
bool "DENX MCVEVK (Cyclone V)"
config TARGET_SOCFPGA_ARIES_MCVEVK
bool "Aries MCVEVK (Cyclone V)"
select TARGET_SOCFPGA_CYCLONE5
config TARGET_SOCFPGA_EBV_SOCRATES
......@@ -97,7 +98,7 @@ config SYS_BOARD
default "de0-nano-soc" if TARGET_SOCFPGA_TERASIC_DE0_NANO
default "de1-soc" if TARGET_SOCFPGA_TERASIC_DE1_SOC
default "is1" if TARGET_SOCFPGA_IS1
default "mcvevk" if TARGET_SOCFPGA_DENX_MCVEVK
default "mcvevk" if TARGET_SOCFPGA_ARIES_MCVEVK
default "sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT
default "socrates" if TARGET_SOCFPGA_EBV_SOCRATES
default "sr1500" if TARGET_SOCFPGA_SR1500
......@@ -106,7 +107,7 @@ config SYS_BOARD
config SYS_VENDOR
default "altera" if TARGET_SOCFPGA_ARRIA5_SOCDK
default "altera" if TARGET_SOCFPGA_CYCLONE5_SOCDK
default "denx" if TARGET_SOCFPGA_DENX_MCVEVK
default "aries" if TARGET_SOCFPGA_ARIES_MCVEVK
default "ebv" if TARGET_SOCFPGA_EBV_SOCRATES
default "samtec" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA
default "terasic" if TARGET_SOCFPGA_TERASIC_DE0_NANO
......@@ -122,7 +123,7 @@ config SYS_CONFIG_NAME
default "socfpga_de0_nano_soc" if TARGET_SOCFPGA_TERASIC_DE0_NANO
default "socfpga_de1_soc" if TARGET_SOCFPGA_TERASIC_DE1_SOC
default "socfpga_is1" if TARGET_SOCFPGA_IS1
default "socfpga_mcvevk" if TARGET_SOCFPGA_DENX_MCVEVK
default "socfpga_mcvevk" if TARGET_SOCFPGA_ARIES_MCVEVK
default "socfpga_sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT
default "socfpga_socrates" if TARGET_SOCFPGA_EBV_SOCRATES
default "socfpga_sr1500" if TARGET_SOCFPGA_SR1500
......
......@@ -8,21 +8,17 @@
#define __BOOT0_H
#ifdef CONFIG_SPL_BUILD
#define ARM_SOC_BOOT0_HOOK \
.balignl 64,0xf33db33f; \
\
.word 0x1337c0d3; /* SoCFPGA preloader validation word */ \
.word 0xc01df00d; /* Version, flags, length */ \
.word 0xcafec0d3; /* Checksum, zero-pad */ \
nop; \
\
b reset; /* SoCFPGA jumps here */ \
nop; \
nop; \
.balignl 64,0xf33db33f;
.word 0x1337c0d3; /* SoCFPGA preloader validation word */
.word 0xc01df00d; /* Version, flags, length */
.word 0xcafec0d3; /* Checksum, zero-pad */
nop;
#else
#define ARM_SOC_BOOT0_HOOK
#endif
b reset; /* SoCFPGA jumps here */
nop;
nop;
nop;
#endif
#endif /* __BOOT0_H */
SOCKIT BOARD
M: Marek Vasut <marex@denx.de>
Aries MCVEVK BOARD
M: Marek Vasut <marek.vasut@gmail.com>
S: Maintained
F: include/configs/socfpga_mcvevk.h
F: configs/socfpga_mcvevk_defconfig
File moved
File moved
......@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_SOCFPGA_ARRIA5_SOCDK=y
CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk"
CONFIG_DEFAULT_FDT_FILE="socfpga_arria5_socdk.dtb"
CONFIG_FIT=y
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
......@@ -64,3 +65,5 @@ CONFIG_G_DNL_MANUFACTURER="altera"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USE_TINY_PRINTF=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2
......@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y
CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk"
CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socdk.dtb"
CONFIG_FIT=y
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
......@@ -64,3 +65,5 @@ CONFIG_G_DNL_MANUFACTURER="altera"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USE_TINY_PRINTF=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2
......@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y
CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc"
CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb"
CONFIG_FIT=y
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
......@@ -58,3 +59,5 @@ CONFIG_G_DNL_MANUFACTURER="terasic"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USE_TINY_PRINTF=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2
\ No newline at end of file
......@@ -5,6 +5,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_SOCFPGA_TERASIC_DE1_SOC=y
CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de1_soc"
CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de1_soc.dtb"
CONFIG_FIT=y
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
......
CONFIG_ARM=y
CONFIG_ARCH_SOCFPGA=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_SOCFPGA_DENX_MCVEVK=y
CONFIG_TARGET_SOCFPGA_ARIES_MCVEVK=y
CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_mcvevk"
CONFIG_FIT=y
......
......@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y
CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sockit"
CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sockit.dtb"
CONFIG_FIT=y
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
......
......@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_SOCFPGA_EBV_SOCRATES=y
CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates"
CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socrates.dtb"
CONFIG_FIT=y
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
......
......@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_SOCFPGA_SR1500=y
CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sr1500"
CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sr1500.dtb"
CONFIG_FIT=y
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
......
--------------------------------------------
----------------------------------------
SOCFPGA Documentation for U-Boot and SPL
--------------------------------------------
----------------------------------------
This README is about U-Boot and SPL support for Altera's ARM Cortex-A9MPCore
based SOCFPGA. To know more about the hardware itself, please refer to
www.altera.com.
--------------------------------------------
socfpga_dw_mmc
--------------------------------------------
--------------
Here are macro and detailed configuration required to enable DesignWare SDMMC
controller support within SOCFPGA
#define CONFIG_SYS_MMC_MAX_BLK_COUNT 256
-> Using smaller max blk cnt to avoid flooding the limited stack in OCRAM
--------------------------------------------------
Generating the handoff header files for U-Boot SPL
--------------------------------------------------
This text is assuming quartus 16.1, but newer versions will probably work just fine too;
verified with DE1_SOC_Linux_FB demo project (https://github.com/VCTLabs/DE1_SOC_Linux_FB).
Updated/working projects should build using either process below.
Note: it *should* work from Quartus 14.0.200 onwards, however, the current vendor demo
projects must have the IP cores updated as shown below.
Rebuilding your Quartus project
-------------------------------
Choose one of the follwing methods, either command line or GUI.
Using the comaand line
~~~~~~~~~~~~~~~~~~~~~~
First run the embedded command shell, using your path to the Quartus install:
$ /path/to/intelFPGA/16.1/embedded/embedded_command_shell.sh
Then (if necessary) update the IP cores in the project, generate HDL code, and
build the project:
$ cd path/to/project/dir
$ qsys-generate soc_system.qsys --upgrade-ip-cores
$ qsys-generate soc_system.qsys --synthesis=[VERILOG|VHDL]
$ quartus_sh --flow compile <project name>
Convert the resulting .sof file (SRAM object file) to .rbf file (Raw bit file):
$ quartus_cpf -c <project_name>.sof soc_system.rbf
Generate BSP handoff files
~~~~~~~~~~~~~~~~~~~~~~~~~~
You can run the bsp editor GUI below, or run the following command from the
project directory:
$ /path/to/bsb/tools/bsp-create-settings --type spl --bsp-dir build \
--preloader-settings-dir hps_isw_handoff/soc_system_hps_0/ \
--settings build/settings.bsp
You should use the bsp "build" directory above (ie, where the settings.bsp file is)
in the following u-boot command to update the board headers. Once these headers
are updated for a given project build, u-boot should be configured for the
project board (eg, de0-nano-sockit) and then build the normal spl build.
Now you can skip the GUI section.
Using the Qsys GUI
~~~~~~~~~~~~~~~~~~
1. Navigate to your project directory
2. Run Quartus II
3. Open Project (Ctrl+J), select <project_name>.qpf
4. Run QSys [Tools->QSys]
4.1 In the Open dialog, select '<project_name>.qsys'
4.2 In the Open System dialog, wait until completion and press 'Close'
4.3 In the Qsys window, click on 'Generate HDL...' in bottom right corner
4.3.1 In the 'Generation' window, click 'Generate'
4.3.2 In the 'Generate' dialog, wait until completion and click 'Close'
4.4 In the QSys window, click 'Finish'
4.4.1 In the 'Quartus II' pop up window, click 'OK'
5. Back in Quartus II main window, do the following
5.1 Use Processing -> Start -> Start Analysis & Synthesis (Ctrl+K)
5.2 Use Processing -> Start Compilation (Ctrl+L)
... this may take some time, have patience ...
6. Start the embedded command shell as shown in the previous section
6.1 Change directory to 'software/spl_bsp'
6.2 Prepare BSP by launching the BSP editor from ECS
=> bsp-editor
6.3 In BSP editor
6.3.1 Use File -> Open
6.3.2 Select 'settings.bsp' file
6.3.3 Click Generate
6.3.4 Click Exit
Post handoff generation
~~~~~~~~~~~~~~~~~~~~~~~
Now that the handoff files are generated, U-Boot can be used to process
the handoff files generated by the bsp-editor. For this, please use the
following script from the u-boot source tree:
$ ./arch/arm/mach-socfpga/qts-filter.sh \
<soc_type> \
<input_qts_dir> \
<input_bsp_dir> \
<output_dir>
Process QTS-generated files into U-Boot compatible ones.
soc_type - Type of SoC, either 'cyclone5' or 'arria5'.
input_qts_dir - Directory with compiled Quartus project
and containing the Quartus project file (QPF).
input_bsp_dir - Directory with generated bsp containing
the settings.bsp file.
output_dir - Directory to store the U-Boot compatible
headers.
This will generate (or update) the following 4 files:
iocsr_config.h
pinmux_config.h
pll_config.h
sdram_config.h
These files should be copied into "qts" directory in the board directory
(see output argument of qts-filter.sh command above).
Here is an example for the DE-0 Nano SoC after the above rebuild process:
$ ll board/terasic/de0-nano-soc/qts/
total 36
-rw-r--r-- 1 sarnold sarnold 8826 Mar 21 18:11 iocsr_config.h
-rw-r--r-- 1 sarnold sarnold 4398 Mar 21 18:11 pinmux_config.h
-rw-r--r-- 1 sarnold sarnold 3190 Mar 21 18:11 pll_config.h
-rw-r--r-- 1 sarnold sarnold 9022 Mar 21 18:11 sdram_config.h
Note: file sizes will differ slightly depending on the selected board.
Now your board is ready for full mainline support including U-Boot SPL.
The Preloader will not be needed any more.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment