Open ioindustries opened 2 years ago
I think I have a similar problem. Following the Petalinux workflow, the builtin smartcam app works, but when I try to load my app (built following this tutorial) the /dev/media0 device is not loaded. Following the Ubuntu workflow, the app created works perfectly and I can see the /dev/media0.
The device tree generator (dtg) tool that generates a dts(i) from an xsa does not always produce a complete or correct device tree. it can be used as a starting point but the user may need to further tweak the dtsi for correct functionality.
Having a golden reference like the smartcam dts file allows to compare individual dt nodes for missing or incorrect properties. It is also useful to refer to the device tree bindings doc of each driver in the kernel tree and cross check the generated results against the bindings doc.
Specifically for video pipelines, the device tree nodes are connected as a graph where nodes represent the v4l subdevices and ports represent how they are linked. dtg may not be able to generate this correctly. dtg is also not aware of board-level components.
Hope this helps troubleshoot your dtsi.
Hello @chkohn, thanks for your answer. Turns out my dtsi was fine, the problem was that the Petalinux kernel does not include this driver which, I guess, is builtin in the Ubuntu Kernel. Took me a lot of time to understand this problem because I was focused on the device tree and the Vivado design. Best regards, Marco
@marcobergamin-videam glad you figured it out and thanks for posting the solution to your problem. hopefully it will help others that run into the same problem.
I have built the
kv260_ispMipiRx_vcu_DP
platform provided in this repository for use with the smartcam application on a KV260 starter kit.My goal is to add VCU, MIPI, and DP support to my custom carrier card design and run the same smartcam application with the use of the PetaLinux drivers which I believe are at
/dev/allegroIP
(for VCU) and/dev/media0
(for MIPI). I want to be able to create and boot a PetaLinux project with those drivers loaded for this platform before I attempt to do it on my custom one.So I created a Petalinux project from the
kv260_ispMipiRx_vcu_DP.xsa
file using--get-hw-description
and the OS boots up properly but doesn't load the VCU or MIPI drivers. The default app that's loaded withxmutil
iskv260-dp
which doesn't load those drivers. When I load thekv260-smartcam
app, all the drivers load properly. So I'm assuming the drivers are only loaded through accelerated apps usingxmutil
?I generated a device tree overlay file from the
kv260_ispMipiRx_vcu_DP.xsa
by using the instructions here: Generate Device Tree OverlayThen, I built an example vector add accelerated application using the KV260 Platform Tutorial and moved it to the accelerated app directory (
/lib/firmware/xilinx
) along with the DTBO device tree overlay file generated above. When I load it with xmutil, it loads the VCU drivers correctly to/dev/allegroIP
but it doesn't load the MIPI drivers which I believe should be at/dev/media0
.Interestingly, I tried generating a DTBO file from the DTSI file found here and it loads all the drivers properly. This leads me to believe that there's something wrong with the DTSI file I generated myself. Can somebody help me figure out why my generated device tree file doesn't load the MIPI driver properly the way the kv260-smartcam.dtsi does? Thanks!
Here's my generated DTSI file can be found here.