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.

TDA4VM: program is stucked at startup phase on customized board.

Part Number: TDA4VM
Other Parts Discussed in Thread: TCA6424, CSD

It’s the first time that we use QNX+RTOS system on our customized project board. When I run the board, startup process is stucked as blow:


System page at phys:0000000080011000 user:ffffff8040254000 kern:ffffff8040251000
Starting next program at vffffff8060086e10

It stops here.


Before our project use LINUX+RTOS on our customized board, and “main_sdhci1” is changed in according “k3-j721e-main.dtsi”as below:
sdhci-caps-mask = <0x8000000F 0x0>;

“k3-j721e-common-proc-board.dts” is changed as blow:
&main_sdhci1 {
/* SD/MMC */
//vmmc-supply = <&vdd_mmc1>;
//vqmmc-supply = <&vdd_sd_dv_alt>;
pinctrl-names = "default";
pinctrl-0 = <&main_mmc1_pins_default>;
disable-wp;
};
After that, It works.

whether the reason of  problem is the same?  

If  the problem is caused by sdchi config, how can I  fix that?

thank you!

  • Hi Hongrun,

    Yes, it could be the SD/MMC driver but please keep in mind issue could also be something else.

    Regarding the SD/MMC driver, it is part of the QNX provided BSP package (../psdkqa/qnx/bsp/src/hardware/sdmmc/.)

    As first step recommend removing it from the initialization process, then debugging the driver from QNX command prompt.

    To remove SD/MMC from starting during QNX boot:

    1. Edit "psdkqa/bsp/images/j721e-evm-ti-spl.build" if booting uboot, edit psdkqa/qnx/bsp/images/j721e-evm-ti.build if booting from SBL
    2. Make the below changes:

    #######################################################################
    ## SD/eMMC memory card driver
    #######################################################################

    display_msg Not, Starting MMC/SD memory card driver... eMMC
    #devb-sdmmc-am65x blk cache=1m sdio addr=0x4f80000,irq=35,timing=~hs400,emmc,bs=sscfg=0x8000 disk name=emmc

    #### <--- For ti - start- auto-mount the SDcard
    display_msg Not, Starting MMC/SD memory card driver... SD
    #devb-sdmmc-am65x blk cache=1m sdio addr=0x04fb0000,irq=36,bs=sscfg=0x8000:ldo=0x600000^117:pwrdev=/dev/i2c0 cam pnp disk name=sd
    #devb-sdmmc-am65x blk noatime,cache=8M,automount=@/proc/boot/automount cam cache,async,quiet,pnp sdio addr=0x04fb0000,irq=36,bs=sscfg=0x8000:ldo=0x600000^117:pwrdev=/dev/i2c0 dos exe=all disk name=sd1
    #### For ti - end ---

    3. Build a new IFS image, copy to the SD card, and re-test.  This can be done, with "make qnx", "make qnx_fs_install_sd " , or "make qnx_fs_install_sd_sbl" for SBL.

    This should allow the boot to get to QNX prompt, at which point you can work on modifying the SD/MMC driver in the QNX / BSP as needed.   The code is available at .../psdkqa/qnx/bsp/src/hardware/sdmmc/.  The driver can be launched, using the same commands as seen in the build file above.

    The QNX "slog2info" utility may show error logs of what is occurring.  Verbosity of the driver can be increased as per ../psdkqa/qnx/bsp/src/hardware/sdmmc/.devb-sdmmc.use.

    After removing the SD/eMMC from the QNX build file, if the QNX command prompt still cannot be reached, then issue may be something else. In this case, please provide the full boot log.

    Regards,

    kb

  • Hi KB:

    QNX command prompt cannot be reached after removing the SD/eMMC from QNX build file. Below is the full log:

    U-Boot SPL 2020.01-svn1501 (Mar 21 2021 - 10:25:10 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla')
    Reading on-board EEPROM at 0x50 failed -1
    Trying to boot from MMC2
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment

    Starting ATF on ARM64 core...

    NOTICE: BL31: v2.3():07.01.00.004-1-g52c334fc3-dirty
    NOTICE: BL31: Built : 18:17:14, Nov 19 2020

    U-Boot SPL 2020.01-svn1501 (Mar 21 2021 - 10:24:46 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla')
    Reading on-board EEPROM at 0x50 failed -19
    Trying to boot from MMC2


    U-Boot 2020.01-svn1501 (Mar 21 2021 - 10:24:46 +0800)

    SoC: J721E SR1.0
    Model: Texas Instruments K3 J721E SoC
    Reading on-board EEPROM at 0x50 failed -19
    Board: J721EX-PM1-SOM rev E2
    DRAM: 2 GiB
    not found for dev hbmc-mux
    Flash: 0 Bytes
    MMC: sdhci@4f80000: 0, sdhci@4fb0000: 1
    Loading Environment from MMC... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    Reading on-board EEPROM at 0x50 failed -19
    Net: Could not get PHY for ethernet@46000000: addr 0
    phy_connect() failed
    No ethernet found.

    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    530 bytes read in 3 ms (171.9 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    Running uenvcmd ...
    5208376 bytes read in 218 ms (22.8 MiB/s)
    Load Remote Processor 2 with data@addr=0x82000000 5208376 bytes: Success!
    1959904 bytes read in 83 ms (22.5 MiB/s)
    Load Remote Processor 3 with data@addr=0x82000000 1959904 bytes: Success!
    1579120 bytes read in 64 ms (23.5 MiB/s)
    Load Remote Processor 6 with data@addr=0x82000000 1579120 bytes: Success!
    1579120 bytes read in 64 ms (23.5 MiB/s)
    Load Remote Processor 7 with data@addr=0x82000000 1579120 bytes: Success!
    9969592 bytes read in 165 ms (57.6 MiB/s)
    Load Remote Processor 8 with data@addr=0x82000000 9969592 bytes: Success!
    8176520 bytes read in 342 ms (22.8 MiB/s)
    ## Starting application at 0x80080000 ...
    MMU: 16-bit ASID 44-bit PA TCR_EL1=b5183519
    cpu0: MPIDR=80000000
    cpu0: MIDR=411fd080 Cortex-A72 r1p0
    cpu0: CWG=4 ERG=4 Dminline=4 Iminline=4 PIPT
    cpu0: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1
    cpu0: L1 Icache 48K linesz=64 set/way=256/3
    cpu0: L1 Dcache 32K linesz=64 set/way=256/2
    cpu0: L2 Unified 1024K linesz=64 set/way=1024/16
    Display set to R5
    Loading IFS...decompressing...done
    cpu1: MPIDR=80000001
    cpu1: MIDR=411fd080 Cortex-A72 r1p0
    cpu1: CWG=4 ERG=4 Dminline=4 Iminline=4 PIPT
    cpu1: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1
    cpu1: L1 Icache 48K linesz=64 set/way=256/3
    cpu1: L1 Dcache 32K linesz=64 set/way=256/2
    cpu1: L2 Unified 1024K linesz=64 set/way=1024/16

    System page at phys:0000000080011000 user:ffffff8040254000 kern:ffffff8040251000
    Starting next program at vffffff8060086e10

    Shutdown[0,0] S/C/F=11/1/11 C/D=ffffff8060045028/ffffff80600f7698 state(4c00)= now lock
    QNX Version 7.1.0 Release 2020/10/14-19:36:22EDT KSB:0000000000000000
    $URL: svn.ott.qnx.com/.../timestamp.c $
    WARNING: Too early for per-cpu data
    aarch64le context[ffffff80600f8790]:
    0000: ffffff808000c030 0000000000000054 aa000000f9000000 0000000000000000
    0020: 0000000000000000 000000000000001c 0000000000000000 ffffff808000affc
    0040: 0000000001010101 ffffff8060079fc0 0101010101010101 0000000000000005
    0060: ffffff806006efe8 ffffff8060079fc0 ffffff8060122020 0000000000000000
    0080: ffffff80600f1c28 0000000000000040 ffffff80600f7000 ffffff808000c000
    00a0: 0000000000080fff 00000000000fffff ffffff80600f70c0 000000000003ffff
    00c0: ffffff808000b400 ffffff8060118d80 0000000000080000 0000000000000080
    00e0: 0000000000080000 ffffff80600f88a0 ffffff80600762fc ffffff80600f88a0
    0100: ffffff8060076238 00000000600003c5
    instruction[ffffff8060076238]:
    53 08 00 f9 d3 26 00 f9 61 01 80 52 60 06 40 f9 01 00 00 39 60 06 40 f9 61 26
    stack[ffffff80600f88a0]:
    0000:>ffffff80600f8910 ffffff8060080000 ffffff80402515b0 ffffff804025148c
    0020: ffffff80600f52d0 ffffff80402517d0 ffffff8040251468 ffffff806007ffc0
    0040: ffffff80600f8990 ffffff8060126068 ffffff80600f0020 ffffff80600f7000
    0060: 00000000ffffffff 0000000080000000 ffffff80600f8920 ffffff80600b40cc

  • Hi Hongrun,

    In the Uboot log, a log indicating that the "Reading on-board EEPROM at 0x50 failed -1".   This is somewhat expected as the EEPROM is likely not present on the customized board.

    This does however lead to some questions:

    1. Have any code modifications been made to Uboot to account for differences between TI EVM and Custom board?
    2. Have any code modificaitons been made to Linux to account for differences between TI EVM and Custom board
    3. Have any code modifications been made to QNX-IFS / startup to account for differences between TI EVM and Custom board?

    For any code modifications in (1) and (2), these need to be reviewed / accounted for in (3).

    TI recommendation is to work with QNX on BSP customization.   If intent is to design an in-house BSP, and/or proceed with this BSP modification effort for proof of concept, the following steps should be followed:

    • Removed all drivers from build file, and enable full verbosity on startup (ie prcnto-smp-instr -vvvvvv)
    • Review all TI EVM vs Custom Board deltas and ensure they are accounted for in BSP 
    • If errors are still being seen, add kprintfs to isolate location, and debug from there.

    Regarding the error being seen, this is likely due to a board delta that has not been accounted for in the QNX BSP which is designed to run on the TI EVM.

    One suggestion is to check is the size of DDR, BSP for TI EVM will be set to expect 4G, looks like custom board is 2G from uboot logs, see init_raminfo.c in BSP.

    Regards,

    kb

  • Hi  KB,

    After DDR capacity config is modified to 2G, QNX command prompt  can reach. Thank you for that .

    For SDMMC driver,  on the customized board,  SD electric circurt is modified. VDD and signal pull-up voltage is 3.3V.  sdmmc module in BSP  has been modifyed  for customized board, but  sdmmc driver is still fail.  slog2info log is below:


    J7EVM# slog2info
    Jan 01 00:00:00.015 random.5 low* 0 qcrypto: loading configuration file '/etc/qcrypto.conf' [qcrypto_commo
    Jan 01 00:00:00.016 random.5..0 slog* 700 Random is using the Fortuna PRNG
    Jan 01 00:00:00.020 random.5 low 0 qcrypto: 'openssl' plugin loaded [qcrypto_plugins.c(354)]
    Jan 01 00:00:00.020 random.5..0 slog 700 Selecting timer as an entropy source
    Jan 01 00:00:00.020 random.5..0 slog 700 Registered path names
    Jan 01 00:00:00.020 random.5..0 slog 700 random: starting resmgr
    Jan 01 00:00:00.021 random.5..0 slog 700 random: Daemonizing the process
    Jan 01 00:00:00.035 devb_sdmmc_am65x.9 slog* 1800 devb-sdmmc-am65x 1.00A (Mar 19 2021 04:11:18)
    Jan 01 00:00:00.035 devb_sdmmc_am65x.9 slog 0 libcam.so (Jun 22 2020 21:33:15) bver 7010003
    Jan 01 00:00:00.036 devb_sdmmc_am65x.9 slog 1800 sdio_cd: insertion path 0, cd state 0x1
    Jan 01 00:00:00.037 devb_sdmmc_am65x.10 slog* 1800 devb-sdmmc-am65x 1.00A (Mar 19 2021 04:11:18)
    Jan 01 00:00:00.038 devb_sdmmc_am65x.10 slog 0 libcam.so (Jun 22 2020 21:33:15) bver 7010003
    Jan 01 00:00:00.039 devb_sdmmc_am65x.10 slog 1800 sdio_cd: insertion path 0, cd state 0x1
    Jan 01 00:00:00.039 devb_sdmmc_am65x.10 slog 1800 tca6424_read: i2c read failed(5).
    Jan 01 00:00:00.039 devb_sdmmc_am65x.10 slog 1800 tca6424_read: i2c read failed(5).
    Jan 01 00:00:00.041 iopkt.11 main_buffer* 0 tcpip starting
    Jan 01 00:00:00.041 iopkt.11 main_buffer 0 smmu support is disabled
    Jan 01 00:00:00.042 iopkt.11 main_buffer 0 initializing IPsec...
    Jan 01 00:00:00.042 iopkt.11 main_buffer 0 done

    Jan 01 00:00:00.043 iopkt.11 main_buffer 0 IPsec: Initialized Security Association Processing.

    Jan 01 00:00:00.045 devb_sdmmc_am65x.10 slog 1800 sdhci_signal_voltage: switch 1.8V failure
    Jan 01 00:00:00.048 io_usb_otg.12300 slog* 0 main(453)[tid:1]: io-usb-otg (Jun 13 2020 20:10:17) args: -d xhci iopo0,irq=136,iosize=65536,nousb3
    Jan 01 00:00:00.051 io_usb_otg.12300 slog 0 xhci_init: Initialiaing with sever version: 2
    Jan 01 00:00:00.051 io_usb_otg.12300 slog 0 xhci_controller_init(2655): devu-hcd-xhci.so (Jun 13 2020 19:55:19):
    Jan 01 00:00:00.052 io_usb_otg.12300 slog 8 usb_enum_port(94)[tid:1]: busno 0, parent -1, port 0, High speed
    Jan 01 00:00:00.052 io_usb_otg.12300 slog 11 usb_client_descriptor_get(198)[tid:1]: (type 1, index 0, length 8)
    Jan 01 00:00:00.052 io_usb_otg.12300 slog 12 usb_device_set_address(245)[tid:1]: b:0 devno 0
    Jan 01 00:00:00.052 io_usb_otg.12300 slog 11 usb_client_descriptor_get(198)[tid:1]: (type 1, index 0, length 18)
    Jan 01 00:00:00.052 io_usb_otg.12300 slog 11 usb_client_descriptor_get(198)[tid:1]: (type 2, index 0, length 9)
    Jan 01 00:00:00.052 io_usb_otg.12300 slog 11 usb_client_descriptor_get(198)[tid:1]: (type 2, index 0, length 25)
    Jan 01 00:00:00.053 io_usb_otg.12300 slog 8 usb_enum_port(141)[tid:1]: vid 0x0000, did 0x0000 enumerated(busno 0,
    Jan 01 00:00:00.053 io_usb_otg.12300 slog 11 hub_state_inserted(569)[tid:1]: bdentry 0, dentry 0 0
    Jan 01 00:00:00.053 io_usb_otg.12300 slog 13 hub_configuration_enable(263)[tid:1]: 1
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 MMC CID:
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 MID 0x11, OID 0x0, PNM 032GB4
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 PRV 0x4, PSN 0xb803fb3, MDT 2-2019
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 MMC CSD:
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 CSD_STRUCTURE 3, SPEC_VERS 4, CCC 0x8f5
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 TAAC 39, NSAC 0, TRAN_SPEED 50
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 C_SIZE 4095, C_SIZE_MULT 7
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 READ_BL_LEN 9, WRITE_BL_LEN 9
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 ERASE GRP_SIZE 31, GRP_MULT 31, SIZE 0
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 blksz 512, sectors 2097152, dtr 25000000
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 MMC EXT CSD:
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 DEVICE_TYPE 0x57, EXT_CSD_REV 8
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 SEC_COUNT 61071360, dtr 200000000
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 HC_ERASE_GRP_SIZE 8, HC_WP_GRP_SIZE 1
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 STROBE 0x1, BKOPS_EN 0x0
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 Driver type: 0x0
    Jan 01 00:00:00.118 devb_sdmmc_am65x.9 slog 1800 CFG: Timing HS200, DTR 200000000, Bus Width 8 bit

    Jan 01 00:00:00.119 devb_sdmmc_am65x.9 slog 100 cam-disk.so (Jun 22 2020 21:33:17)
    Jan 01 00:00:00.155 io_usb_otg.12300 slog 0 xhci_init: Initialiaing with sever version: 2
    Jan 01 00:00:00.155 io_usb_otg.12300 slog 0 xhci_controller_init(2655): devu-hcd-xhci.so (Jun 13 2020 19:55:19):
    Jan 01 00:00:00.155 io_usb_otg.12300 slog 8 usb_enum_port(94)[tid:1]: busno 1, parent -1, port 0, High speed
    Jan 01 00:00:00.155 io_usb_otg.12300 slog 11 usb_client_descriptor_get(198)[tid:1]: (type 1, index 0, length 8)
    Jan 01 00:00:00.155 io_usb_otg.12300 slog 12 usb_device_set_address(245)[tid:1]: b:1 devno 0
    Jan 01 00:00:00.155 io_usb_otg.12300 slog 11 usb_client_descriptor_get(198)[tid:1]: (type 1, index 0, length 18)
    Jan 01 00:00:00.156 io_usb_otg.12300 slog 11 usb_client_descriptor_get(198)[tid:1]: (type 2, index 0, length 9)
    Jan 01 00:00:00.156 io_usb_otg.12300 slog 11 usb_client_descriptor_get(198)[tid:1]: (type 2, index 0, length 25)
    Jan 01 00:00:00.156 io_usb_otg.12300 slog 8 usb_enum_port(141)[tid:1]: vid 0x0000, did 0x0000 enumerated(busno 1,
    Jan 01 00:00:00.156 io_usb_otg.12300 slog 11 hub_state_inserted(569)[tid:1]: bdentry 0, dentry 0 0
    Jan 01 00:00:00.156 io_usb_otg.12300 slog 13 hub_configuration_enable(263)[tid:1]: 1
    Jan 01 00:00:00.258 io_usb_otg.12300 slog 0 usbh_timeout_init(203)[tid:1]: Complete
    Jan 01 00:00:00.264 io_usb_otg.12300 slog 8 usb_enum_port_extract(172)[tid:7]: (busno 0, pdevno 0, portno 1)
    Jan 01 00:00:00.264 io_usb_otg.12300 slog 8 usb_enum_port_extract(192)[tid:7]: status (2)
    Jan 01 00:00:00.270 io_usb_otg.12300 slog 8 usb_enum_port_extract(172)[tid:7]: (busno 1, pdevno 0, portno 1)
    Jan 01 00:00:00.270 io_usb_otg.12300 slog 8 usb_enum_port_extract(192)[tid:7]: status (2)
    Jan 01 00:00:01.060 devb_sdmmc_am65x.10 slog 1800 sdio_wait_cmd: TIMEOUT 1000ms (errno 260) CMD 0, flgs 0x1, arg 0x0, bl
    Jan 01 00:00:01.663 devb_sdmmc_am65x.10 slog 1800 tca6424_read: i2c read failed(5).
    Jan 01 00:00:01.663 devb_sdmmc_am65x.10 slog 1800 tca6424_read: i2c read failed(5).
    Jan 01 00:00:01.667 devb_sdmmc_am65x.10 slog 1800 sdhci_signal_voltage: switch 1.8V failure
    Jan 01 00:00:02.680 devb_sdmmc_am65x.10 slog 1800 sdio_wait_cmd: TIMEOUT 1000ms (errno 260) CMD 0, flgs 0x1, arg 0x0, bl
    Jan 01 00:00:03.283 devb_sdmmc_am65x.10 slog 1800 tca6424_read: i2c read failed(5).
    Jan 01 00:00:03.283 devb_sdmmc_am65x.10 slog 1800 tca6424_read: i2c read failed(5).
    Jan 01 00:00:03.287 devb_sdmmc_am65x.10 slog 1800 sdhci_signal_voltage: switch 1.8V failure
    Jan 01 00:00:04.300 devb_sdmmc_am65x.10 slog 1800 sdio_wait_cmd: TIMEOUT 1000ms (errno 260) CMD 0, flgs 0x1, arg 0x0, bl
    Jan 01 00:00:04.903 devb_sdmmc_am65x.10 slog 1800 tca6424_read: i2c read failed(5).
    Jan 01 00:00:04.903 devb_sdmmc_am65x.10 slog 1800 tca6424_read: i2c read failed(5).
    Jan 01 00:00:04.907 devb_sdmmc_am65x.10 slog 1800 sdhci_signal_voltage: switch 1.8V failure
    Jan 01 00:00:05.920 devb_sdmmc_am65x.10 slog 1800 sdio_wait_cmd: TIMEOUT 1000ms (errno 260) CMD 0, flgs 0x1, arg 0x0, bl
    Jan 01 00:00:06.523 devb_sdmmc_am65x.10 slog 1800 tca6424_read: i2c read failed(5).
    Jan 01 00:00:06.523 devb_sdmmc_am65x.10 slog 1800 sdio_cd: Unsupported card inserted

     

  • Hi Hongrun,

    From the logs provided, it looks like the SD driver is attempting to change to 1.8V, by setting a GPIO expander (tca6424).  The GPIO expander is  present on the TI EVM board, but is likely not present on the custom board, and as such the I2C read is failing.  This code would need to be modified.

    Note, that typing "use devb-sdmmc-am65x" at command prompt will show command line options available for the sd driver.  One additional suggestion, for testing,  is to set the timing desired explicitly:

    devb-sdmmc-am65x blk noatime,cache=8M,automount=@/proc/boot/automount cam cache,async,quiet,pnp sdio addr=0x04fb0000,irq=36,timing=xxx,bs=sscfg=0x8000:ldo=0x600000^117:pwrdev=/dev/i2c0 dos exe=all disk name=sd1

    Regards,

    kb

  • Thank you for you help. The issue is solved by setting the desired timing=hs, and deleting ldo=0x600000^117:pwrdev=/dev/i2c0 .