Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20638 Discussions

Why is the DE10-Nano device tree not present in kernel sources?

zangman
New Contributor I
1,810 Views

I am building a custom image for the DE10-Nano. I used the device tree binary (dtb) from the GHRD that ships with quartus 20.1 as explained on this page and it works fine.

But I would like to understand why the device tree source (dts) for de10-nano-soc is missing in the linux-socfpga and the official linux kernel sources. Please see the screenshot below.

Screenshot from 2020-09-10 10-32-03.png

When using the dtb compiled with the kernel, ethernet works if I use the de0 device tree (`socfpga_cyclone5_de0_nano_soc.dtb`) and not if I use  the socdk device tree (`socfpga_cyclone5_socdk.dtb`).

Does this mean that the reason we don't have the de10 device tree is because it is identical to the de0?

0 Kudos
4 Replies
zangman
New Contributor I
1,796 Views

To answer my original question, the reason the ethernet works on the de10 with the de0 device tree is because the ethernet config settings specified in the de0 device tree match with what is needed for the de10 ethernet device.

Digging this further, I've found that there exists a de10 device tree included in the u-boot sources (link) which works fine with the de10. However, the socfpga.dtsi included in U-Boot is outdated compared to the socfpga.dtsi in the linux sources (missing fpga2hps bridge node and some other changes).

ARGH!!

What I finally concluded is that it's best to use the de0-nano device tree in the kernel sources, make a copy of it and modify it to your requirements. This is preferable because:

  • Depends on the more up to date socfpga.dtsi
  • Easier to build in the linux sources than u-boot sources. In linux sources, `make ARCH=arm my_device_tree.dtb` just works as long as it's present in the dts folder. In u-boot, you need to update the `Makefile` in the dts folder and then pass `CONFIG_DEFAULT_DEVICE_TREE` when building using `make` (Ex: `make ARCH=arm CONFIG_DEFAULT_DEVICE_TREE=my_device_tree.dtb`)

 

 

 

 

AnilErinch_A_Intel
1,771 Views

Hi ,

Thanks for helping the community the observations.

Thanks and Regards

Anil


0 Kudos
davidyu1
Beginner
933 Views

Hi,

Could you provide the original socfpga_cyclone5_de10_nano.dts?

When I tried to upgrade kernel version with de0 device tree,  I can not find the "gpio-leds" of fpga-region in the device tree.

 

David

0 Kudos
zangman
New Contributor I
909 Views

@davidyu1 I have documented all the steps necessary (in great detail) over in this wiki, perhaps it might be helpful to you:

 

https://github.com/zangman/de10-nano

Reply