This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRA821U: Understanding of Device tree population by MAIN and MCU-WKUP domain

Part Number: DRA821U
Other Parts Discussed in Thread: DRA821

Hi,

I see k3-j7200-common-proc-board.dtb present in PSDK(linux-j7200-evm-08_00_00_05). Looking at sources(arch/arm64/boot/dts/ti),k3-j7200-common-proc-board.dts ultimately ends up including k3-j7200-som-p0.dtsi, k3-j7200.dtsi, k3-j7200-main.dtsi and k3-j7200-mcu-wakeup.dtsi. 

Is it the case that both(A72 & R5F) are being fed to single and same dtb file(k3-j7200-common-proc-board). 

Trying to understand how dtb are read by different processors/controllers present in SOC so that I can customize based on my needs.

Also, image formats for tiboot3.bin and tispl.bin shows DTB 1...N field. What does this signify? Is it something like header/address of the dtb or dtb as whole included in them?

Regards,

Raxesh

  • Hi Raxesh,

    Recommend you to go through the TRM top level diagram:

    https://www.ti.com/lit/zip/spruil1

    The k3-j7200-common-proc-board.dts as you have rightly observed includes:  k3-j7200-som-p0.dtsi, k3-j7200.dtsi, k3-j7200-main.dtsi and k3-j7200-mcu-wakeup.dtsi. 

    So k3-j7200.dtsi file defines the A72 & includes the main & mcu-wkup dtsi. The main & mcu-wkup dtsi define the main domain & mcu-wkup domain device tree nodes
    mirroring the above top level block diagram.

    The  k3-j7200-som-p0.dtsi is the next level & is representing the System on Module board.

    The last level is the common processor board including the SoM board and common processor board specific device tree nodes.

    tiboot3.bin and tispl.bin pack DTBs inside them:


    It is basically a FIT Image & packs the different board DTBs.

    For example: k3-j721e-common-proc-board.dtb can be one & you can add your custom board.dtb.


    Best Regards,
    Keerthy

  • Thanks for the elaborative answer. 

    Do you mean tiboot3.bin and tispl.bin both have k3-j7200-common-proc-board.dtb embedded in it(and many more but I am only concerned about DRA821 now)? If this is the case, then we don't need to provide k3-j7200-common-proc-board.dtb in /boot directory of the rootfs partition, correct?

    I am still looking some information on:

    • Are three(A72, Main domain R5F & MCU R5F) being fed to single and same dtb file(k3-j7200-common-proc-board)?

    • How dtbs are read by A72, Main domain R5F & MCU R5F?

  • Do you mean tiboot3.bin and tispl.bin both have k3-j7200-common-proc-board.dtb embedded in it(and many more but I am only concerned about DRA821 now)? If this is the case, then we don't need to provide k3-j7200-common-proc-board.dtb in /boot directory of the rootfs partition, correct?

    You are right DTBs are embedded in the tiboot3.bin & tispl.bin.

    tiboot3.bin is the R5 SPL & has the corresponding DTB needed for R5 SPL.

    tispl.bin is the A72 SPL & has the corresponding DTB needed for A72 SPL. So k3-j7200-common-proc-board.dtb will be present but it will not be the same DTB across all the phases of boot. The peripherals that need to be probed during a particular phase will be part of the DTB.


    Are three(A72, Main domain R5F & MCU R5F) being fed to single and same dtb file(k3-j7200-common-proc-board)?

    Yes the k3-j7200-common-proc-board will contain the necessary nodes from A72, Main domain R5F & MCU R5F.

    Every boot phase will know the address where the DTB will be loaded in RAM. For example the Linux
    kernel picks up the DTB from $fdtaddr.

    If there are more basic questions on DTS/DTB. I would recommend posting on the device-tree mailing list - devicetree@vger.kernel.org.

    Please click on verify answer if no other questions w.r.t J7200.

    Best Regards,
    Keerthy

    How dtbs are read by A72, Main domain R5F & MCU R5F?
  • You are right DTBs are embedded in the tiboot3.bin & tispl.bin.

    Does it mean we don't need to provide k3-j7200-common-proc-board.dtb in /boot directory of the rootfs partition?

  • Hi Raxesh,

    As I have told in other threads. tiboot3.bin, tispl.bin & u-boot.img all of them have their versions of k3-j7200-common-proc-board.dtb.

    /boot directory must contain the k3-j7200-common-proc-board.dtb for booting Linux kernel. Till U-Boot all of the binaries mentioned
    above contain their own version of dtb But the Linux kernel Image needs the k3-j7200-common-proc-board.dtb to be present explicitly in /boot folder.

    Hope I am clear. If no further questions please clicj on verify answer & close the thread.

    - Keerthy