Hi,
I am trying to set the overlay device tree on Terasic Ubuntu 16.0 Desktop SD Card for programming the FPGA of DE1-SoC Cyclone V Terasic with MSEL to 00000
I have use the device tree sources socfpga_cyclone5_socdk.dts, socfpga_cyclone5_ghrd.dtsi, socfpga_cyclone5.dtsi, socfpga.dtsi from repository : kernel arm tree
There isn’t a problem with the static or base device tree soc_system.dtb located on the boot partition of the SD card. I can see the device-tree after boot on /proc/device-tree/soc/.
In socfpga_cyclone5_ghrd.dtsi file I have uncomment bridges nodes.
This is the element add to node soc in socfpga.dtsi:
base_fpga_region: base-fpga-region {
compatible = "fpga-region";
fpga-mgr = <&fpga_mgr0>;
fpga-bridges = <&fpga_bridge0>, <&fpga_bridge1>,
<&fpga_bridge2>, <&fpga_bridge3>;
#address-cells = <0x1>;
#size-cells = <0x1>;
ranges = <0x00000000 0x00000000 0xc0000000 0x20000000>,
<0x00000001 0x00000000 0xff200000 0x00200000>;
};
I have compiled socfpga_cyclone5_socdk.dts with dtc command and copy the blob file socfpga_cyclone5_socdk.dtb on boot partition of the SDCard.
The edition of the overlay device tree source de1soc.dts with the name de1soc.rbf of fpga image :
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target-path = "/soc/base-fpga-region";
#address-cells = <1>;
#size-cells = <1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <1>;
firmware-name = "de1soc.rbf";
config-complete-timeout-us = <30000000>;
};
};
};
Compilation command for de1soc.dts : dtc -O dtb -o de1soc.dtb -b 0 -@ de1soc.dts
forum
While system boot the message about fpga manager & bridges is:
[ 1.914104] fpga_manager fpga0: Altera SOCFPGA FPGA Manager registered
[ 1.921251] altera_hps2fpga_bridge soc:fpgabridge@0: fpga bridge [hps2fpga] registered
[ 1.929390] altera_hps2fpga_bridge soc:fpgabridge@1: fpga bridge [lwhps2fpga] registered
[ 1.937688] altera_hps2fpga_bridge soc:fpgabridge@2: fpga bridge [fpga2hps] registered
[ 1.946043] altera_fpga2sdram_bridge soc:fpgabridge@3: fpga bridge [fpga2sdram] registered
[ 1.954299] altera_fpga2sdram_bridge soc:fpgabridge@3: driver initialized with handoff 00000000
[ 1.963314] fpga-region soc:base-fpga-region: FPGA Region probed
After boot Ubuntu Desktop on DE1-SoC from SDCard I have load the overlay device tree:
sudo cp de1soc.dtb /lib/firmware
convert de1soc.sof to rbf : quartus_cpf -c de1soc.sof de1soc.rbf
sudo cp de1soc.rbf /lib/firmware
mkdir /sys/kernel/config/device-tree/overlays/my_cv_fpga
ls /sys/kernel/config/device-tree/overlays/my_cv_fpga
→ status, path and dtbo subfolders
sudo echo de1soc.dtb > /sys/kernel/config/device-tree/overlays/my_cv_fpga/path
I can see that the board begin the RBF file transfer but the Ubuntu System get to hang and I need to reboot the system
If I do cat de1soc.dtb > /sys/kernel/config/device-tree/overlays/my_cv_fpga/dtbo
the result is the same.
With MSEL: 0000, FPGA is configured from HPS software like U-Boot and console-Linux, and with MSEL: 1010, FPGA is configured from HPS software like Linux. Perhaps the problem is that the MSEL must set to 01010, but then the system doesn’t boot, if that what changes I must do with the preloader and U-boot for to boot with MSEL 01010. Some ideas about what is wrong?
Thanks
Candido