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.

PROCESSOR-SDK-AM62X: eMMC failed to boot after DFU util flashing

Part Number: PROCESSOR-SDK-AM62X


Hi Judith,

we are able to successfully download U-boot images  and tisdk-base.ext4

and we send the following commands to boot from eMMC

=> setenv mmcdev 0
=> setenv bootpart 0

power off the device, changed boot mode switches to eMMC boot. we get following error.

U-Boot SPL 2021.01-00002-g93da3fa57b (Jul 03 2023 - 10:27:32 +0530)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
SPL initial stack usage: 13424 bytes
Trying to boot from MMC1
spl: could not initialize mmc. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###.

attaching log file from target.

U-Boot SPL 2021.01-00002-g93da3fa57b (Jul 03 2023 - 10:27:32 +0530)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
SPL initial stack usage: 13424 bytes
Trying to boot from DFU
###############################################DOWNLOAD ... OK
Ctrl+C to exit ...
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Loading Environment from MMC... MMC Device 0 not found
*** Warning - No MMC card found, using default environment

init_env from device 10 not supported!
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
NOTICE:  BL31: Built : 05:06:58, Feb 24 2023

U-Boot SPL 2021.01-00002-g93da3fa57b (Jul 03 2023 - 10:27:08 +0530)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
Trying to boot from DFU
####DOWNLOAD ... OK
Ctrl+C to exit ...


U-Boot 2021.01-00002-g93da3fa57b (Jul 03 2023 - 10:27:08 +0530)

SoC:   AM62X SR1.0 GP
Model: Texas Instruments AM625 SK
EEPROM not available at 0x50, trying to read at 0x51
Board: AM62-SKEVM rev E3
DRAM:  2 GiB
MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
Loading Environment from MMC... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0
=>
=>
=> env default -f -a
## Resetting to default environment
=> pri dfu_alt_info_emmc
dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1;rootfs part 0 1 mmcpart 0;tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;tispl.bin.raw raw 0x400 0x1000 mmcpart 1;u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;u-env.raw raw 0x3400 0x100 mmcpart 1;sysfw.itb.raw raw 0x3600 0x800 mmcpart 1
=> editenv dfu_alt_info_emmc
edit: rawemmc raw 0 0x800000 mmcpart 1;rootfs part 0 1 mmcpart 0;tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;tispl.bin.raw raw 0x400 0x1000 mmcpart 1;u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;u-env.raw raw 0x3400 0x100 mmcpart 1;sysfw.itb.raw raw 0x3600 0x800 mmcpart 1
=> pri dfu_alt_info_emmc
dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1;rootfs part 0 1 mmcpart 0;tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;tispl.bin.raw raw 0x400 0x1000 mmcpart 1;u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;u-env.raw raw 0x3400 0x100 mmcpart 1;sysfw.itb.raw raw 0x3600 0x800 mmcpart 1
=> setenv dfu_alt_info ${dfu_alt_info_emmc}
=> pri dfu_alt_info
dfu_alt_info=rawemmc raw 0 0x800000 mmcpart 1;rootfs part 0 1 mmcpart 0;tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;tispl.bin.raw raw 0x400 0x1000 mmcpart 1;u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;u-env.raw raw 0x3400 0x100 mmcpart 1;sysfw.itb.raw raw 0x3600 0x800 mmcpart 1
=> dfu 0 mmc 0
##DOWNLOAD ... OK
Ctrl+C to exit ...
####DOWNLOAD ... OK
Ctrl+C to exit ...
####DOWNLOAD ... OK
Ctrl+C to exit ...
################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################DOWNLOAD ... OK
Ctrl+C to exit ...
=> setenv mmcdev 0
=> setenv bootpart 0
=> ð
U-Boot SPL 2021.01-00002-g93da3fa57b (Jul 03 2023 - 10:27:32 +0530)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
SPL initial stack usage: 13424 bytes
Trying to boot from MMC1
spl: could not initialize mmc. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

please help us in fixing the issue.

