Hi All,
I'm working on a T1042 based custom board that has an onboard eMMC (8GB, GLS85VM1008A-M-I-LFWE-ND202) connected to eSDHC port. I have successfully booted uboot 2019.07 (DNEX) from NOR flash on my board.
I'm facing an issue with mmc command set, when I issue an 'mmc list' command once the board boots up it lists " FSL_SDHC: 0 " and 'mmc info' lists the details of the onboard eMMC.
The 'mmc read' command works fine for me without any error, but when I issue an 'mmc write' command it returns error "0 blocks written: ERROR".
Why is it so? Am I doing something wrong?
Another observation is that, any mmc command after issuing 'mmc dev 0 0' prints nothing on the console, but 'mmc list' still lists the " FSL_SDHC: 0 ".
Thanks in advance for all your support.
Regards,
Amarnath MB
Please find the below u-boot log for detail (enabled CONFIG_MMC_TRACE).
U-Boot 2019.07 (Dec 21 2019 - 17:10:04 +0530)CPU0: T1042E, Version: 1.1, (0x85280211)Core: e5500, Version: 2.1, (0x80241021)Clock Configuration: CPU0:1200 MHz, CPU1:1200 MHz, CPU2:1200 MHz, CPU3:1200 MHz, CCB:500 MHz, DDR:533.333 MHz (1066.667 MT/s data rate) (Asynchronous), IFC:250 MHz QE :250 MHz FMAN1: 500 MHz QMAN: 250 MHz PME: 250 MHzL1: D-cache 32 KiB enabled I-cache 32 KiB enabledReset Configuration Word (RCW): 00000000: 0a10000c 0c000000 00000000 00000000 00000010: 00000002 00400002 ec027000 01000000 00000020: 00000000 00010001 60000000 00028000 00000030: 00000200 00165005 00000000 00000000Board: VPX-135I2C: readyDRAM: Initializing DDR....Configuring DDR for 1066.667 MT/s data rateSetting DDR register values...2 GiB left unmappedSDRAM test phase 1:SDRAM test phase 2:SDRAM test passed.2 GiB (DDR4, 64-bit, CL=12, ECC on)Flash: 512 MiBL2: 256 KiB enabledCorenet Platform Cache: 256 KiB enabledUsing SERDES1 Protocol: 0 (0x0)Enabling all cpusMMC: FSL_SDHC: 0Loading User and Factory Environments...*** Warning - FACTORY ENVIRONMENT bad CRC, using default factory environmentFirmware 'Microcode version 0.0.1 for T1040 r1.0' for 1040 V1.0QE: uploading microcode 'Microcode for T1040 r1.0' version 0.0.1Waiting 1000 ms on enumerating the PCIe bus...PCIe1: Root Complex, @ 5 Gbps x4 gen2, regs @ 0xfe240000PCIe1: Bus 00 - 01PCIe2: Root Complex, @ 2.5 Gbps x4 gen1, regs @ 0xfe250000 03:00.0 - 10e3:8114 - Bridge devicePCIe2: Bus 02 - 04In: serialOut: serialErr: serialSERDES Reference : 0x0Temperature init Done*** Warning - U-boot image is UpdatedNet: Initializing FmanFman1: Uploading microcode version 106.4.18Could not get PHY for FSL_MDIO0: addr 2Failed to connectCould not get PHY for FSL_MDIO0: addr 3Failed to connectFM1@DTSEC4, FM1@DTSEC5 [PRIME]POST vid PASSEDPOST i2c PASSEDPOST rtc Sun Feb 1 2020 00:00:00 :: PASSEDPOST ethernet FM1@DTSEC4 is not a known ethernetError: port FM1@DTSEC4 not registered with core -FAILEDPOST flash PASSEDPOST nvram PASSEDPOST temp Init DoneCore Temperature : 51'C :: PASSEDVPX-135 #VPX-135 #VPX-135 # mmc listFSL_SDHC: 0VPX-135 # mmc infoMSPL: mmc_initMSPL : mmc_start_init entryCMD_SEND:0 ARG 0x00000000 MMC_RSP_NONECMD_SEND:8 ARG 0x000001aa RET -110CMD_SEND:55 ARG 0x00000000 RET -110CMD_SEND:0 ARG 0x00000000 MMC_RSP_NONECMD_SEND:1 ARG 0x00000000 MMC_RSP_R3,4 0x40ff8080CMD_SEND:1 ARG 0x40300000 MMC_RSP_R3,4 0xc0ff8080MSPL : mmc_get_op_cond exitCMD_SEND:2 ARG 0x00000000 MMC_RSP_R2 0xf8010056 0x4d303130 0x42aad20f 0x60e15600 DUMPING DATA 000 - 56 00 01 f8 004 - 30 31 30 4d 008 - 0f d2 aa 42 012 - 00 56 e1 60CMD_SEND:3 ARG 0x00010000 MMC_RSP_R1,5,6,7 0x00000500CMD_SEND:9 ARG 0x00010000 MMC_RSP_R2 0xd07f0132 0x1f5903ff 0xffffffff 0x92400000 DUMPING DATA 000 - 32 01 7f d0 004 - ff 03 59 1f 008 - ff ff ff ff 012 - 00 00 40 92CMD_SEND:7 ARG 0x00010000 MMC_RSP_R1,5,6,7 0x00000700CMD_SEND:8 ARG 0x00000000 MMC_RSP_R1,5,6,7 0x00000900CMD_SEND:6 ARG 0x03b70200 MMC_RSP_R1b 0x00000900CMD_SEND:13 ARG 0x00010000 MMC_RSP_R1,5,6,7 0x00000900CURR STATE:4CMD_SEND:6 ARG 0x03b90100 MMC_RSP_R1b 0x00000900CMD_SEND:13 ARG 0x00010000 MMC_RSP_R1,5,6,7 0x00000900CURR STATE:4CMD_SEND:8 ARG 0x00000000 RET -70CMD_SEND:6 ARG 0x03b70000 MMC_RSP_R1b 0x00000900CMD_SEND:13 ARG 0x00010000 MMC_RSP_R1,5,6,7 0x00000900CURR STATE:4CMD_SEND:6 ARG 0x03b70100 MMC_RSP_R1b 0x00000900CMD_SEND:13 ARG 0x00010000 MMC_RSP_R1,5,6,7 0x00000900CURR STATE:4CMD_SEND:6 ARG 0x03b90100 MMC_RSP_R1b 0x00000900CMD_SEND:13 ARG 0x00010000 MMC_RSP_R1,5,6,7 0x00000900CURR STATE:4CMD_SEND:8 ARG 0x00000000 MMC_RSP_R1,5,6,7 0x00000900CMD_SEND:8 ARG 0x00000000 MMC_RSP_R1,5,6,7 0x00000900CMD_SEND:16 ARG 0x00000200 MMC_RSP_R1,5,6,7 0x00000900CMD_SEND:17 ARG 0x00000000 MMC_RSP_R1,5,6,7 0x00000900Device: FSL_SDHCManufacturer ID: f8OEM: 100Name: VM010Bus Speed: 52000000Mode: MMC High Speed (52MHz)Rd Block Len: 512MMC version 4.4.1High Capacity: YesCapacity: 7.3 GiBBus Width: 4-bitErase Group Size: 4 MiBHC WP Group Size: 8 MiBUser Capacity: 7.3 GiBBoot Capacity: 512 KiB ENHRPMB Capacity: 512 KiB ENHVPX-135 # mmc read 1000 0 1MSPL: mmc_initMMC read: dev # 0, block # 0, count 1 ... CMD_SEND:16 ARG 0x00000200 MMC_RSP_R1,5,6,7 0x00000900CMD_SEND:17 ARG 0x00000000 MMC_RSP_R1,5,6,7 0x000009001 blocks read: OKVPX-135 # md 100000001000: 00000000 00000000 00000000 00000000 ................00001010: 00000000 00000000 00000000 00000000 ................00001020: 00000000 00000000 00000000 00000000 ................00001030: 00000000 00000000 00000000 00000000 ................00001040: 00000000 00000000 00000000 00000000 ................00001050: 00000000 00000000 00000000 00000000 ................00001060: 00000000 00000000 00000000 00000000 ................00001070: 00000000 00000000 00000000 00000000 ................00001080: 00000000 00000000 00000000 00000000 ................00001090: 00000000 00000000 00000000 00000000 ................000010a0: 00000000 00000000 00000000 00000000 ................000010b0: 00000000 00000000 00000000 00000000 ................000010c0: 00000000 00000000 00000000 00000000 ................000010d0: 00000000 00000000 00000000 00000000 ................000010e0: 00000000 00000000 00000000 00000000 ................000010f0: 00000000 00000000 00000000 00000000 ................VPX-135 # mmc write 1000 0 1MSPL: mmc_initMMC write: dev # 0, block # 0, count 1 ... MSPL: mmc_get_devMSPL: mmc_initCMD_SEND:16 ARG 0x00000200 MMC_RSP_R1,5,6,7 0x00000900CMD_SEND:24 ARG 0x00000000 RET -110mmc write failed0 blocks written: ERRORVPX-135 # mmc listFSL_SDHC: 0 (eMMC)VPX-135 # mmc dev 0MSPL: mmc_initMSPL : mmc_start_init entryCMD_SEND:0 ARG 0x00000000 MMC_RSP_NONECMD_SEND:8 ARG 0x000001aa RET -110CMD_SEND:55 ARG 0x00000000 RET -110CMD_SEND:0 ARG 0x00000000 MMC_RSP_NONECMD_SEND:1 ARG 0x00000000 MMC_RSP_R3,4 0xc0ff8080MSPL : mmc_get_op_cond exitCMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110VPX-135 # mmc listFSL_SDHC: 0VPX-135 # mmc infoMSPL: mmc_initMSPL : mmc_start_init entryCMD_SEND:0 ARG 0x00000000 MMC_RSP_NONECMD_SEND:8 ARG 0x000001aa RET -110CMD_SEND:55 ARG 0x00000000 RET -110CMD_SEND:0 ARG 0x00000000 MMC_RSP_NONECMD_SEND:1 ARG 0x00000000 MMC_RSP_R3,4 0xc0ff8080MSPL : mmc_get_op_cond exitCMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110VPX-135 # mmc read 1000 0 1MSPL: mmc_initMSPL : mmc_start_init entryCMD_SEND:0 ARG 0x00000000 MMC_RSP_NONECMD_SEND:8 ARG 0x000001aa RET -110CMD_SEND:55 ARG 0x00000000 RET -110CMD_SEND:0 ARG 0x00000000 MMC_RSP_NONECMD_SEND:1 ARG 0x00000000 MMC_RSP_R3,4 0xc0ff8080MSPL : mmc_get_op_cond exitCMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110CMD_SEND:2 ARG 0x00000000 RET -110VPX-135 #