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.

Linux/AM5728: eMMC configuration issue

Part Number: AM5728
Other Parts Discussed in Thread: BEAGLEBOARD-X15

Tool/software: Linux

I'm using am5728 processor sdk linux 5.02 where u-boot is 2018.01

Where sd card is at mmc1 & emmc is at mmc2.

modified config gile & am57xx_evm.h file as per our requirement Here they are

1351.am57xx_evm_defconfig.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# Automatically generated file; DO NOT EDIT.
# U-Boot 2018.01 Configuration
#
CONFIG_CREATE_ARCH_SYMLINK=y
# CONFIG_ARC is not set
CONFIG_ARM=y
# CONFIG_M68K is not set
# CONFIG_MICROBLAZE is not set
# CONFIG_MIPS is not set
# CONFIG_NDS32 is not set
# CONFIG_NIOS2 is not set
# CONFIG_PPC is not set
# CONFIG_SANDBOX is not set
# CONFIG_SH is not set
# CONFIG_X86 is not set
# CONFIG_XTENSA is not set
CONFIG_SYS_ARCH="arm"
CONFIG_SYS_CPU="armv7"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

4377.am57xx_evm.h

sd boot works as expected

but emmc interface showing only 1-bit bus mode.

command output at uboot prompt are

=> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device
=> mmcinfo 
Device: OMAP SD/MMC
Manufacturer ID: 9d
OEM: 101
Name: IS004 
Bus Speed: 48000000
Mode : MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 1-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 3.6 GiB WRREL
Boot Capacity: 2 MiB ENH
RPMB Capacity: 512 KiB ENH

Here is full boot log

mmc-boot-log.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
U-Boot SPL 2018.01 (May 27 2019 - 17:18:07)
DRA752-GP ES2.0
Trying to boot from MMC1
omap_hsmmc_get_pinctrl_by_mode() --> mode : default node : 0xc38 mmc->dev:mmc@4809c000
fail to find default mode FDT_ERR_NOTFOUND
no pinctrl state for default mode
omap_hsmmc_get_pinctrl_by_mode() --> mode : default node : 0xe24 mmc->dev:mmc@480b4000
fail to find default mode FDT_ERR_NOTFOUND
no pinctrl state for default mode
*** Warning - bad CRC, using default environment
U-Boot 2018.01 (May 27 2019 - 17:18:07 +0530)
CPU : DRA752-GP ES2.0
Model: TI AM5728 BeagleBoard-X15 rev C
Board: BeagleBoard X15 REV
DRAM: 1 GiB
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Shows this error

mmcblk1boot1: error -84 transferring data, sector 3968, nr 8, cmd response 0x900, card status 0x0

Here are my device tree files

