To enable PL-DDR:
- Extract the PetaLinux BSP.
- Update required notes in system-user.dtsi:
- The UC2 design requires two Frame Buffer IPs for DMA
transfers. The video_m2m device node constructs the video mem2mem
pipeline. The dtsi changes are as follows:
&amba_pl { video_m2m { compatible = "xlnx,mem2mem"; dmas = <&v_frmbuf_rd_0 0>, <&v_frmbuf_wr_0 0>; dma-names = "tx", "rx"; }; };
- Update the device tree node to have a dedicated memory
for the VCU.
- <=19.2 dtsi
changes:
&vcu_ddr4_controller_0 { compatible = "xlnx,ddr4-2.2"; reg = <0x00000048 0x00000000 0x0 0x80000000>; ranges; #address-cells = <2>; #size-cells = <2>; plmem_vcu: pool@0 { reg = <0x48 0x00000000 0x0 0x70000000>; }; };
- >=20.1 dtsi
changes
/ { reserved-memory { #address-cells = <0x2>; #size-cells = <0x2>; ranges; plmem_vcu: vcu_dma_mem_region { compatible = "shared-dma-pool"; no-map; reg = <0x48 0x0 0x0 0x70000000>; }; }; };"
- <=19.2 dtsi
changes:
- The VCU device tree node changes to allocate memory from
PL_DDR.
- If decoder is connected to PL-DDR:
- <=19.2 dtsi
changes:
&decoder { xlnx,dedicated-mem = <&plmem_vcu>; };
- >=20.1 dtsi
changes:
&decoder { memory-region = <&plmem_vcu>; };
- <=19.2 dtsi
changes:
- If encoder is connected to PL-DDR:
- <=19.2 dtsi
changes:
&encoder { xlnx,dedicated-mem = <&plmem_vcu>; };
- >=20.1 dtsi
changes:
&encoder { memory-region = <&plmem_vcu>; };
- <=19.2 dtsi
changes:
Note: These changes are relevant to the ZCU106 and ZCU104 designs only. You should modify your changes based on the specific design that you are working with.This generates the device tree in the path: components/plnx_workspace/device-tree/device-tree
vi project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
The contents of the file for >= 20.1 UC2 are:
/include/ "system-conf.dtsi" / { reserved-memory { #address-cells = <0x2>; #size-cells = <0x2>; ranges; plmem_vcu_dec: vcu_dma_mem_region { compatible = "shared-dma-pool"; no-map; reg = <0x48 0x0 0x0 0x70000000>; }; }; }; &amba_pl { video_m2m { compatible = "xlnx,mem2mem"; dmas = <&v_frmbuf_rd_0 0>, <&v_frmbuf_wr_0 0>; dma-names = "tx", "rx"; }; }; &vcu_ddr4_controller_0 { compatible = "xlnx,ddr4-2.2"; reg = <0x00000048 0x00000000 0x0 0x80000000>; ranges; #address-cells = <2>; #size-cells = <2>; }; &decoder { memory-region = <&plmem_vcu_dec>; };
- If decoder is connected to PL-DDR:
- The UC2 design requires two Frame Buffer IPs for DMA
transfers. The video_m2m device node constructs the video mem2mem
pipeline. The dtsi changes are as follows:
- Build the images
petalinux-build
. - Package
Boot.bin
using the following command.petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit