2020-12-02 06:10 AM
Hello,
I have a custom board based on STM32MP151-C with an eMMC on the following pins:
I read that the ROM expects the the SDMMC2_D0 pin on PB14 so I need to change it by using values from the OTP. I found this link (https://community.st.com/s/question/0D50X0000AkQJiHSQW/how-to-change-emmc-interface) and did the same as the ST Support, just for my pins. Here are my results.
Could someone please let me know if I calculated the OTP values correctly? So I dont brick the board.
PS: How do I determine the speed on the pin (low, medium or high)?
Thanks.
Solved! Go to Solution.
2020-12-02 08:34 AM
Hi ANiko.3,
You've stated 2 different configurations for SDMMC2_D0
According to your configuration (PE3/PE6/PG6) , I found
OTP3 = 0x00000004
OTP5= 0x56745394
OTP6 correct.
or to your configuration (PE3/PC8/PG6) , I found
OTP3 = 0x00000004
OTP5= 0x38745394 (correct)
OTP6 correct.
Kind Regards
2020-12-02 08:34 AM
Hi ANiko.3,
You've stated 2 different configurations for SDMMC2_D0
According to your configuration (PE3/PE6/PG6) , I found
OTP3 = 0x00000004
OTP5= 0x56745394
OTP6 correct.
or to your configuration (PE3/PC8/PG6) , I found
OTP3 = 0x00000004
OTP5= 0x38745394 (correct)
OTP6 correct.
Kind Regards
2020-12-02 09:17 AM
Hi,
note that there is no SDMMC2_D0 on PC8, so the second config will not work.
Also note that eMMC boot is working only with few memory brand if you have silicon Rev.B. Silicon Rev.Z is corrected. See ES0438 for details (this is mentioned in the post you refer, so I think you are already aware).
Regards.
2020-12-02 11:08 AM
Hi to both of you and thatnks for the answer. Yes, I made a typo with the SDMMC2_D0 pin (PC8 is coming from the example), so the first configuration is the one I need.
@PatrickF We have the Rev.Z and the THGBMNG5D1LBAIL eMMC, so there shouldnt be a problem, but thanks for mentioning anyway.
I have a question for the Pin Mode. I set the Pin Mode to 4 which means "AF ; pull-up ; medium-speed"
Thanks.
2020-12-02 11:30 PM
With those OTP settings, we enable the internal pull-up (this is already the case with default BootROM eMMC pins). No issues to have both internal and external pull-up.
External pull-up on some eMMC signals are anyway required to avoid (slight) overconsumption from the eMMC in STANDBY (where all MP1 pins are floating as no VDDCORE), this is because usually the eMMC is still partly powered in platform Standby mode (e.g. VCCQ=VDD).
Regards.
2020-12-02 11:43 PM
Great, thanks. What about the speed? Is medium-speed correct?
2020-12-02 11:51 PM
Medium-speed is ok as BootROM use limited speed of around 16MHz (as only few hundred of kB are loaded for TF-A). This is to maximize compatibility whatever the external circuitry.
Later on (in TF-A or uBoot) SDMMC is set in 8 bits mode are higher frequency according to device tree settings (which also adapt the IO speed).
2020-12-03 06:24 AM
Hello,
I set the OTP words 3, 5 and 6, but somehow the board doesnt boot. Here are my values now when I read them out of the OTP:
03 0x00000004 0 0 0 0 0 0
05 0x56745394 0 0 0 0 0 0
06 0x000076a4 0 0 0 0 0 0
The power consumption is a bit higher than when the CPU is in the serial boot mode. The TF-A is not sending anything over UART4 though. The Boots pins should be set correctly: 010.
Any thoughts?
2020-12-03 06:43 AM
Hello,
is the board fall back to Serial Boot (coud be seen on PA13 toggling. note that it is open drain driven, so need an external pull-up) ?
If yes, you need to analyze the Boot trace by doing a SYSRAM dump. See https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_code_overview#Debug_and_Error_messages and https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_trace_analyzer
To dump the SYSRAM traces, without resetting the board after failure, you could use the following command on your Linux PC
openocd -f board/stm32mp15x_dk2.cfg -c 'init;cortex_a smp off;halt;dump_image traces.bin 0x2ffc1c00 2048;resume;shutdown'
Otherwise, your TF-A has been launch and you need to debug it.
Maybe see https://community.st.com/s/article/FAQ-STM32MP1-Bring-up-procedure
Regards.
2020-12-03 06:48 AM
Hi Patrick,
it was the TF-A device tree -I had to update it. Now I can boot up to the U-Boot successfully. Thanks again for your support.