Hi everyone,
I have the following problem related to the Arria10 socfpga. I use a yocto build with either
the kernel 4.9.76-ltsi-rt (yocto thud) or 4.14.126-ltsi-rt (yocto warrior). Information on device tree overlays in general is available here:
Unfortunately, this description works for kernel 4.9.78 only.
For my problem, I use a very simple device tree overlay file (dtso) which looks as follows:
/dts-v1/;/plugin/;
/ {
fragment {
target-path = "/soc/base_fpga_region";
#address-cells = <0x1>;
#size-cells = <0x1>;
__overlay__ {
external-fpga-config;
#address-cells = <0x2>;
#size-cells = <0x1>;
// Ranges
ranges = <0x00000001 0x00000450 0xff200450 0x00000008>; // Sys id driver
sysid: sysid@100000450 {
compatible = "altr,sysid-18.1", "altr,sysid-1.0";
reg = <0x00000001 0x00000450 0x00000008>;
clocks = <&clk_0>;
id = <3684762384>;
timestamp = <1568123853>;
}; //end sysid@0x100000450 (sysid)
clk_0: clk_0 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <50000000>; /* 50.00 MHz */
clock-output-names = "clk_0-clk";
}; //end clk_0 (clk_0)
};
};
};
The purpose of the device tree overlay is to be loaded at runtime to load the driver module to access the Altera sysid (compatibility string “altr,sysid-18.1”) afterwards. No firmware (rbf file) is to be loaded since this has already been loaded during uboot phase. The address of the altera_sysid memory (ranges and reg sections) is not of importance since it is not verified against the hardware in the driver. The entries and values such as reg, irq etc in the overlay file have been taken from a device tree generated involving the sopc2dts tool.
For loading the device tree overlay (denoted as dtree.dtbo), I use the following sequence:
mkdir /config
mount -t configfs configfs /config
mkdir /config/device-tree/overlays/my_olay_folder
echo dtree.dtbo > /config/device-tree/overlays/my_olay_folder/path
umount /config
Of course, I run the dtc with the right options to generate a valid device tree overlay.
With this setting, I tested the following systems:
- DE0 Board with Cyclone 5 socfpga
- A custom board with an Arria10 socfpga
Both systems are operated based on a yocto generated root filesystem.
If booting the 4.9.76 kernel, in both cases, the device tree overlay is loaded after bootup by running the mentioned commands. Afterwards, I can see that the altera_sysid driver module is loaded (command lsmod shows the altera_sysid module).
Now with the 4.14.126 kernel, I can load the device tree overlay on the De0 board which is based on the Cyclone 5 socfpga. Again, the altera_sysid module is stated to be loaded afterwards.
In contrast to this, this procedure does not work on the Arria10 board: the device tree can be loaded on the Arria10 system by the mentioned commands but the altera_sysid module is NOT loaded afterwards. After loading the device tree overlay I can even see in /proc/device-tree that all entries including the compatibility strings are there - just no module has been loaded!
Starting from the described case, I tested all kinds of device tree overlays (different dtc versions, different realizations of the dtso file, different kernels > 4.14.126 etc) - I can not get the kernel to load any module by loading the device tree overlay.
So, here is my question: what is the trick? How can I get the module to be loaded by loading a device tree overlay on the Arria10? Or is this behavior a bug?
The described problem makes life rather complicated for me:
- in most cases in embedded Linux systems, the device tree overlay is merged into the full device tree in the uboot (or the binblob boot loader in case of the Raspi). This does not work on the Arria10 socfpga systems if a uboot taylored given the Quartus project is required: This, unfortunately, still is only supported for the Altera/Intel provided version of uboot which is based on the 2013 release and does not support device tree overlay merges yet (fdt apply).
- The 4.9.76-ltsi-rt branch has recently been removed from the altera kernel github repository. A thud based yocto build involving the 4.9.76 kernel is not possibly at the moment.
Any help or hint on this topic is greatly appreciated.
Thank you in advance and best regards
Hauke