Thanks and Regards,
Swapna.

  • Hi,

    My understanding is this is TI EVM.

    Question: what binaries did you flash to eMMC? Was it using tiboot3.bin tispl.bin, and u-boot.img from TI SDK or custom?

    Do not flash the same binaries used to boot with USB-DFU.

    Also, what are your boot mode pin setting for eMMC boot, is it SW2:00000000 SW1:11010010?

    ~ Judith

  • Hi Judith,

    Yes it is TI EVM AM62x.

    from TI SDK, we have build U-boot using defconfig am62x_evm_r5_usbdfu_config.

    build commands used are

    make u-boot
    export TI_SECURE_DEV_PKG=/home/administrator/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/core-secdev-k3
    make sysfw-image DEVICE_TYPE=gp

    then the generated files tiboot3.bin , tispl.bin, and u-boot.img are used for USB-DFU update.

    Boot mode switch configuration is as follows

    SW2:00000000 SW1:11010011

    as per your comments I tried to change B7 to 0. but still there is same error

    Thanks and Regards,

    Swapna.

  • Hi Swapna,


    spl: could not initialize mmc. error: -19

    Due to this error, I believe there is an issue with mmc device, let me discuss internally and get back to you.

    ~ Judith

  • Hi,

    Could we try the following experiment. Could you try to reduce eMMC speed? Here is the patch to reduce eMMC speed:

    diff --git a/arch/arm/dts/k3-am62-main.dtsi b/arch/arm/dts/k3-am62-main.dtsi
    index 4d31dba4b2..831429e97e 100644
    --- a/arch/arm/dts/k3-am62-main.dtsi
    +++ b/arch/arm/dts/k3-am62-main.dtsi
    @@ -348,11 +348,10 @@
                    bus-width = <8>;
                    ti,clkbuf-sel = <0x7>;
                    ti,otap-del-sel-legacy = <0x0>;
    -               ti,otap-del-sel-mmc-hs = <0x0>;
    -               ti,otap-del-sel-ddr52 = <0x5>;
    -               ti,otap-del-sel-hs200 = <0x5>;
                    ti,itap-del-sel-legacy = <0xa>;
                    ti,itap-del-sel-mmc-hs = <0x1>;
    +               /delete-property/mmc-ddr-1_8v;
    +               /delete-property/mmc-hs200-1_8v;
            };
     
            sdhci1: mmc@fa00000 {


    After reducing eMMC speed, flash these binaries to eMMC and boot with eMMC boot again.

    ~ Judith

  • Hi Judith,

    I applied the patch file and please find updated file below

        sdhci0: mmc@fa10000 {
            compatible = "ti,am62-sdhci";
            reg = <0x00 0xfa10000 0x00 0x260>, <0x00 0xfa18000 0x00 0x134>;
            interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
            power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
            clocks = <&k3_clks 57 5>, <&k3_clks 57 6>;
            clock-names = "clk_ahb", "clk_xin";
            assigned-clocks = <&k3_clks 57 6>;
            assigned-clock-parents = <&k3_clks 57 8>;
            mmc-ddr-1_8v;
            mmc-hs200-1_8v;
            ti,trm-icp = <0x2>;
            bus-width = <8>;
            ti,clkbuf-sel = <0x7>;
            ti,otap-del-sel-legacy = <0x0>;
            #ti,otap-del-sel-mmc-hs = <0x0>;
            #ti,otap-del-sel-ddr52 = <0x5>;
            #ti,otap-del-sel-hs200 = <0x5>;
            ti,itap-del-sel-legacy = <0xa>;
            ti,itap-del-sel-mmc-hs = <0x1>;
            /delete-property/mmc-ddr-1_8v;
            /delete-property/mmc-hs200-1_8v;        
        };

    // SPDX-License-Identifier: GPL-2.0
    /*
     * Device Tree Source for AM625 SoC Family Main Domain peripherals
     *
     * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
     */
    
    &cbass_main {
    	oc_sram: sram@70000000 {
    		compatible = "mmio-sram";
    		reg = <0x00 0x70000000 0x00 0x10000>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x0 0x00 0x70000000 0x10000>;
    	};
    
    	gic500: interrupt-controller@1800000 {
    		compatible = "arm,gic-v3";
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    		#interrupt-cells = <3>;
    		interrupt-controller;
    		reg = <0x00 0x01800000 0x00 0x10000>,	/* GICD */
    		      <0x00 0x01880000 0x00 0xc0000>,	/* GICR */
    		      <0x00 0x01880000 0x00 0xc0000>,   /* GICR */
    		      <0x01 0x00000000 0x00 0x2000>,    /* GICC */
    		      <0x01 0x00010000 0x00 0x1000>,    /* GICH */
    		      <0x01 0x00020000 0x00 0x2000>;    /* GICV */
    		/*
    		 * vcpumntirq:
    		 * virtual CPU interface maintenance interrupt
    		 */
    		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
    
    		gic_its: msi-controller@1820000 {
    			compatible = "arm,gic-v3-its";
    			reg = <0x00 0x01820000 0x00 0x10000>;
    			socionext,synquacer-pre-its = <0x1000000 0x400000>;
    			msi-controller;
    			#msi-cells = <1>;
    		};
    	};
    
    	main_conf: syscon@100000 {
    		compatible = "syscon", "simple-mfd";
    		reg = <0x00 0x00100000 0x00 0x20000>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x0 0x00 0x00100000 0x20000>;
    
    		phy_gmii_sel: phy@4044 {
    			compatible = "ti,am654-phy-gmii-sel";
    			reg = <0x4044 0x8>;
    			#phy-cells = <1>;
    		};
    	};
    
    	dmss: bus@48000000 {
    		compatible = "simple-mfd";
    		#address-cells = <2>;
    		#size-cells = <2>;
    		dma-ranges;
    		ranges = <0x00 0x48000000 0x00 0x48000000 0x00 0x06400000>;
    
    		ti,sci-dev-id = <25>;
    
    		secure_proxy_main: mailbox@4d000000 {
    			compatible = "ti,am654-secure-proxy";
    			#mbox-cells = <1>;
    			reg-names = "target_data", "rt", "scfg";
    			reg = <0x00 0x4d000000 0x00 0x80000>,
    			      <0x00 0x4a600000 0x00 0x80000>,
    			      <0x00 0x4a400000 0x00 0x80000>;
    			interrupt-names = "rx_012";
    			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
    		};
    
    		inta_main_dmss: interrupt-controller@48000000 {
    			compatible = "ti,sci-inta";
    			reg = <0x00 0x48000000 0x00 0x100000>;
    			#interrupt-cells = <0>;
    			interrupt-controller;
    			interrupt-parent = <&gic500>;
    			msi-controller;
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <28>;
    			ti,interrupt-ranges = <4 68 36>;
    			ti,unmapped-event-sources = <&main_bcdma>, <&main_pktdma>;
    		};
    
    		main_bcdma: dma-controller@485c0100 {
    			compatible = "ti,am64-dmss-bcdma";
    			reg = <0x00 0x485c0100 0x00 0x100>,
    			      <0x00 0x4c000000 0x00 0x20000>,
    			      <0x00 0x4a820000 0x00 0x20000>,
    			      <0x00 0x4aa40000 0x00 0x20000>,
    			      <0x00 0x4bc00000 0x00 0x100000>,
    			      <0x00 0x48600000 0x00 0x8000>,
    			      <0x00 0x484a4000 0x00 0x2000>,
    			      <0x00 0x484c2000 0x00 0x2000>;
    			reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt" , "cfg", "tchan", "rchan";
    			msi-parent = <&inta_main_dmss>;
    			#dma-cells = <3>;
    
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <26>;
    			ti,sci-rm-range-bchan = <0x20>; /* BLOCK_COPY_CHAN */
    			ti,sci-rm-range-rchan = <0x21>; /* SPLIT_TR_RX_CHAN */
    			ti,sci-rm-range-tchan = <0x22>; /* SPLIT_TR_TX_CHAN */
    		};
    
    		main_pktdma: dma-controller@485c0000 {
    			compatible = "ti,am64-dmss-pktdma";
    			reg = <0x00 0x485c0000 0x00 0x100>,
    			      <0x00 0x4a800000 0x00 0x20000>,
    			      <0x00 0x4aa00000 0x00 0x20000>,
    			      <0x00 0x4b800000 0x00 0x200000>,
    			      <0x00 0x485e0000 0x00 0x10000>,
    			      <0x00 0x484a0000 0x00 0x2000>,
    			      <0x00 0x484c0000 0x00 0x2000>,
    			      <0x00 0x48430000 0x00 0x1000>;
    			reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt", "cfg", "tchan", "rchan", "rflow";
    			msi-parent = <&inta_main_dmss>;
    			#dma-cells = <2>;
    
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <30>;
    			ti,sci-rm-range-tchan = <0x23>, /* UNMAPPED_TX_CHAN */
    						<0x24>, /* CPSW_TX_CHAN */
    						<0x25>, /* SAUL_TX_0_CHAN */
    						<0x26>; /* SAUL_TX_1_CHAN */
    			ti,sci-rm-range-tflow = <0x10>, /* RING_UNMAPPED_TX_CHAN */
    						<0x11>, /* RING_CPSW_TX_CHAN */
    						<0x12>, /* RING_SAUL_TX_0_CHAN */
    						<0x13>; /* RING_SAUL_TX_1_CHAN */
    			ti,sci-rm-range-rchan = <0x29>, /* UNMAPPED_RX_CHAN */
    						<0x2b>, /* CPSW_RX_CHAN */
    						<0x2d>, /* SAUL_RX_0_CHAN */
    						<0x2f>, /* SAUL_RX_1_CHAN */
    						<0x31>, /* SAUL_RX_2_CHAN */
    						<0x33>; /* SAUL_RX_3_CHAN */
    			ti,sci-rm-range-rflow = <0x2a>, /* FLOW_UNMAPPED_RX_CHAN */
    						<0x2c>, /* FLOW_CPSW_RX_CHAN */
    						<0x2e>, /* FLOW_SAUL_RX_0/1_CHAN */
    						<0x32>; /* FLOW_SAUL_RX_2/3_CHAN */
    		};
    	};
    
    	dmsc: system-controller@44043000 {
    		compatible = "ti,k2g-sci";
    		ti,host-id = <12>;
    		mbox-names = "rx", "tx";
    		mboxes= <&secure_proxy_main 12>,
    			<&secure_proxy_main 13>;
    		reg-names = "debug_messages";
    		reg = <0x00 0x44043000 0x00 0xfe0>;
    
    		k3_pds: power-controller {
    			compatible = "ti,sci-pm-domain";
    			#power-domain-cells = <2>;
    		};
    
    		k3_clks: clock-controller {
    			compatible = "ti,k2g-sci-clk";
    			#clock-cells = <2>;
    		};
    
    		k3_reset: reset-controller {
    			compatible = "ti,sci-reset";
    			#reset-cells = <2>;
    		};
    	};
    
    	main_pmx0: pinctrl@f4000 {
    		compatible = "pinctrl-single";
    		reg = <0x00 0xf4000 0x00 0x2ac>;
    		#pinctrl-cells = <1>;
    		pinctrl-single,register-width = <32>;
    		pinctrl-single,function-mask = <0xffffffff>;
    	};
    
    	main_uart0: serial@2800000 {
    		compatible = "ti,am64-uart", "ti,am654-uart";
    		reg = <0x00 0x02800000 0x00 0x100>;
    		interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 146 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 146 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart1: serial@2810000 {
    		compatible = "ti,am64-uart", "ti,am654-uart";
    		reg = <0x00 0x02810000 0x00 0x100>;
    		interrupts = <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 152 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 152 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart2: serial@2820000 {
    		compatible = "ti,am64-uart", "ti,am654-uart";
    		reg = <0x00 0x02820000 0x00 0x100>;
    		interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 153 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 153 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart3: serial@2830000 {
    		compatible = "ti,am64-uart", "ti,am654-uart";
    		reg = <0x00 0x02830000 0x00 0x100>;
    		interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 154 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart4: serial@2840000 {
    		compatible = "ti,am64-uart", "ti,am654-uart";
    		reg = <0x00 0x02840000 0x00 0x100>;
    		interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 155 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 155 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart5: serial@2850000 {
    		compatible = "ti,am64-uart", "ti,am654-uart";
    		reg = <0x00 0x02850000 0x00 0x100>;
    		interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 156 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 156 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart6: serial@2860000 {
    		compatible = "ti,am64-uart", "ti,am654-uart";
    		reg = <0x00 0x02860000 0x00 0x100>;
    		interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 158 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 158 0>;
    		clock-names = "fclk";
    	};
    
    	main_i2c0: i2c@20000000 {
    		compatible = "ti,am64-i2c", "ti,omap4-i2c";
    		reg = <0x00 0x20000000 0x00 0x100>;
    		interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		power-domains = <&k3_pds 102 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 102 2>;
    		clock-names = "fck";
    	};
    
    	main_i2c1: i2c@20010000 {
    		compatible = "ti,am64-i2c", "ti,omap4-i2c";
    		reg = <0x00 0x20010000 0x00 0x100>;
    		interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		power-domains = <&k3_pds 103 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 103 2>;
    		clock-names = "fck";
    	};
    
    	main_i2c2: i2c@20020000 {
    		compatible = "ti,am64-i2c", "ti,omap4-i2c";
    		reg = <0x00 0x20020000 0x00 0x100>;
    		interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		power-domains = <&k3_pds 104 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 104 2>;
    		clock-names = "fck";
    	};
    
    	main_i2c3: i2c@20030000 {
    		compatible = "ti,am64-i2c", "ti,omap4-i2c";
    		reg = <0x00 0x20030000 0x00 0x100>;
    		interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 105 2>;
    		clock-names = "fck";
    	};
    
    	main_gpio_intr: interrupt-controller@a00000 {
    		compatible = "ti,sci-intr";
    		reg = <0x00 0x00a00000 0x00 0x800>;
    		ti,intr-trigger-type = <1>;
    		interrupt-controller;
    		interrupt-parent = <&gic500>;
    		#interrupt-cells = <1>;
    		ti,sci = <&dmsc>;
    		ti,sci-dev-id = <3>;
    		ti,interrupt-ranges = <0 32 16>;
    	};
    
    	main_gpio0: gpio@600000 {
    		compatible = "ti,am64-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00600000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <190>, <191>, <192>,
    			     <193>, <194>, <195>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <87>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 77 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 77 0>;
    		clock-names = "gpio";
    	};
    
    	main_gpio1: gpio@601000 {
    		compatible = "ti,am64-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00601000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <180>, <181>, <182>,
    			     <183>, <184>, <185>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <88>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 78 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 78 0>;
    		clock-names = "gpio";
    	};
    
    	sdhci0: mmc@fa10000 {
    		compatible = "ti,am62-sdhci";
    		reg = <0x00 0xfa10000 0x00 0x260>, <0x00 0xfa18000 0x00 0x134>;
    		interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 57 5>, <&k3_clks 57 6>;
    		clock-names = "clk_ahb", "clk_xin";
    		assigned-clocks = <&k3_clks 57 6>;
    		assigned-clock-parents = <&k3_clks 57 8>;
    		mmc-ddr-1_8v;
    		mmc-hs200-1_8v;
    		ti,trm-icp = <0x2>;
    		bus-width = <8>;
    		ti,clkbuf-sel = <0x7>;
    		ti,otap-del-sel-legacy = <0x0>;
    		#ti,otap-del-sel-mmc-hs = <0x0>;
    		#ti,otap-del-sel-ddr52 = <0x5>;
    		#ti,otap-del-sel-hs200 = <0x5>;
    		ti,itap-del-sel-legacy = <0xa>;
    		ti,itap-del-sel-mmc-hs = <0x1>;
    		/delete-property/mmc-ddr-1_8v;
    		/delete-property/mmc-hs200-1_8v;		
    	};
    
    	sdhci1: mmc@fa00000 {
    		compatible = "ti,am62-sdhci";
    		reg = <0x00 0xfa00000 0x00 0x260>, <0x00 0xfa08000 0x00 0x134>;
    		interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 58 5>, <&k3_clks 58 6>;
    		clock-names = "clk_ahb", "clk_xin";
    		ti,trm-icp = <0x2>;
    		ti,otap-del-sel-legacy = <0x8>;
    		ti,otap-del-sel-sd-hs = <0x0>;
    		ti,otap-del-sel-sdr12 = <0x0>;
    		ti,otap-del-sel-sdr25 = <0x0>;
    		ti,otap-del-sel-sdr50 = <0x8>;
    		ti,otap-del-sel-sdr104 = <0x7>;
    		ti,otap-del-sel-ddr50 = <0x4>;
    		ti,itap-del-sel-legacy = <0xa>;
    		ti,itap-del-sel-sd-hs = <0x1>;
    		ti,itap-del-sel-sdr12 = <0xA>;
    		ti,itap-del-sel-sdr25 = <0x1>;
    		ti,clkbuf-sel = <0x7>;
    		bus-width = <4>;
    	};
    
    	sdhci2: mmc@fa20000 {
    		compatible = "ti,am62-sdhci";
    		reg = <0x00 0xfa20000 0x00 0x260>, <0x00 0xfa28000 0x00 0x134>;
    		interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
    		clock-names = "clk_ahb", "clk_xin";
    		ti,trm-icp = <0x2>;
    		ti,otap-del-sel-legacy = <0x8>;
    		ti,otap-del-sel-sd-hs = <0x0>;
    		ti,otap-del-sel-sdr12 = <0x0>;
    		ti,otap-del-sel-sdr25 = <0x0>;
    		ti,otap-del-sel-sdr50 = <0x8>;
    		ti,otap-del-sel-sdr104 = <0x7>;
    		ti,otap-del-sel-ddr50 = <0x4>;
    		ti,itap-del-sel-legacy = <0xa>;
    		ti,itap-del-sel-sd-hs = <0x1>;
    		ti,itap-del-sel-sdr12 = <0xA>;
    		ti,itap-del-sel-sdr25 = <0x1>;
    		ti,clkbuf-sel = <0x7>;
    	};
    
    	usbss0: dwc3-usb@f900000 {
    		compatible = "ti,am62-usb";
    		reg = <0x00 0x0f900000 0x00 0x800>;
    		interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>; /* MISC IRQ */
    		clocks = <&k3_clks 161 3>;
    		clock-names = "ref";
    		ti,syscon-phy-pll-refclk = <&wkup_conf 0x4008>;
    		#address-cells = <2>;
    		#size-cells = <2>;
    		power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>;
    		ranges;
    
    		usb0: usb@31000000 {
    			compatible = "snps,dwc3";
    			reg =<0x00 0x31000000 0x00 0x50000>;
    			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
    				     <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
    			interrupt-names = "host", "peripheral";
    			maximum-speed = "high-speed";
    			dr_mode = "otg";
    		};
    	};
    
    	usbss1: dwc3-usb@f910000 {
    		compatible = "ti,am62-usb";
    		reg = <0x00 0x0f910000 0x00 0x800>;
    		interrupts = <GIC_SPI 234 IRQ_TYPE_LEVEL_HIGH>; /* MISC IRQ */
    		clocks = <&k3_clks 162 3>;
    		clock-names = "ref";
    		ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>;
    		#address-cells = <2>;
    		#size-cells = <2>;
    		power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>;
    		ranges;
    
    		usb1: usb@31100000 {
    			compatible = "snps,dwc3";
    			reg =<0x00 0x31100000 0x00 0x50000>;
    			interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
    				     <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
    			interrupt-names = "host", "peripheral";
    			maximum-speed = "high-speed";
    			dr_mode = "otg";
    		};
    	};
    
    	fss: bus@fc00000 {
    		compatible = "simple-bus";
    		reg = <0x00 0x0fc00000 0x00 0x70000>;
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		ospi0: spi@fc40000 {
    			compatible = "ti,am654-ospi", "cdns,qspi-nor";
    			reg = <0x00 0x0fc40000 0x00 0x100>,
    			      <0x05 0x00000000 0x01 0x00000000>;
    			interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
    			cdns,fifo-depth = <256>;
    			cdns,fifo-width = <4>;
    			cdns,trigger-address = <0x0>;
    			clocks = <&k3_clks 75 7>;
    			assigned-clocks = <&k3_clks 75 7>;
    			assigned-clock-parents = <&k3_clks 75 8>;
    			assigned-clock-rates = <166666666>;
    			power-domains = <&k3_pds 75 TI_SCI_PD_EXCLUSIVE>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    		};
    	};
    
    	cpsw3g: ethernet@8000000 {
    		compatible = "ti,am642-cpsw-nuss";
    		#address-cells = <2>;
    		#size-cells = <2>;
    		reg = <0x0 0x8000000 0x0 0x200000>;
    		reg-names = "cpsw_nuss";
    		ranges = <0x0 0x0 0x0 0x8000000 0x0 0x200000>;
    		clocks = <&k3_clks 13 0>;
    		assigned-clocks = <&k3_clks 13 3>;
    		assigned-clock-parents = <&k3_clks 13 11>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 13 TI_SCI_PD_EXCLUSIVE>;
    
    		dmas = <&main_pktdma 0xc600 15>,
    		       <&main_pktdma 0xc601 15>,
    		       <&main_pktdma 0xc602 15>,
    		       <&main_pktdma 0xc603 15>,
    		       <&main_pktdma 0xc604 15>,
    		       <&main_pktdma 0xc605 15>,
    		       <&main_pktdma 0xc606 15>,
    		       <&main_pktdma 0xc607 15>,
    		       <&main_pktdma 0x4600 15>;
    		dma-names = "tx0", "tx1", "tx2", "tx3", "tx4", "tx5", "tx6",
    			    "tx7", "rx";
    
    		ethernet-ports {
    			#address-cells = <1>;
    			#size-cells = <0>;
    
    			cpsw_port1: port@1 {
    				reg = <1>;
    				ti,mac-only;
    				label = "port1";
    				phys = <&phy_gmii_sel 1>;
    				mac-address = [00 00 00 00 00 00];
    				ti,syscon-efuse = <&wkup_conf 0x200>;
    			};
    
    			cpsw_port2: port@2 {
    				reg = <2>;
    				ti,mac-only;
    				label = "port2";
    				phys = <&phy_gmii_sel 2>;
    				mac-address = [00 00 00 00 00 00];
    			};
    		};
    
    		cpsw3g_mdio: mdio@f00 {
    			compatible = "ti,cpsw-mdio","ti,davinci_mdio";
    			reg = <0x0 0xf00 0x0 0x100>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			clocks = <&k3_clks 13 0>;
    			clock-names = "fck";
    			bus_freq = <1000000>;
    		};
    
    		cpts@3d000 {
    			compatible = "ti,j721e-cpts";
    			reg = <0x0 0x3d000 0x0 0x400>;
    			clocks = <&k3_clks 13 1>;
    			clock-names = "cpts";
    			interrupts-extended = <&gic500 GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
    			interrupt-names = "cpts";
    			ti,cpts-ext-ts-inputs = <4>;
    			ti,cpts-periodic-outputs = <2>;
    		};
    	};
    
    	gpmc0: memory-controller@3b000000 {
    		compatible = "ti,am64-gpmc";
    		status = "disabled";
    		power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 80 0>;
    		clock-names = "fck";
    		reg = <0x00 0x03b000000 0x00 0x400>,
    			<0x00 0x050000000 0x00 0x8000000>;
    		reg-names = "cfg", "data";
    		interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
    		gpmc,num-cs = <3>;
    		gpmc,num-waitpins = <2>;
    		#address-cells = <2>;
    		#size-cells = <1>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		gpio-controller;
    		#gpio-cells = <2>;
    	};
    
    	elm0: ecc@25010000 {
    		compatible = "ti,am64-elm";
    		status = "disabled";
    		reg = <0x00 0x25010000 0x00 0x2000>;
    		interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 54 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 54 0>;
    		clock-names = "fck";
    	};
    
    	hwspinlock: spinlock@2a000000 {
    		compatible = "ti,am64-hwspinlock";
    		reg = <0x00 0x2a000000 0x00 0x1000>;
    		#hwlock-cells = <1>;
    	};
    
    	mailbox0_cluster0: mailbox@29000000 {
    		compatible = "ti,am64-mailbox";
    		reg = <0x00 0x29000000 0x00 0x200>;
    		interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
    			     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
    		#mbox-cells = <1>;
    		ti,mbox-num-users = <4>;
    		ti,mbox-num-fifos = <16>;
    	};
    };
    

    I generated the binary files. but when I try to transfer the files to eMMC, I got error for the command "sudo dfu-util -a tiboot3.bin.raw -D tiboot3.bin"

    please find the screen shot below.

    screenshot from host:

    screenshot from target:

    if I revert back k3-am62-main.dtsi file changes, then I dont see any issues in flashing binaries to eMMC but eMMC boot failing.

    Thanks and Regards,

    Swapna.

  • Hi,

    Could try the following binaries, flash these to eMMC:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/1134.tiboot3.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/5383.tispl.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/6646.u_2D00_boot.img

    ~ Judith

  • Hi Judith,

    DFU file transfer is failing with above files. Error from the target is SPL: unsupported boot device

    screenshot from host is:

    screenshot from target is:

    Thanks and Regards,

    Swapna.

  • Hi Swapna,

    Did the file transfer successfully? Irrespective of whether board did boot. I do not see the error on the first log, I do not see 'Something is wrong... error".

    ~ Judith

  • Hi Judith,

    The commands send from host are

    sudo dfu-util -l
    sudo dfu-util -R -a bootloader -D tiboot3.bin

    from the host, copying data from PC to DFU device is 100% complete with no error condition.

    however from the target deive, there is error saying

    SPL: Unsupported Boot Device!
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###


    hope you verified both images in previous post.

    after a timeout from the host, there is a message
    dfu-util: unable to read DFU status after completion.
    dfu-util: cannot detach
    (please refer attached images in previous post)

    with this error from the target, we couldnot proceed further and the command "sudo dfu-util -l" not listing any DFU after error from target.
    
    



    Thanks and Regards,
    Swapna
  • Hi Swapna,

    There are two different errors.

    With the binaries I sent, you no longer fail to transfer using USB-DFU.

    The error now, is u-boot cannot find tispl.bin so can you please flash to eMMC the following binaries:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/7356.tiboot3.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/5618.tispl.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/5238.u_2D00_boot.img

    And use this boot mode:
    SW2:00000000 SW1:11010010

    ~ Judith

  • Hi Judith,

    I tried your files. and there is no improvement in the outcome.

    The commands send from host are

    sudo dfu-util -l
    sudo dfu-util -R -a bootloader -D tiboot3.bin

    from the host, copying data from PC to DFU device is 100% complete with no error condition.

    however from the target deive, there is error saying

    SPL: Unsupported Boot Device!
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###


    please note that our AM62x EVAL kit is in GP mode.

    with our GP files, we are able to transfer all the files including raw files and file system.
    only probelm is system is not booting afte completing all steps.

    we tried both switch combinations below and nothing worked.

    SW2:00000000 SW1:11010010

    SW2:00000000 SW1:11010011.

    Thanks and Regards,
    Swapna

  • Hi Swapna,

    Need to verify the steps are correct here, please confirm you are doing all the following:
    1. Set to USB-DFU boot mode: SW2:00000000 SW1:11001010
    2. Connect USB cable to J13
    3. Boot via USB-DFU with the following binaries:
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/dfu_2D00_tiboot3.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/dfu_2D00_tispl.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/dfu_2D00_u_2D00_boot.img
    Files are built with patch:

    diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h
    index 97bd7c1fd7..992294acfe 100644
    --- a/include/configs/am62x_evm.h
    +++ b/include/configs/am62x_evm.h
    @@ -504,7 +504,7 @@
     
     #endif
     
    -#ifdef CONFIG_TARGET_AM625_A53_EVM
    +#if defined(CONFIG_TARGET_AM625_A53_EVM) || defined(CONFIG_SPL_DFU)
     #define EXTRA_ENV_DFUARGS \
            DFU_ALT_INFO_MMC \
            DFU_ALT_INFO_EMMC \


    4. Execute commands in Linux host:

    • sudo dfu-util -R -a bootloader -D dfu-tiboot3.bin
    • sudo dfu-util -R -a tispl.bin -D dfu-tispl.bin
    • sudo dfu-util -R -a u-boot.img -D dfu-u-boot.img
    • setenv dfu_alt_info ${dfu_alt_info_emmc}
    • dfu 0 mmc 0

    5. Begin flashing eMMC with the following files:
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/emmc_2D00_tiboot3.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/emmc_2D00_tispl.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/emmc_2D00_u_2D00_boot.img
    These files have the following patch:

    diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
    index d103c73770..4f54eeff82 100644
    --- a/arch/arm/mach-k3/am625_init.c
    +++ b/arch/arm/mach-k3/am625_init.c
    @@ -25,6 +25,9 @@
     #define K3RTC_KICK0_UNLOCK_VALUE       0x83e70b13
     #define K3RTC_KICK1_UNLOCK_VALUE       0x95a4f1e0
     
    +/*eMMC boot mode fix*/
    +#define EMMC_BOOT      9
    +
     #if defined(CONFIG_SPL_BUILD)
     
     /*
    @@ -245,6 +248,10 @@ u32 spl_mmc_boot_mode(const u32 boot_device)
     
            switch (boot_device) {
            case BOOT_DEVICE_MMC1:
    +               if (((devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK) >>
    +                     MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT) == EMMC_BOOT)
    +                       return MMCSD_MODE_EMMCBOOT;
    +
                    if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK) >>
                         MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_SHIFT)
                            return MMCSD_MODE_EMMCBOOT;
    diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig
    index d9bf9a5b7d..f3af0a6e51 100644
    --- a/configs/am62x_evm_a53_defconfig
    +++ b/configs/am62x_evm_a53_defconfig
    @@ -82,7 +82,7 @@ CONFIG_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
     CONFIG_ENV_IS_IN_MMC=y
    -CONFIG_SYS_MMC_ENV_PART=1
    +CONFIG_SYS_MMC_ENV_PART=2
     CONFIG_NET_RANDOM_ETHADDR=y
     CONFIG_DM=y
     CONFIG_SPL_DM=y
    

    6. Flash eMMC using the following commands:

    • sudo dfu-util -a tiboot3.bin.raw -D emmc-tiboot3.bin
    • sudo dfu-util -a tispl.bin.raw -D emmc-tispl.bin
    • sudo dfu-util -a u-boot.img.raw -D emmc-u-boot.img

    Output on target console:
             ##DOWNLOAD ... OK
              Ctrl+C to exit ...
              ####DOWNLOAD ... OK
              Ctrl+C to exit ...
              ####DOWNLOAD ... OK
              Ctrl+C to exit ...

    7. To give the ROM access to the boot partition, the following commands must be used for the first time:
            => mmc partconf 0 1 1 1
            => mmc bootbus 0 2 0 0

    8. Change boot mode to eMMC boot mode:
    SW2: 00000000 SW1:11010010

    9. Power off and on the board

    ~ Judith

  • Hi Judith,

    I followed all the steps from 1 to 9.

    I have downloaded all the 6 files you attached and able to transfer all the file using USB-DFU.

    however eMMC boot is failing with the message "spl_load_fit_image: Skip load 'tee': image size is 0!"

    please find the messages from target device below

    U-Boot SPL 2021.01-00001-geb4ef47698 (Jul 21 2023 - 17:27:35 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from DFU
    ################################################DOWNLOAD ... OK
    Ctrl+C to exit ...
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from MMC... MMC Device 0 not found
    *** Warning - No MMC card found, using default environment
    
    init_env from device 10 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb
    NOTICE:  BL31: Built : 17:27:41, Jul 21 2023
    I/TC:
    I/TC: OP-TEE version: 3.20.0-rc1 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Fri Jul 21 22:27:50 UTC 2023 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Fixing SA2UL firewall owner for GP device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2021.01-00001-geb4ef47698 (Jul 21 2023 - 17:27:55 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from DFU
    ####DOWNLOAD ... OK
    Ctrl+C to exit ...
    
    
    U-Boot 2021.01-00001-geb4ef47698 (Jul 21 2023 - 17:27:55 -0500)
    
    SoC:   AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E3
    DRAM:  2 GiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0
    =>
    => setenv dfu_alt_info ${dfu_alt_info_emmc}
    => dfu 0 mmc 0
    ##DOWNLOAD ... OK
    Ctrl+C to exit ...
    ###DOWNLOAD ... OK
    Ctrl+C to exit ...
    ####DOWNLOAD ... OK
    Ctrl+C to exit ...
    =>  mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0
    =>
    U-Boot SPL 2021.01-00001-gaca79e62eb (Jul 21 2023 - 17:27:24 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC1
    spl_load_fit_image: Skip load 'tee': image size is 0!
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from MMC... OK
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb
    NOTICE:  BL31: Built : 17:27:41, Jul 21 2023
    ð
    U-Boot SPL 2021.01-00001-gaca79e62eb (Jul 21 2023 - 17:27:24 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC1
    spl_load_fit_image: Skip load 'tee': image size is 0!
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from MMC... OK
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb
    NOTICE:  BL31: Built : 17:27:41, Jul 21 2023
    
    

    ----------------------

    Since tee image size is coming as 0, we send the command "fdtdump emmc-tispl.bin"

    here in the section tee, the size is shown as 0.

    so instead of "emmc-tispl.bin" file(file size is only 537.1 KB) we used "dfu-tispl.bin" (file size is 965.2 kB) also as raw file.

    I repeated the steps from 1 to 9.

    This time eMMC boot is failing with the different message

    "spl_register_fat_device: fat register err - -1
    spl_load_image_fat: error reading image u-boot.img, err - -1"

    please find the messages from target device below

    U-Boot 2021.01-00001-geb4ef47698 (Jul 21 2023 - 17:27:55 -0500)
    
    SoC:   AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E3
    DRAM:  2 GiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0
    => setenv dfu_alt_info ${dfu_alt_info_emmc}
    => dfu 0 mmc 0
    ##DOWNLOAD ... OK
    Ctrl+C to exit ...
    ####DOWNLOAD ... OK
    Ctrl+C to exit ...
    ####DOWNLOAD ... OK
    Ctrl+C to exit ...
    => mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0
    => ð
    U-Boot SPL 2021.01-00001-gaca79e62eb (Jul 21 2023 - 17:27:24 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC1
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from MMC... OK
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb
    NOTICE:  BL31: Built : 17:27:41, Jul 21 2023
    I/TC:
    I/TC: OP-TEE version: 3.20.0-rc1 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Fri Jul 21 22:27:50 UTC 2023 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Fixing SA2UL firewall owner for GP device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2021.01-00001-geb4ef47698 (Jul 21 2023 - 17:27:55 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from MMC1
    spl_register_fat_device: fat register err - -1
    spl_load_image_fat: error reading image u-boot.img, err - -1
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    could you please help us in fixing the issues

    Thanks and Regards,

    Swapna.

  • Hi Swapna,

    Ok, do not use the dfu-tispl.bin file to flash to eMMC. I will double check why the one I built did not include OPTEE and resend you the correct emmc-tispl.bin. But we are much closer than before. Thank you for your patience.

    ~ Judith

  • Hi,

    Could you flash eMMC with the following binaries again:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/tiboot3_2D00_emmc.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/tispl_2D00_emmc.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/u_2D00_boot_2D00_emmc.bin

    I have verified the OPTEE is built too:

    Created:         Mon Jul 24 17:04:59 2023
     Image 0 (atf)
      Description:  ARM Trusted Firmware
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Firmware
      Compression:  uncompressed
      Data Size:    44056 Bytes = 43.02 KiB = 0.04 MiB
      Architecture: AArch64
      OS:           ARM Trusted Firmware
      Load Address: 0x9e780000
     Image 1 (tee)
      Description:  OPTEE
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Trusted Execution Environment Image
      Compression:  uncompressed
      Data Size:    399408 Bytes = 390.05 KiB = 0.38 MiB
     Image 2 (dm)
      Description:  DM binary
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Firmware
      Compression:  uncompressed
      Data Size:    152520 Bytes = 148.95 KiB = 0.15 MiB
      Architecture: Unknown Architecture
      OS:           Unknown OS
      Load Address: 0x89000000
     Image 3 (spl)
      Description:  SPL (64-bit)
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Standalone Program
      Compression:  uncompressed
      Data Size:    318352 Bytes = 310.89 KiB = 0.30 MiB
      Architecture: AArch64
      Load Address: 0x80080000
      Entry Point:  0x80080000
     Image 4 (k3-am625-sk.dtb)
      Description:  k3-am625-sk
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Flat Device Tree
      Compression:  uncompressed
      Data Size:    20785 Bytes = 20.30 KiB = 0.02 MiB
      Architecture: ARM
     Default Configuration: 'k3-am625-sk.dtb'
     Configuration 0 (k3-am625-sk.dtb)
      Description:  k3-am625-sk
      Kernel:       unavailable
      Firmware:     atf
      FDT:          k3-am625-sk.dtb
      Loadables:    tee
                    dm
                    spl
    FIT description: Configuration to load ATF and SPL
    Created:         Mon Jul 24 17:04:59 2023
     Image 0 (atf)
      Description:  ARM Trusted Firmware
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Firmware
      Compression:  uncompressed
      Data Size:    44056 Bytes = 43.02 KiB = 0.04 MiB
      Architecture: AArch64
      OS:           ARM Trusted Firmware
      Load Address: 0x9e780000
     Image 1 (tee)
      Description:  OPTEE
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Trusted Execution Environment Image
      Compression:  uncompressed
      Data Size:    399408 Bytes = 390.05 KiB = 0.38 MiB
     Image 2 (dm)
      Description:  DM binary
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Firmware
      Compression:  uncompressed
      Data Size:    152520 Bytes = 148.95 KiB = 0.15 MiB
      Architecture: Unknown Architecture
      OS:           Unknown OS
      Load Address: 0x89000000
     Image 3 (spl)
      Description:  SPL (64-bit)
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Standalone Program
      Compression:  uncompressed
      Data Size:    318352 Bytes = 310.89 KiB = 0.30 MiB
      Architecture: AArch64
      Load Address: 0x80080000
      Entry Point:  0x80080000
     Image 4 (k3-am625-sk.dtb)
      Description:  k3-am625-sk
      Created:      Mon Jul 24 17:04:59 2023
      Type:         Flat Device Tree
      Compression:  uncompressed
      Data Size:    20785 Bytes = 20.30 KiB = 0.02 MiB
      Architecture: ARM
     Default Configuration: 'k3-am625-sk.dtb'
     Configuration 0 (k3-am625-sk.dtb)
      Description:  k3-am625-sk
      Kernel:       unavailable
      Firmware:     atf
      FDT:          k3-am625-sk.dtb
      Loadables:    tee
                    dm
                    spl
    

    However, I cannot test since I do not have GP device.

    Again as mentioned above, these binaries should be flashed to eMMC. The binaries for USB-DFU boot are different.

    Let me know if these binaries work.

    ~ Judith

  • Thanks Judith.

    eMMC boot is working succesfully now with latest eMMC boot files you shared..

    Now we want to generate all the 6 files(DFU and eMMC). I followed below steps. but eMMC boot is failing. can you please review the steps as we dont know how eMMC files(raw files) are genearted.

    1. I have installed AM62x SDK 8.06.00.42  in linux machine

    1.  Rules.make is updated with 

    UBOOT_MACHINE_R5=am62x_evm_r5_usbdfu_defconfig

    2. Applied patch files for "am62x_evm.h" which you have shared in the post

    3. Genearted binary images using the commands
    make u-boot
    make sysfw-image DEVICE_TYPE=gp

    4. tiboot3.bin, tispl.bin and u-boot.img files are genearetd and these files I used as DFU Uboot files

    5. Applied patch files for "am625_init.c" and "am62x_evm_a53_defconfig" which you have shared in the post

    6. Genearted binary images using the commands
    make u-boot
    make sysfw-image DEVICE_TYPE=gp

    7. now tiboot3.bin, tispl.bin and u-boot.img files are genearetd and I renamed these files to
    emmc-tiboot3.bin, emmc-tispl.bin and emmc-u-boot.img.   these files I used as eMMC Uboot files



    Iam able to transfer all the 6 files but eMMC boot is failing with error below

    U-Boot SPL 2021.01-00002-g93da3fa57b-dirty (Jul 25 2023 - 12:40:16 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC1
    spl: could not initialize mmc. error: -19
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    we are not clear how first set of 3 files are different from second set of 3 files. could you please explain.


    Thanks and Regards,
    Swapna


  • Hi Swapna,


    4. tiboot3.bin, tispl.bin and u-boot.img files are genearetd and these files I used as DFU Uboot files

    Verify you change: UBOOT_MACHINE_R5=am62x_evm_r5_defconfig before proceeding
    6. Genearted binary images using the commands
    make u-boot
    make sysfw-image DEVICE_TYPE=gp

    Something that could help here is:

    U-Boot SPL 2021.01-00002-g93da3fa57b-dirty (Jul 25 2023 - 12:40:16 +0530)

    Look at the following during eMMC boot, and verify that this is the commit for your last patch in u-boot for eMMC build. Also, verify the date. If this is correct patch and correct date, you know you are flashing correctly. If not, double check how you are flashing to eMMC and make sure your boot switch setting is correct.

    Other than this, it should work. You should only apply one patch which is the workaround for USB-DFU boot and one patch which is eMMC fix for eMMC boot.

    ~ Judith

  • Hi Judith,

    Now OS has booted from successfully from eMMC.  

    Thanks for your continuous support.

    Need one last clarification, after following all these steps, we are confused about structure of eMMC. could you please clarify where kernel, device tree and root file system are stored in eMMC.

    also TI documentation talks about creation of file system (Flash linux to eMMC) at the link

     https://dev.ti.com/tirex/explore/node?node=A__AHRrRyaBVyh3lIzvQ8a6tQ__linux_academy_am62x__XaWts8R__LATEST

    but from the procedure what we followed, we dont see these steps are performed.

    Thanks and Regards,

    Swapna.

  • Hi Swapna,

    Since we are using USB-DFU to flash eMMC, if you look at U-boot environment variable:

    => printenv dfu_alt_info_emmc
    dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1; rootfs part 0 1; tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; tispl.bin.raw raw 0x400 0x1000 mmcpart 1; u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; u-env.raw raw 0x3400 0x100 mmcpart 1; sysfw.itb.raw raw 0x3600 0x800 mmcpart 1
    =>

    We can see that rootfs is flashed to part 0 1, which is UDA partition 1.

    If you do not have a partition in UDA, please create one using fdisk in Linux Kernel then format using $ sudo mkfs -t ext4 /dev/mmcblk0p1. After this you should be able to flash rootfs to UDA.

    Before flashing with USB-DFU, there is some pre-work to prepare  tisdk-base.ext4.

    tisdk-base.ext4 has contents of tisdk-base-image-am62xx-evm.tar.xz, which is a root file system that includes Linux Kernel  "Image" and the device tree files. So we only have to flash a rootfs to UDA, only it requires some pre-work in order to flash using USB-DFU.

    // Create tisdk-base.ext4
    <path-to-psdk>/filesystem$ dd if=/dev/null of=tisdk-base.ext4 bs=1M seek=400
    0+0 records in
    0+0 records out
    0 bytes copied, 0.00024402 s, 0.0 kB/s
    <path-to-psdk>/filesystem$ mkfs.ext4 -F tisdk-base.ext4
    mke2fs 1.46.5 (30-Dec-2021)
    Discarding device blocks: done                            
    Creating filesystem with 102400 4k blocks and 102400 inodes
    Filesystem UUID: b4fc5618-e027-4eb1-aa02-38cba1366a54
    Superblock backups stored on blocks: 
        32768, 98304
    
    Allocating group tables: done                            
    Writing inode tables: done                            
    Creating journal (4096 blocks): done
    Writing superblocks and filesystem accounting information: done
    
    <path-to-psdk>/filesystem$ mkdir mnt_fs
    <path-to-psdk>/filesystem$ sudo mount -t ext4 tisdk-base.ext4 mnt_fs
    <path-to-psdk>/filesystem$ cd mnt_fs
    <path-to-psdk>/filesystem/mnt_fs$ sudo tar xvf ../tisdk-base-image-am62xx-evm.tar.xz
    …….
    ./var/lib/opkg/info/util-linux-fdisk.control
    ./var/lib/opkg/info/util-linux-fdisk.list
    ./var/lib/opkg/info/util-linux-fdisk.postinst
    ./var/lib/opkg/info/util-linux-fdisk.prerm
    ./var/lib/opkg/info/util-linux-fsck.control
    ./var/lib/opkg/info/util-linux-fsck.list
    ./var/lib/opkg/info/util-linux-fsck.postinst
    ./var/lib/opkg/info/util-linux-fsck.prerm
    ./var/lib/opkg/info/util-linux-mkfs.control
    ./var/lib/opkg/info/util-linux-mkfs.list
    ./var/lib/opkg/info/util-linux-mount.control
    ./var/lib/opkg/info/util-linux-mount.list
    ./var/lib/opkg/info/util-linux-mount.postinst
    ./var/lib/opkg/info/util-linux-mount.prerm
    ./var/lib/opkg/info/util-linux-sfdisk.control
    ./var/lib/opkg/info/util-linux-sfdisk.list
    ./var/lib/opkg/info/util-linux-sulogin.control
    ./var/lib/opkg/info/util-linux-sulogin.list
    ./var/lib/opkg/info/util-linux-sulogin.postinst
    ./var/lib/opkg/info/util-linux-sulogin.prerm
    ./var/lib/opkg/info/util-linux-umount.control
    ./var/lib/opkg/info/util-linux-umount.list
    ./var/lib/opkg/info/util-linux-umount.postinst
    ./var/lib/opkg/info/util-linux-umount.prerm
    ./var/lib/opkg/info/volatile-binds.control
    ./var/lib/opkg/info/volatile-binds.list
    ./var/lib/opkg/info/volatile-binds.postinst
    ./var/lib/opkg/info/volatile-binds.prerm
    ./var/lib/opkg/status
    ./var/lib/systemd/
    ./var/local/
    ./var/lock
    ./var/log
    ./var/run
    ./var/spool/
    ./var/spool/mail/
    ./var/tmp
    ./var/volatile/
    <path-to-psdk>/filesystem/mnt_fs$ cd ../
    <path-to-psdk>/filesystem$ sudo umount mnt_fs
    


    If you want to flash the default rootfs, we are seeing some issues when flashing a large rootfs to eMMC. So question, what rootfs will you flash to eMMC?

    ~ Judith

  • Hi Judith,

    Thanks for clarification.

    we need full file system.

    please let us know after the issues are resolved for flashing large rootfs to eMMC.

    as of now we will close this ticket. 

    Thanks and Regards,

    Swapna.