am57xx-beagle-x15-revc.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
* Copyright (C) 2014-2017 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include "am57xx-beagle-x15-common.dtsi"
#include "dra74x-mmc-iodelay.dtsi"
/ {
model = "TI AM5728 BeagleBoard-X15 rev C";
};
&tpd12s015 {
gpios = <&gpio7 10 GPIO_ACTIVE_HIGH>, /* gpio7_10, CT CP HPD */
<&gpio2 30 GPIO_ACTIVE_HIGH>, /* gpio2_30, LS OE */
<&gpio7 12 GPIO_ACTIVE_HIGH>; /* gpio7_12/sp1_cs2, HPD */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

5466.am57xx-beagle-x15-common.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
* Copyright (C) 2014-2016 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
#include "dra74x.dtsi"
#include "am57xx-commercial-grade.dtsi"
#include "dra74x-mmc-iodelay.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
compatible = "ti,am572x-beagle-x15", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";
aliases {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hello,

    In Linux, could you please set the bus-width to 1 in the am57xx-beagle-x15-common.dtsi? Based on the logs, eMMC is not able to switch to 8 or 4 bit.
    [ 2.317556] mmc1: switch to bus width 8 failed
    [ 2.323509] mmc1: switch to bus width 4 failed

    Also, please probe the clock and the data pin of the eMMC and share the screenshot.

    Regards,
    Krunal
  • I've connected external pull ups.
    I've set all io voltage to 3.3v while in beagleboard-x15 this interface operates at 1.8v.
    So do i'need to change anything.
  • Hello,

    I am wondering if you could please confirm if the dts changes you provided above are also reflected in Uboot. Also, does your schematic look like the following: 

    Regards,
    Krunal

  • Yes,Mine looks like the same i'm using device tree and config defined in first post.

    in PCBA i've connected all the pull ups which connects but shows only 1-bit interface.

    in PCBB those pull ups are not connected which shows Card did not respond to voltage select bits.

    In both cases u-boot images are same.

    I wanted to bring up PCBB without pull ups so it can go upto higher speed ranges.

  • Hello,

    In the file <u-boot>/arch/arm/dts/dra74x-mmc-iodelay.dtsi, I am wondering if you have made the necessary pin muxing changes for your board. Also, in the TI dts file <uboot>/arch/arm/dts/am57xx-beagle-x15-revc.dts, I see the following entry for mmc2: 

    &mmc2 {
    pinctrl-names = "default", "hs", "ddr_1_8v";
    pinctrl-0 = <&mmc2_pins_default>;
    pinctrl-1 = <&mmc2_pins_hs>;
    pinctrl-2 = <&mmc2_pins_ddr_rev20>;
    };

    Could you please why you have defined pinctrl-3 and pinctrl-4 in your dts file?

    Regards,
    Krunal

  • Without those entries u-boot shows warning that no pinctrl defined 

  • Hello,

    As mentioned in the following thread, please ignore those warnings. With regards to your Hardware, could you please check your eMMC pins such as reset, clock, power and data pins to ensure they are stable. If possible, please share the oscilloscope captures of the clock and see if the frequency is changing.  

    Based on the schematic checklist, section "2.12 MMC" recommends the following:

    Include a 22 Ω series resistor on MMCx_CLK (as close to the processor as possible). This signal is used as an input on read transactions and the resistor eliminates possible signal reflections on the signal that can cause false clock transitions.

    Regards,
    Krunal

  • Hello,

    We have not connected  22 Ω resister in series on CLK line.

    But we are getting clk and cmd signals on the line.Here is the sample for clock line.

    I've set CONFIG_DEFAULT_DEVICE_TREE="am57xx-beagle-x15-revc" & CONFIG_OF_LIST="am57xx-beagle-x15-revc" in u-boot config file 

  • Hello,

    I am wondering if you are observing the same issue on multiple boards or just this revision. Also, with regards to your custom board, please ensure the pin muxing is setup correctly. For example, one of the pins is defined as follows: DRA7XX_CORE_IOPAD(0x349c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */

    In the TRM (Chapter 18.5.2 CTRL_MODULE_CORE Registers), the pad config register for gpmc_a23 is at address 0x4a00349c. After reading the address in Uboot: md 0x4a00349c 0x1, I get 0x60001 and it confirms the appropriate pin is selected. Please ensure all the eMMC pins are present.

    Regards,
    Krunal

  • Hello,

    I've checked all the pins which i'm configuring in pinmux here is the log.

    => md 0x4a00349c 0x1
    4a00349c: 00060001                               ....
    => md 0x4a0034b0 0x1
    4a0034b0: 00060001                               ....
    => md 0x4a0034a0 0x1
    4a0034a0: 00070001                               ....
    => md 0x4a0034a4 0x1
    4a0034a4: 00070001                               ....
    => md 0x4a0034a8 0x1
    4a0034a8: 00070001                               ....
    => md 0x4a0034ac 0x1
    4a0034ac: 00070001                               ....
    => md 0x4a00348c 0x1
    4a00348c: 00070001                               ....
    => md 0x4a003490 0x1
    4a003490: 00070001                               ....
    => md 0x4a003494 0x1
    4a003494: 00070001                               ....
    => md 0x4a003498 0x1
    4a003498: 00070001                               ....

    Where 70001 means Pin function is proper selected but its internal pull ups are disabled.

    While i'm enabling it in pinmux.

  • Hello,

    I am seeing the value 60001 on my setup and I am wondering if you have modified the file dra74x-mmc-iodelay.dtsi. As a debug exercise, I am wondering if you could please try using the TI's MLO and u-boot.img. Since the pin muxing is the same, I just wanted to see if the eMMC issues still exists. 

    Regards,
    Krunal