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.
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?
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).
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`)