2019-09-17 05:11 AM
Hi,
I have a problem while trying to bring up my board, which is based on the STM32MP157A-EV1.
What I'm doing is trying to flash the board with the same method as in the Starter Package, so I created a copy of the appropriate *.tfv file changing the name of the *.stm32 files it points to to the one I compiled after getting the proper device tree files from CubeMX.
I've come to a point where TF-A seems to load correctly, then it proceeds with the U-Boot and everything stops when it doesn't find the mmc0 (SD card if I'm not wrong).
The thing is, all the SDMMC1 signals are connected just as it is on the EV1, except for "uSD_DETECT". On our design, the "uSD_DETECT" line is located on PG12 (Ball J4) instead of PG1 (Y4), which is where it is on the EV1.
I've been trying to figure out how to change that on the device tree but so far I haven't learned how to do that, however, I tried checking the line that's connected to PG1 (Y4) on our design (we can still have access to it) and I see that it is not pulled up (it should have an active internal pull-up). However I tried pulling it down and up externally and nothing happens.
Is there a chance there any sort of incompatibility with some uSD cards? I tried with two 16Gb cards, one from Samsung and another from Toshiba.
Greetings,
J.
This is what I get on the serial port:
NOTICE: CPU: STM32MP157AAA Rev.B
NOTICE: Model: STMicroelectronics STM32MP157A-EV1 STM32CubeMX board
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: Using USB
INFO: Instance 2
INFO: Boot used partition fsbl1
INFO: Product_below_2v5=1: HSLVEN update is
INFO: destructive, no update as VDD>2.7V
NOTICE: BL2: v2.0(debug):
NOTICE: BL2: Built : 13:15:14, Sep 16 2019
INFO: BL2: Doing platform setup
INFO: PMIC version = 0x00
INFO: RAM: DDR3-DDR3L 32bits 533000Khz
INFO: Memory size = 0x40000000 (1024 MB)
INFO: BL2 runs SP_MIN setup
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2fff0000
INFO: Image id=4 loaded: 0x2fff0000 - 0x30000000
INFO: BL2: Loading image id 5
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Receive DFU abort
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Start Download partition 0 to address 0xc0000000 length 0
INFO: USB : DFU : end of download partition : 0
INFO: Loading image id=5 at address 0xc0100000
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: receive request 6
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: usb_partition_size: partition size : 0xb8e50
INFO: Start Download partition 3 to address 0xc0100000 length 757328
INFO: USB : DFU : end of download partition : 3
WARNING: Skip signature check (header option)
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0xffffffff
INFO: Send detach request
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Receive Detach
INFO: Image id=5 loaded: 0xc0100000 - 0xc01b8e50
INFO: read version 0 current version 0
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2fff0000
INFO: SPSR = 0x1d3
INFO: PMIC version = 0x00
NOTICE: SP_MIN: v2.0(debug):
NOTICE: SP_MIN: Built : 13:15:23, Sep 16 2019
INFO: ARM GICv2 driver initialized
INFO: stm32mp HSI (18): Secure only
INFO: stm32mp HSE (20): Secure only
INFO: stm32mp PLL2 (27): Secure only
INFO: stm32mp PLL2_R (30): Secure only
INFO: SP_MIN: Initializing runtime services
INFO: SP_MIN: Preparing exit to normal world
U-Boot 2018.11-stm32mp-r2 (Sep 17 2019 - 13:58:46 +0200)
CPU: STM32MP157AAA Rev.B
Model: STMicroelectronics STM32MP157A-EV1 STM32CubeMX board
Board: stm32mp1 in trusted mode (st,stm32mp157a-ev1-mx)
Watchdog enabled
DRAM: 1 GiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 0 MHz
- DDR : 533 MHz
unknown chip id: 0xfb
Fastboot key pressed, STM32Programmer key pressed, entering download mode...
NAND: 0 MiB
MMC: STM32 SDMMC2: 0, STM32 SDMMC2: 1
In: serial
Out: serial
Err: serial
Enter STM32CubeProgrammer mode!
invalid MAC address in OTP 00:00:00:00:00:00Net:
Error: ethernet@5800a000 address not set.
eth-1: ethernet@5800a000
Error: mmc device 0 not found
DFU alt info setting: done
2019-09-17 06:04 AM
Hi @j_gil
There is not known µSCard incompatibility.
Your trace looks like the one you can get while in USB / DFU boot mode to flash ...
Can you check your boot switch configuration ?
Guess you are attempting nor + SD boot mode using FlashLayout_nor-sdcard_stm32mp157c-ev1-trusted as template ?
Which partition did you modified with your new TF-A and U-boot ? The 2 first -boot ones or 0x4 to 0x6 ?
Thanks
Olivier
2019-09-17 06:34 AM
Hi Olivier,
Yes, I was trying to flash, so I had the Boot switch configuration as in USB/DFU mode. I have tried in SD-Card mode but it won't go as far (please find log at bottom of message).
I used FlashLayout_sdcard_stm32mp157c-ev1-trusted as a template, but I didn't modify the partitions (should I?), what I did is change the names of the *.stm32 files it points to the ones I compiled.
Should I use the nor-sdcard as a template?
Kind regards,
J.
NOTICE: BL2: v2.0(debug):
NOTICE: BL2: Built : 13:15:14, Sep 16 2019
INFO: BL2: Doing platform setup
INFO: PMIC version = 0x00
INFO: RAM: DDR3-DDR3L 32bits 533000Khz
INFO: Memory size = 0x40000000 (1024 MB)
INFO: BL2 runs SP_MIN setup
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2fff0000
INFO: Image id=4 loaded: 0x2fff0000 - 0x30000000
INFO: BL2: Loading image id 5
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Receive DFU abort
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Start Download partition 0 to address 0xc0000000 length 0
INFO: USB : DFU : end of download partition : 0
INFO: Loading image id=5 at address 0xc0100000
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: receive request 6
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: usb_partition_size: partition size : 0xb8e50
INFO: Start Download partition 3 to address 0xc0100000 length 757328
INFO: USB : DFU : end of download partition : 3
WARNING: Skip signature check (header option)
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0xffffffff
INFO: Send detach request
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Receive Detach
INFO: Image id=5 loaded: 0xc0100000 - 0xc01b8e50
INFO: read version 0 current version 0
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2fff0000
INFO: SPSR = 0x1d3
INFO: PMIC version = 0x00
NOTICE: SP_MIN: v2.0(debug):
NOTICE: SP_MIN: Built : 13:15:23, Sep 16 2019
INFO: ARM GICv2 driver initialized
INFO: stm32mp HSI (18): Secure only
INFO: stm32mp HSE (20): Secure only
INFO: stm32mp PLL2 (27): Secure only
INFO: stm32mp PLL2_R (30): Secure only
INFO: SP_MIN: Initializing runtime services
INFO: SP_MIN: Preparing exit to normal world
U-Boot 2018.11-stm32mp-r2 (Sep 17 2019 - 13:58:46 +0200)
CPU: STM32MP157AAA Rev.B
Model: STMicroelectronics STM32MP157A-EV1 STM32CubeMX board
Board: stm32mp1 in trusted mode (st,stm32mp157a-ev1-mx)
Watchdog enabled
DRAM: 1 GiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 0 MHz
- DDR : 533 MHz
unknown chip id: 0xfb
Fastboot key pressed, STM32Programmer key pressed, entering download mode...
NAND:
2019-09-17 07:08 AM
Hi @j_gil
Ok so you want to boot from SDCard.
Could you please share the .tsv file you are using ? ( in public or MP as you wish )
Thx
Olivier
2019-09-17 07:35 AM
Sure no problem posting it here:
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157a-ev1-mx-trusted.stm32
- 0x03 ssbl-boot Binary none 0x0 u-boot-stm32mp157a-ev1-mx-trusted.stm32
P 0x04 fsbl1 Binary mmc0 0x00004400 tf-a-stm32mp157a-ev1-mx-trusted.stm32
P 0x05 fsbl2 Binary mmc0 0x00044400 tf-a-stm32mp157a-ev1-mx-trusted.stm32
P 0x06 ssbl Binary mmc0 0x00084400 u-boot-stm32mp157a-ev1-mx-trusted.stm32
P 0x21 bootfs System mmc0 0x00284400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
P 0x22 vendorfs FileSystem mmc0 0x04284400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
P 0x23 rootfs FileSystem mmc0 0x05284400 st-image-weston-openstlinux-weston-stm32mp1.ext4
P 0x24 userfs FileSystem mmc0 0x340F0400 st-image-userfs-openstlinux-weston-stm32mp1.ext4
2019-09-17 07:42 AM
Thanks,
This looks correct.
So now, please share TF-A and U-boot dts file.
Olivier
2019-09-17 07:45 AM
Good, I'll PM those to you.
2019-09-19 01:10 AM
Hi @j_gil
The last boot log you sent still contain DFU trace which does not match with a boot from SDCard. Please check and clarify boot switch configuration.
Olivier