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.

AM5708: u-boot not coming up from eMMC

Part Number: AM5708

Hi,

We are using a custom board based on am5708 and using ti-processor-sdk-linux-am57xx-hs-evm-08_02_01_00.

We have generated MLO, u-boot.img, kernel and rootfs using SDK. 

We flash the wic image generated by SDK onto the sd card and the board is booting perfectly fine. The following is the partition scheme:

Disk /dev/mmcblk1: 30 GB, 31914983424 bytes, 62333952 sectors
486984 cylinders, 4 heads, 32 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk1p1 *  384,0,1     639,3,32         49152      81919      32768 16.0M  c Win95 FAT32 (LBA)
/dev/mmcblk1p2    640,0,1     1023,3,32        81920    4095999    4014080 1960M 83 Linux
/dev/mmcblk1p3    1023,3,32   1023,3,32      4096000    8110079    4014080 1960M 83 Linux
/dev/mmcblk1p4    1023,3,32   1023,3,32      8110080    8372223     262144  128M 83 Linux

We copy the same wic image on the SD card and flash (using "dd" command) it onto the emmc. It also has the similar partition scheme.

Disk /dev/mmcblk0: 7456 MB, 7818182656 bytes, 15269888 sectors
119296 cylinders, 4 heads, 32 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1 *  384,0,1     639,3,32         49152      81919      32768 16.0M  c Win95 FAT32 (LBA)
/dev/mmcblk0p2    640,0,1     1023,3,32        81920    4095999    4014080 1960M 83 Linux
/dev/mmcblk0p3    1023,3,32   1023,3,32      4096000    8110079    4014080 1960M 83 Linux
/dev/mmcblk0p4    1023,3,32   1023,3,32      8110080    8372223     262144  128M 83 Linux

But u-boot wont come up with eMMC. It stops at SPL and here is the log:

PPA 4.6.4 (GCC Build - Sep 24 2020 - 16:41:23)
Supports ALL DRA7x, TDA2x, and AM57x devices
Detected device: 05841e21 HS
!ONLY PUBLIC DEBUG ON!
!OBFUSCATOR ON!
!TEE Load API SUPPORTED!
SEC_STATUS = 0x23820081
SEC_CTRL   = 0x00010203
SEC_EMU    = 0x000007fc
SEC_TAP    = 0x00002607

U-Boot SPL 2021.01-g91d7e1a7ab (Apr 10 2023 - 09:38:44 +0000)
DRA722-HS ES2.1
Trying to boot from MMC2_2
** Partition 1 not valid on device 1 **
spl_register_fat_device: fat register err - -1
spl_load_image_fat: error reading image u-boot.img, err - -1
spl: no partition table found
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

I tried to follow this link:

https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Foundational_Components_U-Boot.html#booting-mlo-and-u-boot-from-emmc-boot-partition

but ended up getting these security events:

PPA 4.6.4 (GCC Build - Sep 24 2020 - 16:41:23)
Supports ALL DRA7x, TDA2x, and AM57x devices
Detected device: 05841e21 HS
!ONLY PUBLIC DEBUG ON!
!OBFUSCATOR ON!
!TEE Load API SUPPORTED!
SEC_STATUS = 0x2282f8a2
SEC_CTRL   = 0x00010203
SEC_EMU    = 0x000007fc
SEC_TAP    = 0x00002607

U-Boot SPL 2021.01-g91d7e1a7ab (Apr 10 2023 - 09:38:44 +0000)
DRA722-HS ES2.1
Trying to boot from MMC2_2
no pinctrl state for default mode

-- NON SECURE CODE GENERATED A SECURITY VIOLATION --
-- WARNING: violation might be due to speculative accesses. Check L3 interconnect
-- PPA cleans FW and CONTROL module registers & let the NS alive.
CONTROL_SEC_ERR_STATUS_FUNC = 00000800
CONTROL_SEC_ERR_STATUS_FUNC_2 = 00000000

Interrupted context:
r0=4037f064, r1=81fffe54, r2=4037bc24, r3=80800000, 
r4=81fffee4, r5=4031df6e, r6=00000000, r7=4031754f, 
r8=81fffee0, r9=81ffff20, r10=fffff44b, r11=00000000, 
r12=81f003d0, lr_fiq=40301370, spsr_fiq=200001d7

Before Violation, SW was in abort handler
SP_abt=00000000, LR_abt=80832410, spsr_abt=200001d3


SCM FW: violation description
  Data Write Violation

SCM FW Error Log:
  [Register Addr (32b)] = Err log value (32b)
  [0x48280000] = 0x00000000
  [0x48280004] = 0x00000000
  [0x48280008] = 0x00000000
  [0x48280010] = 0x00400004
  [0x48280014] = 0x00000000
  [0x48280018] = 0xffffffff

FYI:

=> mmc list
OMAP SD/MMC: 0 (SD)
OMAP SD/MMC: 1 (eMMC)


=> mmc dev
switch to partitions #0, OK
mmc0 is current device

=> mmc info
Device: OMAP SD/MMC
Manufacturer ID: 3
OEM: 5344
Name: SD32G 
Bus Speed: 48000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes


=> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device

=> mmc info
Device: OMAP SD/MMC
Manufacturer ID: 13
OEM: 14e
Name: S0J35 
Bus Speed: 48000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 31.5 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
=> 

Please help me in getting this solved.

Thank you