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.

AM3352: eMMC problems in U-boot

Part Number: AM3352


Hi!

Im have a problem when I want to boot my am3352 based custom card from emmc. I can read the emmc in Linux so after booting from SD I prepared the emmc and created a boot partition and copied MLO and u-boot from my SD-card to it. But when booting I get this:

U-Boot SPL 2020.07-rc1-00146-gc693f212c5-dirty (May 14 2020 - 13:27:20 +0200)
Trying to boot from MMC2
spl_load_image_fat_os: error reading image args, err - -2


U-Boot 2020.07-rc1-00146-gc693f212c5-dirty (May 14 2020 - 13:27:20 +0200)

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0
mmc_init_stream: timedout waiting for cc!
omap_hsmmc_send_cmd : timeout: No status update
mmc_init_stream: timedout waiting for cc!
omap_hsmmc_send_cmd : timeout: No status update

Its, sort of, the same behaviour if I boot from SD-card and run mmc dev 1 in u-boot.

=> mmc list
OMAP SD/MMC: 0 (SD)
OMAP SD/MMC: 1
=> mmc dev 1
mmc_init_stream: timedout waiting for cc!
omap_hsmmc_send_cmd : timeout: No status update

 

Selection of mux.c in u-boot:

static struct module_pin_mux mmc1_pin_mux[] = {
        {OFFSET(gpmc_ad7), (MODE(1) | RXACTIVE | PULLUP_EN)},   /* MMC1_DAT7 */
        {OFFSET(gpmc_ad6), (MODE(1) | RXACTIVE | PULLUP_EN)},   /* MMC1_DAT6 */
        {OFFSET(gpmc_ad5), (MODE(1) | RXACTIVE | PULLUP_EN)},   /* MMC1_DAT5 */
        {OFFSET(gpmc_ad4), (MODE(1) | RXACTIVE | PULLUP_EN)},   /* MMC1_DAT4 */
        {OFFSET(gpmc_ad3), (MODE(1) | RXACTIVE | PULLUP_EN)},   /* MMC1_DAT3 */
        {OFFSET(gpmc_ad2), (MODE(1) | RXACTIVE | PULLUP_EN)},   /* MMC1_DAT2 */
        {OFFSET(gpmc_ad1), (MODE(1) | RXACTIVE | PULLUP_EN)},   /* MMC1_DAT1 */
        {OFFSET(gpmc_ad0), (MODE(1) | RXACTIVE | PULLUP_EN)},   /* MMC1_DAT0 */
        {OFFSET(gpmc_csn1), (MODE(2) | RXACTIVE | PULLUP_EN)},  /* MMC1_CLK */
        {OFFSET(gpmc_csn2), (MODE(2) | RXACTIVE | PULLUP_EN)},  /* MMC1_CMD */
        {-1},
};

 

Any ideas what Im doing wrong?

 

  • Linus,

    looks like you are using upstream U-Boot. Although this *should* work for many cases especially for a device like AM335x where support is quite mature there could be an issue related to an E2E post made earlier here: https://e2e.ti.com/support/processors/f/791/t/874943

    In this spirit can you try the TI U-Boot from our official AM335x Linux SDK to see if this eliminates your problem. If so I'd still be eager to figure out why upstream U-Boot would be failing so we can fix it as needed.

    Linus Brandett said:
    I can read the emmc in Linux so after booting from SD

    This is a good data point.

    Also can you capture and post the contents of your /sys/kernel/debug/mmc0/ios and /sys/kernel/debug/mmc1/ios sysfw nodes here like in my example:

    root@am335x-evm:~# cat /sys/kernel/debug/mmc0/ios
    clock:		50000000 Hz
    vdd:		21 (3.3 ~ 3.4 V)
    bus mode:	2 (push-pull)
    chip select:	0 (don't care)
    power mode:	2 (on)
    bus width:	2 (4 bits)
    timing spec:	2 (sd high-speed)
    signal voltage:	0 (3.30 V)
    driver type:	0 (driver type B)
    root@am335x-evm:~# cat /sys/kernel/debug/mmc1/ios
    clock:		52000000 Hz
    vdd:		21 (3.3 ~ 3.4 V)
    bus mode:	2 (push-pull)
    chip select:	0 (don't care)
    power mode:	2 (on)
    bus width:	3 (8 bits)
    timing spec:	1 (mmc high-speed)
    signal voltage:	0 (3.30 V)
    driver type:	0 (driver type B)

    Regards, Andreas

  • Andreas,

    Thanks for your reply. This is the output of the commands you requested (+ a uname -r :) ):

    root@palette-gateway:~# cat /sys/kernel/debug/mmc0/ios
    clock:          50000000 Hz
    vdd:            21 (3.3 ~ 3.4 V)
    bus mode:       2 (push-pull)
    chip select:    0 (don't care)
    power mode:     2 (on)
    bus width:      2 (4 bits)
    timing spec:    2 (sd high-speed)
    signal voltage: 0 (3.30 V)
    driver type:    0 (driver type B)
    root@palette-gateway:~# cat /sys/kernel/debug/mmc1/ios
    clock:          52000000 Hz
    vdd:            21 (3.3 ~ 3.4 V)
    bus mode:       2 (push-pull)
    chip select:    0 (don't care)
    power mode:     2 (on)
    bus width:      3 (8 bits)
    timing spec:    1 (mmc high-speed)
    signal voltage: 0 (3.30 V)
    driver type:    0 (driver type B)
    root@palette-gateway:~# uname -r
    4.19.94-dirty

    Ill have a look at the thread you linked to, just need the feed the kids :).

    Best regards,

    Linus

  • Andreas,

    I tested the u-boot from the SDK and with my board.c and mux.c I got the same result. But, I made a quick hack of the board.c and mux.c from board/ti/am335x/

    and when u-boot starts I can switch mmc to dev 1 (emmc). So I guess it works :).

    Is there any configs or similiar that I can have missed in my original board.c / defconfig? Ill have a look and compare .configs and see if there is something obvious.

    Thanks!

  • Linus,

    ok that log looks exactly what I see on my BBB board (which works) so that's good.

    Also as per your initial post, it seems like you can boot from eMMC all the way to U-Boot prompt (the first log you posted), just not beyond that (and can't access eMMC any more once you stop the autoboot sequence)?

    If so that means SPL can load U-Boot from eMMC, and the driver at that stage is working. If that's the case there might be something U-Boot DTS related thats not right (depending on what your .config looks like, and how you have done the board port in terms of DTS vs. platform data).

    Regards, Andreas