Post Go back to editing

About device tree for AD9364 on ZYNQ7020

Category: Software
Product Number: AD9364
Software Version: 2021.1

Hello,

I have ADRV9364 and Custom board that has ZYNQ7020 and AD9364. Our custom board works with ADI's No-Os codes without any problem. We would like to run linux on our custom board. So we followed the steps shared on this documentation https://wiki.analog.com/resources/tools-software/linux-build/generic/zynq . When we build kernel for ADRV9364 everything works well. Unfortunatelly, it does not work on our custom board. Becuase GPIOs, UARTs and Ethernet phy is connected to different pins of ZYNQ7020. We have also 16-bit DDR3 instead of 32-bit DDR3. So I believe we have to change the device tree? ADI says instead of creating from scratch, modify the shared one.

1) How can I modify shared one for my custom board?

2) Should I change zynq-7000.dtsi, zynq-adrv9364-z7020.dtsi and zynq-adrv9364-z7020-bob.dts files then compile it or Should I compile devicetree.dts from devicetree.dtb and change that? 

3) Should I also make changes on u-boot.elf for creating BOOT.bin? or only changing device tree settings are enough?

Best Regards

  • The most important part is to build a fsbl and BOOT.BIN for your custom board.

    The fsbl will take care of the DDR memory initialization. In most cases the default uboot will work, however if UART and ethernet is different you may need to modify the devicetree used by u-boot as well.

    If this is all new to you you can use petalinux and have that create your BOOT.BIN altogether with fsbl and u-boot.

    You can also go one step further and have petalinux build your kernel and dtb.

    This will get you to a kernel prompt and ethernet will likely be working too.

    Once that is done, I would abandon petalinux and merge the zynq-adrv9364-z7020.dtsi and zynq-adrv9364-z7020-bob.dts.

    BTW   zynq-7000.dts is never modified!

    Hope that helps,

    Michael

  • Thank you for your help. I succeeded with this method.

  • I am also interested on this thread because I want to do something similar also with the ADRV9364. It is not totally clear to me what would be the procedure if I want to build my own linux image without using petalinux. As I understood from your answer, I should modify zynq-adrv9364-z7020.dtsi and zynq-adrv9364-z7020-bob.dts, in order to make my custom devices work with the board, isn't it? Should I also have to modify linux kernel or u-boot?

    Also, I have checked zynq-adrv9364-z7020.dtsi, zynq-adrv9364-z7020-bob.dts and zynq-7000.dts files. Do I have to add any other devicetree source file in order to build the devicetree blob for the ADRV9364? And if I want to program the PL of the Zynq-7000 with Xilinx Vivado, what would be the procedure?

    I have seen that you can do it by extracting the .xsa file and using it with Vitis tools in order to modify your linux images.

    Could you please help me with those questions?

    Thank you in advance,

    Regards,

    David