cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bfrazier_arete
Adventurer
Adventurer
859 Views
Registered: ‎09-30-2014

AXI chip2chip external peripherals and the linux device tree

I am using AXI chip2chip between a Zynq and a remote Kintex Ultrascale.  I have multiple peripherals on the bus on the Kintex Ultrascale side.  How do I add those devices to the Linux device tree on the Zynq?  I have looked for examples but can't find any.  The only thing that shows up in the PL side of the Zynq device tree is the chip2chip peripheral.  I want Linux to instantiate the devices/drivers based on the "combined" device tree including the remote devices on the other end of the chip2chip side.

 

I could really use some help.

2 Replies
wlt1
Visitor
Visitor
251 Views
Registered: ‎06-09-2021

Did you ever figure this out? I am working on the same issue, and wondering what to put into the device tree to access the devices on the slave side of the c2c link.

0 Kudos
wlt1
Visitor
Visitor
209 Views
Registered: ‎06-09-2021

I was able to figure this out. Check out the following presentation: https://indico.cern.ch/event/860269/attachments/1955631/3256501/SM_Resources.pdf

You can put the remote devices into the device tree as UIO devices. Make sure your chip2chip master address range covers the range of all the slave devices you want access to. I entered the slave devices into the petalinux device tree in the (petalinux 2020.2) /project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi file. Note that I am using FPGA manager in my petalinux build (permits command line loading of the PL bitstream), and whether or not you use FPGA manager makes a difference for how the device tree is handled.

Here's an example of one of the slave devices I added to the device tree:

sfpga_LED_IO@b0000000 {
  compatible = "generic-uio","uio";
  reg = <0x0 0xb0000000 0x0 0x1000>;
  label = "sfpga_LED_IO";
};

 

0 Kudos