SPRADD1A August   2023  – September 2024 AM620-Q1 , AM623 , AM625 , AM625-Q1 , AM625SIP , AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM62P , AM62P-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. Introduction
  5. Installing the SDK
  6. Configuring the SDK for a Custom Board
  7. Starting U-Boot Board Port
    1. 4.1 Introduction to Devicetrees
    2. 4.2 Capabilities of the Minimal Configuration
    3. 4.3 Preparing Custom Board Files
    4. 4.4 Initial Devicetree Modifications
    5. 4.5 Building U-Boot Binaries
    6. 4.6 U-Boot Deployment Instructions
  8. Expanding the Custom Board Devicetree
    1. 5.1 Devicetree Configuration
    2. 5.2 Describing Peripherals in Nodes
    3. 5.3 Revising the Devicetree Configuration
  9. Booting the Linux Kernel
    1. 6.1 Kernel Boot Overview
    2. 6.2 Kernel Deployment Instructions
  10. Tools and Debugging
    1. 7.1 Kernel Debug Traces
    2. 7.2 OpenOCD Debugging
  11. Future Work
  12. Summary
  13. 10References
  14.   Revision History

Preparing Custom Board Files

The following steps set up the custom board devicetrees and configuration files for development. It may be helpful to refer back to the AM62x Devicetree diagram to understand how the devicetrees being created fit into the existing structure.

  1. Duplicate and Rename Required Board Devicetrees.

    Create renamed copies of the provided devicetrees using the following commands. If the provided devicetrees are not present in the installed SDK, they can be downloaded in the references section.

    $ cp TI_U_BOOT/arch/arm/dts/k3-am625-minimal.dts TI_U_BOOT/arch/arm/dts/k3-am625-<boardname>.dts
    $ cp TI_U_BOOT/arch/arm/dts/k3-am625-r5-minimal.dts TI_U_BOOT/arch/arm/dts/k3-am625-r5-<boardname>.dts
    $ cp TI_U_BOOT/arch/arm/dts/k3-am625-minimal-u-boot.dtsi TI_U_BOOT/arch/arm/dts/k3-am625-<boardname>-u-boot.dtsi

    These naming changes need to be reflected in the #include preprocessor directives in k3-am625-r5-<boardname>.dts.

    // in k3-am625-r5-<boardname>.dts
    - #include "k3-am625-minimal.dts"
    - #include "k3-am625-minimal-u-boot.dtsi"
    + #include "k3-am625-<boardname>.dts"
    + #include "k3-am625-<boardname>.dtsi"
  2. Generate Devicetree for DDR Configuration.

    The DDR configuration used by U-Boot for DDR initialization is contained in a devicetree that is generated using TI's SysConfig tool. After launching the SysConfig tool and logging in to your myTI account, set the "Software Product" field to "DDR Configuration for AM64x, AM625, AM623, AM62Ax, AM62Px" and the "Device" field to "AM62x". Start the program to load the DDR configuration tool. Here, you can modify DDR settings to match the hardware specification. To prevent signal integrity issues that can lead to boot failure, it is recommended to set the DDR frequency to 667MHz (1334 MTs). This is the slowest speed supported by DDR4 with DLL on. DDR frequency is set in the SysConfig DDR tool's "Memory Frequency (MHz)" field. After completing board bring-up, a new DDR configuration should be generated according to the DDR device specifications. Refer to the SysConfig DDR Configuration README for a complete guide to this tool. The generated file that needs to be included is named k3-am62x-ddr-config.dtsi. Download this file and use the commands below to rename this devicetree and place it in the SDK U-Boot repository.

    $ cp k3-am62x-ddr-config.dtsi TI_U_BOOT/arch/arm/dts/k3-am62x-<boardname>-ddr4-<#MTs>.dtsi

    Replace the following line in k3-am625-r5-<boardname>.dts.

    - #include "k3-am62x-sk-ddr4-1600MTs.dtsi"
    + #include "k3-am62x-<boardname>-ddr4-<#MTs>.dtsi"
  3. Setup Binman for Custom Board.

    Binman is used to generate U-Boot binaries. Use the following command to duplicate the existing EVM binman devicetree file and rename it for a custom board.

    $ cp TI_U_BOOT/arch/arm/dts/k3-am625-sk-binman.dtsi TI_U_BOOT/arch/arm/dts/k3-am625-<boardname>-binman.dtsi

    In this newly created file, make the following modification to use the custom devicetree.

    - #define SPL_AM625_SK_DTB "spl/dts/k3-am625-sk.dtb"
    + #define SPL_AM625_SK_DTB "spl/dts/k3-am625-<boardname>.dtb"

    Include this new file in k3-am625-<boardname>-u-boot.dtsi.

    - #include "k3-am625-sk-binman.dtsi"
    + #include "k3-am625-<boardname>-binman.dtsi"
  4. Integrate Devicetrees to Build Process.

    Newly created devicetrees are added to the Makefile by adding the following lines in TI_U_BOOT/arch/arm/dts/Makefile.

    dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \
    			      k3-am625-r5-sk.dtb \
    			      k3-am62sip-r5-sk.dtb \
    			      k3-am625-beagleplay.dtb \
    			      k3-am625-r5-beagleplay.dtb \
    			      k3-am625-verdin-wifi-dev.dtb \
    			      k3-am625-verdin-r5.dtb \
    			      k3-am625-phyboard-lyra-rdk.dtb \
    			      k3-am625-r5-phycore-som-2gb.dtb \
    			      k3-am62-lp-sk.dtb \
    			      k3-am62-r5-lp-sk.dtb \
    +			      k3-am625-<boardname>.dtb \
    +			      k3-am625-r5-<boardname>.dtb
  5. Setup Configuration Fragments.

    Create or modify two configuration fragments that will be applied on top of the existing AM62x EVM default configuration files to change the devicetree being accessed by U-Boot. These should be created in TI_U_BOOT/configs/. If you followed the steps in Section 3, these files have already been created. Add the lines below to the configuration fragments.

    am62x_<boardname>_r5.config

    CONFIG_DEFAULT_DEVICE_TREE="k3-am625-r5-<boardname>"
    am62x_<boardname>_a53.config
    CONFIG_DEFAULT_DEVICE_TREE="k3-am625-<boardname>"
    CONFIG_SPL_OF_LIST="k3-am625-<boardname>"
    CONFIG_OF_LIST="k3-am625-<boardname>"

The custom board configuration has now been set up within U-Boot.