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.

AM6442: [Yocto] custom device tree

Part Number: AM6442

Hello

I using Yocto to build custom image for AM6442-SK board. I want to add custom device tree for my board and I have question how U-Boot detect right device tree? For example

I have AM6442-SK board and TMDS64GPEVM board. How U-Boot determine to load k3-am642-sk.dtb or k3-am642-evm.dtb?

I found in U-Boot environment variable:

findfdt=if test $board_name = am64x_gpevm; then setenv fdtfile k3-am642-evm.dtb; fi; if test $board_name = am64x_skevm; then setenv fdtfile k3-am642-sk.dtb; fi;if test $fdtfile = undefined; then echo WARNING: Could not determine device tree to use; fi;

but why there are only two device trees? What about the other boards?

Where board_name variable is set?

BR

Jakub

  • Where board_name variable is set?

    This is set by the board detection code in U-Boot itself, see here for AM6x devices...

    $ git grep -W set_board_info_env_am6 board/ti/common/board_detect.c
    board/ti/common/board_detect.c:void __maybe_unused set_board_info_env_am6(char *name)
    board/ti/common/board_detect.c-{
    board/ti/common/board_detect.c- char *unknown = "unknown";
    board/ti/common/board_detect.c- struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
    board/ti/common/board_detect.c-
    board/ti/common/board_detect.c- if (name)
    board/ti/common/board_detect.c-         env_set("board_name", name);
    board/ti/common/board_detect.c- else if (strlen(ep->name) != 0)
    board/ti/common/board_detect.c-         env_set("board_name", ep->name);
    board/ti/common/board_detect.c- else
    board/ti/common/board_detect.c-         env_set("board_name", unknown);
    board/ti/common/board_detect.c-
    board/ti/common/board_detect.c- if (strlen(ep->version) != 0)
    board/ti/common/board_detect.c-         env_set("board_rev", ep->version);
    board/ti/common/board_detect.c- else
    board/ti/common/board_detect.c-         env_set("board_rev", unknown);
    board/ti/common/board_detect.c-
    board/ti/common/board_detect.c- if (strlen(ep->software_revision) != 0)
    board/ti/common/board_detect.c-         env_set("board_software_revision", ep->software_revision);
    board/ti/common/board_detect.c- else
    board/ti/common/board_detect.c-         env_set("board_software_revision", unknown);
    board/ti/common/board_detect.c-
    board/ti/common/board_detect.c- if (strlen(ep->serial) != 0)
    board/ti/common/board_detect.c-         env_set("board_serial", ep->serial);
    board/ti/common/board_detect.c- else
    board/ti/common/board_detect.c-         env_set("board_serial", unknown);
    board/ti/common/board_detect.c-}
    

    Usually if you do your own board I'd recommend you'd add it to U-Boot properly and not by modifying the TI boards that are already there, which however can be a good shortcut during initial development. However ultimately you'd want to add your board properly, and usually you would not need/want any of the board-detection / EEPROM based stuff in there. All this is optimized for development, not really for production.

    Regards, Andreas

  • Thank you for response.

    Ok, so I see that those board tags are stored in external eeprom, but this works if CONFIG_TI_I2C_BOARD_DETECT option is enabled. I grep for entire u-boot source tree (git://git.ti.com/ti-u-boot/ti-u-boot.git) and don't see CONFIG_TI_I2C_BOARD_DETECT set. Where this option is set?

  • Usually if you do your own board I'd recommend you'd add it to U-Boot properly

    What do you mean by properly? On our custom board we don't have eeprom. Is there any other solution to do this board detection properly?

  • Ok I manage this somehow but have a build error:

    My patches:

    board/ti/am64x/evm.c. This changes should result that am64x_puma.dts be first choice

    From 04004e699e99941881c0c37e0e4b853b16d28673 Mon Sep 17 00:00:00 2001
    From: jakub grad <jakub.grad@etteplan.com>
    Date: Wed, 9 Nov 2022 15:00:32 +0100
    Subject: [PATCH 1/1] detection custom device tree verbose
    
    ---
     board/ti/am64x/evm.c | 26 +++++++++++++++++++-------
     1 file changed, 19 insertions(+), 7 deletions(-)
    
    diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c
    index 765720e733..9075a925de 100644
    --- a/board/ti/am64x/evm.c
    +++ b/board/ti/am64x/evm.c
    @@ -23,7 +23,7 @@
    
     #define board_is_am64x_gpevm() board_ti_k3_is("AM64-GPEVM")
     #define board_is_am64x_skevm() board_ti_k3_is("AM64-SKEVM")
    -
    +#define board_is_am64_puma() 1
     #define AM64X_MAX_DAUGHTER_CARDS       8
    
     /* Daughter card presence detection signals */
    @@ -76,8 +76,11 @@ int board_fit_config_name_match(const char *name)
            ret = dm_gpio_get_value(&board_det_gpios[AM64X_EVM_HSE_BRD_DET]);
            if (!ret)
                    is_nand = true;
    -
    -       if (!eeprom_read || board_is_am64x_gpevm()) {
    +       if(board_is_am64_puma()) {
    +              printf("<board_fit_config_name_match> detected am64_puma board!\n");
    +               return 0;
    +        }
    +       else if (!eeprom_read || board_is_am64x_gpevm()) {
                    if (is_nand) {
                            if (!strcmp(name, "k3-am642-r5-evm") || !strcmp(name, "k3-am642-evm-nand"))
                                    return 0;
    @@ -209,10 +212,15 @@ static void setup_board_eeprom_env(void)
     {
            char *name = "am64x_gpevm";
    
    -       if (do_board_detect())
    +       if (do_board_detect()) {
    +               printf("<setup_board_eeprom_env> invalid_eeprom error!\n");
                    goto invalid_eeprom;
    -
    -       if (board_is_am64x_gpevm())
    +       }
    +       if(board_is_am64_puma()) {
    +                name = "am64x_puma";
    +               printf("<setup_board_eeprom_env> setting board_name: %s\n",name);
    +       }
    +       else if (board_is_am64x_gpevm())
                    name = "am64x_gpevm";
            else if (board_is_am64x_skevm())
                    name = "am64x_skevm";
    @@ -445,7 +453,11 @@ void spl_board_init(void)
            /* Init DRAM size for R5/A53 SPL */
            dram_init_banksize();
    
    -       if (board_is_am64x_gpevm())
    +       printf("<spl_board_init>");
    +
    +       if (board_is_am64x_gpevm()) {
    +               printf("<spl_board_init> probing daughter cards\n");
                    probe_daughtercards();
    +       }
     }
     #endif
    --
    2.25.1

    From b326071f71d6bd6a211633985be27d5f4cad4f63 Mon Sep 17 00:00:00 2001
    From: jakub grad <jakub.grad@etteplan.com>
    Date: Wed, 9 Nov 2022 11:08:32 +0100
    Subject: [PATCH 1/1] isolate cpu and custom device tree
    
    ---
     include/configs/am64x_evm.h | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
    index 33ba5da31f..fe297939d2 100644
    --- a/include/configs/am64x_evm.h
    +++ b/include/configs/am64x_evm.h
    @@ -106,6 +106,8 @@
     /* U-Boot general configuration */
     #define EXTRA_ENV_AM642_BOARD_SETTINGS                                 \
            "findfdt="                                                      \
    +               "if test $board_name = am64x_puma; then " \
    +                       "setenv fdtfile am64x_puma.dtb; fi; " \
                    "if test $board_name = am64x_gpevm; then " \
                            "setenv fdtfile k3-am642-evm.dtb; fi; " \
                    "if test $board_name = am64x_skevm; then " \
    @@ -114,6 +116,7 @@
                            "echo WARNING: Could not determine device tree to use; fi; \0" \
            "name_kern=Image\0"                                             \
            "console=ttyS2,115200n8\0"                                      \
    +       "optargs=isolcpus=1\0"                                          \
            "args_all=setenv optargs ${optargs} "                           \
                    "earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}\0"     \
            "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
    --
    2.25.1
    

    added makefile rule:

    From 2bc3c164392d8eb42d5ac55f673a7179de7e3e72 Mon Sep 17 00:00:00 2001
    From: jakub grad <jakub.grad@etteplan.com>
    Date: Wed, 9 Nov 2022 15:38:44 +0100
    Subject: [PATCH 1/1] makefile rule for custom device tree
    
    ---
     arch/arm/dts/Makefile | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
    index 0bfb31e8dd..70cc0b7635 100644
    --- a/arch/arm/dts/Makefile
    +++ b/arch/arm/dts/Makefile
    @@ -988,6 +988,7 @@ dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
                                  k3-am642-r5-evm.dtb \
                                  k3-am642-sk.dtb \
                                  k3-am642-r5-sk.dtb \
    +                             am64x_puma.dtb \
                                  k3-am642-evm-nand.dtbo
    
     dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \
    --
    2.25.1
    

    and my custom device tree which is for now copied k3-am642-sk.dts for uboot source with changed properties of:  compatible and
    model. In case of kernel I also copied k3-am642-sk.dts from kernel source tree, renamed file and changed the same properties.

    // SPDX-License-Identifier: GPL-2.0
    /*
     * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
     */
    
    /dts-v1/;
    
    #include <dt-bindings/mux/ti-serdes.h>
    #include <dt-bindings/phy/phy.h>
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/net/ti-dp83867.h>
    #include "k3-am642.dtsi"
    
    / {
            compatible =  "etteplan,puma";
            model = "Etteplan Puma device";
    
            chosen {
                    stdout-path = "serial2:115200n8";
                    bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
            };
    
            memory@80000000 {
                    device_type = "memory";
                    /* 2G RAM */
                    reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
    
            };
    
            reserved-memory {
                    #address-cells = <2>;
                    #size-cells = <2>;
                    ranges;
    
                    secure_ddr: optee@9e800000 {
                            reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
                            alignment = <0x1000>;
                            no-map;
                    };
            };
    };
    
    &main_pmx0 {
            main_mmc1_pins_default: main-mmc1-pins-default {
                    pinctrl-single,pins = <
                            AM64X_IOPAD(0x0294, PIN_INPUT, 0) /* (J19) MMC1_CMD */
                            AM64X_IOPAD(0x0290, PIN_INPUT, 0) /* (#N/A) MMC1_CLKLB */
                            AM64X_IOPAD(0x028c, PIN_INPUT, 0) /* (L20) MMC1_CLK */
                            AM64X_IOPAD(0x0288, PIN_INPUT, 0) /* (K21) MMC1_DAT0 */
                            AM64X_IOPAD(0x0284, PIN_INPUT, 0) /* (L21) MMC1_DAT1 */
                            AM64X_IOPAD(0x0280, PIN_INPUT, 0) /* (K19) MMC1_DAT2 */
                            AM64X_IOPAD(0x027c, PIN_INPUT, 0) /* (K18) MMC1_DAT3 */
                            AM64X_IOPAD(0x0298, PIN_INPUT, 0) /* (D19) MMC1_SDCD */
                    >;
            };
    
            main_usb0_pins_default: main-usb0-pins-default {
                    pinctrl-single,pins = <
                            AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */
                    >;
            };
    
            main_i2c1_pins_default: main-i2c1-pins-default {
                    pinctrl-single,pins = <
                            AM64X_IOPAD(0x0268, PIN_INPUT_PULLUP, 0) /* (C18) I2C1_SCL */
                            AM64X_IOPAD(0x026c, PIN_INPUT_PULLUP, 0) /* (B19) I2C1_SDA */
                    >;
            };
    
            mdio1_pins_default: mdio1-pins-default {
                    pinctrl-single,pins = <
                            AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4) /* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
                            AM64X_IOPAD(0x01f8, PIN_INPUT, 4) /* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
                    >;
            };
    
            rgmii1_pins_default: rgmii1-pins-default {
                    pinctrl-single,pins = <
                            AM64X_IOPAD(0x011c, PIN_INPUT, 4) /* (AA13) PRG1_PRU1_GPO5.RGMII1_RD0 */
                            AM64X_IOPAD(0x0128, PIN_INPUT, 4) /* (U12) PRG1_PRU1_GPO8.RGMII1_RD1 */
                            AM64X_IOPAD(0x0150, PIN_INPUT, 4) /* (Y13) PRG1_PRU1_GPO18.RGMII1_RD2 */
                            AM64X_IOPAD(0x0154, PIN_INPUT, 4) /* (V12) PRG1_PRU1_GPO19.RGMII1_RD3 */
                            AM64X_IOPAD(0x00d8, PIN_INPUT, 4) /* (W13) PRG1_PRU0_GPO8.RGMII1_RXC */
                            AM64X_IOPAD(0x00cc, PIN_INPUT, 4) /* (V13) PRG1_PRU0_GPO5.RGMII1_RX_CTL */
                            AM64X_IOPAD(0x0124, PIN_OUTPUT, 4) /* (V15) PRG1_PRU1_GPO7.RGMII1_TD0 */
                            AM64X_IOPAD(0x012c, PIN_OUTPUT, 4) /* (V14) PRG1_PRU1_GPO9.RGMII1_TD1 */
                            AM64X_IOPAD(0x0130, PIN_OUTPUT, 4) /* (W14) PRG1_PRU1_GPO10.RGMII1_TD2 */
                            AM64X_IOPAD(0x014c, PIN_OUTPUT, 4) /* (AA14) PRG1_PRU1_GPO17.RGMII1_TD3 */
                            AM64X_IOPAD(0x00e0, PIN_OUTPUT, 4) /* (U14) PRG1_PRU0_GPO10.RGMII1_TXC */
                            AM64X_IOPAD(0x00dc, PIN_OUTPUT, 4) /* (U15) PRG1_PRU0_GPO9.RGMII1_TX_CTL */
                    >;
            };
    
           rgmii2_pins_default: rgmii2-pins-default {
                    pinctrl-single,pins = <
                            AM64X_IOPAD(0x0108, PIN_INPUT, 4) /* (W11) PRG1_PRU1_GPO0.RGMII2_RD0 */
                            AM64X_IOPAD(0x010c, PIN_INPUT, 4) /* (V11) PRG1_PRU1_GPO1.RGMII2_RD1 */
                            AM64X_IOPAD(0x0110, PIN_INPUT, 4) /* (AA12) PRG1_PRU1_GPO2.RGMII2_RD2 */
                            AM64X_IOPAD(0x0114, PIN_INPUT, 4) /* (Y12) PRG1_PRU1_GPO3.RGMII2_RD3 */
                            AM64X_IOPAD(0x0120, PIN_INPUT, 4) /* (U11) PRG1_PRU1_GPO6.RGMII2_RXC */
                            AM64X_IOPAD(0x0118, PIN_INPUT, 4) /* (W12) PRG1_PRU1_GPO4.RGMII2_RX_CTL */
                            AM64X_IOPAD(0x0134, PIN_OUTPUT, 4) /* (AA10) PRG1_PRU1_GPO11.RGMII2_TD0 */
                            AM64X_IOPAD(0x0138, PIN_OUTPUT, 4) /* (V10) PRG1_PRU1_GPO12.RGMII2_TD1 */
                            AM64X_IOPAD(0x013c, PIN_OUTPUT, 4) /* (U10) PRG1_PRU1_GPO13.RGMII2_TD2 */
                            AM64X_IOPAD(0x0140, PIN_OUTPUT, 4) /* (AA11) PRG1_PRU1_GPO14.RGMII2_TD3 */
                            AM64X_IOPAD(0x0148, PIN_OUTPUT, 4) /* (Y10) PRG1_PRU1_GPO16.RGMII2_TXC */
                            AM64X_IOPAD(0x0144, PIN_OUTPUT, 4) /* (Y11) PRG1_PRU1_GPO15.RGMII2_TX_CTL */
                    >;
            };
    
            ospi0_pins_default: ospi0-pins-default {
                    pinctrl-single,pins = <
                            AM64X_IOPAD(0x0000, PIN_OUTPUT, 0) /* (N20) OSPI0_CLK */
                            AM64X_IOPAD(0x002c, PIN_OUTPUT, 0) /* (L19) OSPI0_CSn0 */
                            AM64X_IOPAD(0x000c, PIN_INPUT, 0) /* (M19) OSPI0_D0 */
                            AM64X_IOPAD(0x0010, PIN_INPUT, 0) /* (M18) OSPI0_D1 */
                            AM64X_IOPAD(0x0014, PIN_INPUT, 0) /* (M20) OSPI0_D2 */
                            AM64X_IOPAD(0x0018, PIN_INPUT, 0) /* (M21) OSPI0_D3 */
                            AM64X_IOPAD(0x001c, PIN_INPUT, 0) /* (P21) OSPI0_D4 */
                            AM64X_IOPAD(0x0020, PIN_INPUT, 0) /* (P20) OSPI0_D5 */
                            AM64X_IOPAD(0x0024, PIN_INPUT, 0) /* (N18) OSPI0_D6 */
                            AM64X_IOPAD(0x0028, PIN_INPUT, 0) /* (M17) OSPI0_D7 */
                            AM64X_IOPAD(0x0008, PIN_INPUT, 0) /* (N19) OSPI0_DQS */
                    >;
            };
    };
    
    &main_uart1 {
            /* main_uart1 is reserved for firmware usage */
            status = "reserved";
    };
    
    &main_uart2 {
            status = "disabled";
    };
    
    &main_uart3 {
            status = "disabled";
    };
    
    &main_uart4 {
            status = "disabled";
    };
    
    &main_uart5 {
            status = "disabled";
    };
    
    &main_uart6 {
            status = "disabled";
    };
    
    &sdhci1 {
            /* SD/MMC */
            pinctrl-names = "default";
            bus-width = <4>;
            pinctrl-0 = <&main_mmc1_pins_default>;
            ti,driver-strength-ohm = <50>;
            disable-wp;
    };
    
    &cpsw3g {
            pinctrl-names = "default";
            pinctrl-0 = <&mdio1_pins_default
                         &rgmii1_pins_default
                         &rgmii2_pins_default>;
    };
    
    &cpsw_port1 {
            phy-mode = "rgmii-rxid";
            phy-handle = <&cpsw3g_phy0>;
    };
    
    &cpsw_port2 {
            phy-mode = "rgmii-rxid";
            phy-handle = <&cpsw3g_phy1>;
    };
    
    &cpsw3g_mdio {
            cpsw3g_phy0: ethernet-phy@0 {
                    reg = <0>;
                    ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
                    ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            };
    
            cpsw3g_phy1: ethernet-phy@1 {
                    reg = <1>;
                    ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
                    ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            };
    };
    
    &serdes_ln_ctrl {
            idle-states = <AM64_SERDES0_LANE0_USB>;
    };
    
    &serdes_wiz0 {
            status = "okay";
    };
    
    &serdes0 {
            serdes0_usb_link: link@0 {
                    reg = <0>;
                    cdns,num-lanes = <1>;
                    #phy-cells = <0>;
                    cdns,phy-type = <PHY_TYPE_USB3>;
                    resets = <&serdes_wiz0 1>;
            };
    };
    
    &usbss0 {
            ti,vbus-divider;
    };
    
    &usb0 {
            dr_mode = "host";
            maximum-speed = "super-speed";
            pinctrl-names = "default";
            pinctrl-0 = <&main_usb0_pins_default>;
            phys = <&serdes0_usb_link>;
            phy-names = "cdns3,usb3-phy";
    };
    
    &ospi0 {
            pinctrl-names = "default";
            pinctrl-0 = <&ospi0_pins_default>;
    
            flash@0{
                    compatible = "jedec,spi-nor";
                    reg = <0x0>;
                    spi-tx-bus-width = <8>;
                    spi-rx-bus-width = <8>;
                    spi-max-frequency = <25000000>;
                    cdns,tshsl-ns = <60>;
                    cdns,tsd2d-ns = <60>;
                    cdns,tchsh-ns = <60>;
                    cdns,tslch-ns = <60>;
                    cdns,read-delay = <4>;
                    cdns,phy-mode;
                    #address-cells = <1>;
                    #size-cells = <1>;
    
                    partition@3fc0000 {
                            label = "ospi.phypattern";
                            reg = <0x3fc0000 0x40000>;
                    };
            };
    };

    defconfig patch:

    From fecd3d8256e75ac34a50e44e7f05daca9dba61de Mon Sep 17 00:00:00 2001
    From: jakub grad <jakub.grad@etteplan.com>
    Date: Thu, 10 Nov 2022 10:50:59 +0100
    Subject: [PATCH 1/1] customize defconfig for am64x_evm
    
    ---
     configs/am64x_evm_a53_defconfig | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig
    index fd31469620..a9842e801e 100644
    --- a/configs/am64x_evm_a53_defconfig
    +++ b/configs/am64x_evm_a53_defconfig
    @@ -22,7 +22,7 @@ CONFIG_SPL_FS_FAT=y
     CONFIG_SPL_LIBDISK_SUPPORT=y
     CONFIG_SPL_SPI_FLASH_SUPPORT=y
     CONFIG_SPL_SPI_SUPPORT=y
    -CONFIG_DEFAULT_DEVICE_TREE="k3-am642-evm"
    +CONFIG_DEFAULT_DEVICE_TREE="am64x_puma"
     CONFIG_DISTRO_DEFAULTS=y
     # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
     CONFIG_SPL_LOAD_FIT=y
    @@ -77,7 +77,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=fc40000.spi.0:1m(ospi.tiboot3),2m(ospi.tispl),
     CONFIG_CMD_UBI=y
     CONFIG_OF_CONTROL=y
     CONFIG_SPL_OF_CONTROL=y
    -CONFIG_OF_LIST="k3-am642-evm k3-am642-sk"
    +CONFIG_OF_LIST="k3-am642-evm k3-am642-sk am64x_puma"
     CONFIG_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y

    u-boot recepie bbappend file:

    FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
    
    SRC_URI:append = " file://uEnv.txt"
    SRC_URI:append = " file://0001-isolate-cpu-and-custom-device-tree.patch"
    SRC_URI:append = " file://0001-detection-custom-device-tree-verbose.patch"
    SRC_URI:append = " file://0001-makefile-rule-for-custom-device-tree.patch"
    SRC_URI:append = " file://am64x_puma.dts;subdir=git/arch/arm/dts/"
    SRC_URI:append = " file://0001-bypassing-eeprom-read-for-board_ID-detection.patch"
    SRC_URI:append = " file://0001-customize-defconfig-for-am64x_evm.patch"
    
    UBOOT_ENV = "uEnv"

    as a result of running build image I have following error:

    What is this "binman" node? I did not change nothing in u-boot.dtb. There is actually no node like binman in the k3-am642-sk-u-boot.dtsi tree... But why is it bothering now? And with the k3-am642-sk.dts tree it works ...

     binman: Device tree 'u-boot.dtb' does not have a 'binman' node
    | make[1]: Leaving directory '/home/grad/YOCTO_workspace/texas-rt/build/tmp/work/am64xx_evm-poky-linux/u-boot-ti-staging/1_2021.01+gitAUTOINC+a3f87b40a1-r32/build'
    | make[1]: *** [/home/grad/YOCTO_workspace/texas-rt/build/tmp/work/am64xx_evm-poky-linux/u-boot-ti-staging/1_2021.01+gitAUTOINC+a3f87b40a1-r32/git/Makefile:1024: all] Error 1
    | make: Leaving directory '/home/grad/YOCTO_workspace/texas-rt/build/tmp/work/am64xx_evm-poky-linux/u-boot-ti-staging/1_2021.01+gitAUTOINC+a3f87b40a1-r32/git'
    | make: *** [Makefile:167: sub-make] Error 2
    | ERROR: oe_runmake failed
    | WARNING: exit code 1 from a shell command.
    ERROR: Task (/home/grad/YOCTO_workspace/meta-ti/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging_2021.01.bb:do_compile) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 4843 tasks of which 4823 didn't need to be rerun and 1 failed.
    
    Summary: 1 task failed:
      /home/grad/YOCTO_workspace/meta-ti/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging_2021.01.bb:do_compile
    Summary: There were 2 WARNING messages.
    Summary: There were 2 ERROR messages, returning a non-zero exit code.

    When I remove defconfig patch the image build successfully but hangs on boot:

    U-Boot SPL 2021.01-ga3f87b40a1 (Jul 29 2022 - 17:18:13 +0000)
    <board_fit_config_name_match> detected am64_puma board!
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.4.1--v08.04.01 (Jolly Jellyfi')
    SPL initial stack usage: 13408 bytes
    

    where <board_fit_config_name_match> detected am64_puma board! is my log.

    Any suggestions what is wrong with my patches and configuration?

  • Hello Jakub,

    Ok, so I see that those board tags are stored in external eeprom, but this works if CONFIG_TI_I2C_BOARD_DETECT option is enabled. I grep for entire u-boot source tree (git://git.ti.com/ti-u-boot/ti-u-boot.git) and don't see CONFIG_TI_I2C_BOARD_DETECT set. Where this option is set?

    For bypasing eeprom read via I2C in u-boot on AM64x EVM, here is an e2e post for your reference.
    e2e.ti.com/.../4384624
    FYI: Andreas is currently out of office, response on your inquiry on Yocto change might be delayed...
    Best,
    -Hong