iMX8MN SD Card error switch to partitions #0, OK mmc1 is current device Error reading cluster

cancel
Showing results for 
Search instead for 
Did you mean: 

iMX8MN SD Card error switch to partitions #0, OK mmc1 is current device Error reading cluster

897 Views
decastro_25
Contributor II

Dear NXP Tech support,

 

We've developed a custom board with an i.MX8MNano QuadLite (MIMX8MN5DVTJZAA) and LPDDR4 from an ISSI (IS43LQ16256A-062BLI) with eMMC and SD card, PMIC PCA9450, etc.

It's our first prototype and the DDR test has been doing correctly, it's succeded, I attach here the the excel RPA, lpddr4_timming.c and also the log file during tests. Also the PMIC, USB, and serial port is working, instead we can't do the ddr stress calibration and test. We'd done it with the Config Tool for i.MX and the DDR Tool, I attach all files here to be easier to help us with the problem.

Next step that we've followed, it was inserted the lpddr4-timming.c in the u-boot corresponding folder and recompile with that yocto reciept and also the image receipt (we're using the imx-image-core), after succesful compiled, we've uploaded the wic file to our SD Card and turn on our device.

I attach here the output from the serial console: 

U-Boot 2020.04-5.4.24-2.1.0+g4979a99482 (Apr 25 2022 - 13:29:07 +0000)

CPU: i.MX8MNano QuadLite rev1.0 1500 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 44C
Reset cause: POR
Model: NXP i.MX8MNano LPDDR4 EVK board
DRAM: 2 GiB
tcpc_init: Can't find device id=0x52
setup_typec: tcpc port2 init failed, err=-19
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
Power supply on USB1
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... Run CMD11 1.8V switch
*** Warning - bad CRC, using default environment

[*]-Video Link 0Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22

[0] lcd-controller@32e00000, video
[1] dsi_controller@32e10000, video_bridge
[2] adv7535@3d, panel
Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22
In: serial
Out: serial
Err: serial

BuildInfo:
- ATF b0a00f2
- U-Boot 2020.04-5.4.24-2.1.0+g4979a99482

switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net: Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.

Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 2 1 0
switch to partitions #0, OK
mmc1 is current device
Error reading cluster
Unable to read file Image
Booting from net ...
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.
Could not get PHY for FEC0: addr 0
WARN: Cannot load the DT
u-boot-aqua=> mmc parp

Partition Map for MMC device 1 -- Partition Type: DOS

Part Start Sector Num Sectors UUID Type
Can't read partition table on 1:0
u-boot-aqua=>

Partition Map for MMC device 1 -- Partition Type: DOS

Part Start Sector Num Sectors UUID Type
Can't read partition table on 1:0
u-boot-aqua=> mmc dev 1
switch to partitions #0, OK
mmc1 is current device
u-boot-aqua=>
u-boot-aqua=> mmc rescan
u-boot-aqua=>
u-boot-aqua=> fX k⸮mmc 1
28021248 Image
41556 imx8mn-aqua.dtb
365072 tee.bin

3 file(s), 0 dir(s)

u-boot-aqua=>
28021248 Image
41556 imx8mn-aqua.dtb
365072 tee.bin

3 file(s), 0 dir(s)

u-boot-aqua=> run bootcmd
switch to partitions #0, OK
mmc1 is current device
Error reading cluster
Unable to read file Image
Booting from net ...
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.
Could not get PHY for FEC0: addr 0
WARN: Cannot load the DT
u-boot-aqua=>
u-boot-aqua=>

 

The main error is in the Image reading and also find the DT file. At the beginning the sd card doesn't read correctly but an after rescan it works. So maybe the problem was during the image generation, but we're don't really sure.

We discard layout problems becouse we've done the traces 50 ohms impedance and lenght matching, also has the DDR and the eMMC and as you can see the DDR is working correctly.

 

I'll be waiting your response asap, becouse we need to validate the software to start our production.

 

We're in touch and thanks in advance.

 

Best regards,

 

Jorge

 

 

Labels (1)
0 Kudos
2 Replies

881 Views
decastro_25
Contributor II

After some test yestarday I finally get the kernel working,  I attach here log from terminal:

 

U-Boot 2020.04-5.4.24-2.1.0+g4979a99482 (Apr 26 2022 - 14:24:28 +0000)

CPU: i.MX8MNano QuadLite rev1.0 1500 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 33C
Reset cause: POR
Model: NXP i.MX8MNano LPDDR4 EVK board
DRAM: 2 GiB

cpc_init: Can't find device id=0x52
setup_typec: tcpc port2 init failed, err=-19
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
Power supply on USB1
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... Run CMD11 1.8V switch
*** Warning - bad CRC, using default environment

[*]-Video Link 0Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22

[0] lcd-controller@32e00000, video
[1] dsi_controller@32e10000, video_bridge
[2] adv7535@3d, panel
Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22
In: serial
Out: serial
Err: serial

BuildInfo:
- ATF b0a00f2
- U-Boot 2020.04-5.4.24-2.1.0+g4979a99482

switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net: Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.

Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
28021248 bytes read in 1202 ms (22.2 MiB/s)
Booting from mmc ...
41556 bytes read in 17 ms (2.3 MiB/s)
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Using Device Tree in place at 0000000043000000, end 000000004300d253
Found /gpu@38000000 node
Modify /gpu@38000000:status disabled
Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22

Starting kernel ...

[ r lib80211: common routines for IEEE802.11 drivers[ 2.254200] usb_H [ 2.281734] i2c i2c-0: IMX I2C adapter registered
1152] adv7511 1-003d: 1-003d supply pvdd not found, using adv7511 1-003d: Probe failed. Remote port 'dsi_contregulator
ent dummy at 0x51 (-16)
[ 2.464538] at24: probe of 2-0050 failemx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[ 2.497673] imx_sec_ds 0000.bus:display-subsystem: bound 32e10000.dsi_controller (ops imxlator
[ 2.562210] imx-cpufrerj u using ADMA
[ 2.623518] mmc1: CQHCI version 5.10
[ 2.627 j
[ 2.686439] debugfs: Directory '30030000.sai' w "յ dai <-> 300c0000.easrc mapping ok
[ 2.720068] imx-wm8524 sounc@50/connector
[ 2.749705] OF: graph: no port node found
́/devices/platform/gpio-keys/input/input1
[ 2.784067] snvs_rtc 30370000.snvs:snvs-
ձ ѽ 0: Direct firmware load for regulatory.db failed with error -2
[ 2.817427] ALSA device list:
[ 2.820154] platform regulatory.0: Falling back to sysfs fallback fmmcblk1: mmc1:aaaa SN64G 59.5 GiB
[ 2.945564] mmcblk1: p1 p2
[ 2.994307] EXT4-fs (mmcblk1p2): recovery complete
[ 3.000677] EXT4-fs (mmC [ 3.149426] systemd[1]: System time before build time, advancing clock.
[ 3.170649] systemd[1]: systemd 243 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTS
Welcome to NXP i.MX Release Distro 5.4-zeus (zeus)!

[ 3.229172] systemd[1]: Set hostname to <imx8mn-wat[ 3.410447] systemd[1]: /lib/systemd/system/dbus.socket:5: ListenStream= references a path belo[ 3.449616] systemd[1]: /lib/systemd/system/rpcbind.socket:5: ListenStream= references a path below legacy d[ 3.556936] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.563763] systemd[1]: system-getty +ښ j OK ] Created slice system-getty.slice.
mX0;32m OK ] Created slice User and Session +ښ j OK ] Started Forward Password R…u t Remote File Systems.

j эѱ Compatibility Named Pipe.
T]Y]Y2 System...
Mounting Kernel Debug File System...
odes for the current kernel...
Configuration File System...
Starting Remount Root and Kernel File Systems...
[ 4.025677] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
Starting Apply Kernel Variables...
Starting udev Coldplug all Devices...
Starting Setup Virtual Console...
[ OK ] Started Journal Service.
[ OK ] Mounted Huge Pages File System.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Mounted Kernel Debug File System.
[ OK ] Mounted Temporary Directory (/tmp).
[ OK ] Started Create list of sta… nodes for the current kernel.
[ OK ] Mounted Kernel Configuration File System.
[ OK ] Started Apply Kernel Variables.
Starting Flush Journal to Persistent Storage...
[ 4.298270] systemd-journald[373]: Received client request to flush runtime journal.
Starting Create Static Device Nodes in /dev...
[ OK ] Started Flush Journal to Persistent Storage.
[ OK ] Started Create Static Device Nodes in /dev.
[ OK ] Reached target Local File Systems (Pre).
Mounting /var/volatile...
Starting udev Kernel Device Manager...
[ OK ] Mounted /var/volatile.
Starting Load/Save Random Seed...
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Started Create Volatile Files and Directories.
Starting Start Psplash Boot Screen...
Starting Network Service...
Starting Network Time Synchronization...
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Start Psplash Boot Screen.
[ OK ] Started Network Service.
Starting Network Name Resolution...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Initialization.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Reached target System Time Set.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started Daily apt download activities.
[ OK ] Reached target Timers.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Listening on dropbear.socket.
[ OK ] Listening on RPCbind Server Activation Socket.
[ OK ] Reached target Sockets.
Starting Telephony service...
[ OK ] Started Updates psplash to basic.
[ 5.085654] fec 30be0000.ethernet eth0: Unable to connect to phy
[ OK ] Started User Space Regulatory Firmware Loading.
Starting RPC Bind Service...
[ OK ] Started User Space SDMA Firmware Loading.
Starting Login Service...
[ OK ] Started TEE Supplicant.
[ 5.203668] imx-sdma 302c0000.dma-controller: loaded firmware 4.5
[ OK ] Started Network Name Resolution.
[ OK ] Started Network Time Service (one-shot ntpdate mode).
[ OK ] Started Login Service.
[ OK ] Created slice system-weston.slice.
[ OK ] Reached target Network.
[ OK ] Reached target Host and Network Name Lookups.
Starting Save/Restore Sound Card State...
Starting Avahi mDNS/DNS-SD Stack...
[ OK ] Started NFS status monitor for NFSv2/3 locking..
[ OK ] Started Update psplash to network.
j etc/rc.local Compatibility...
Starting Permit User Sessions...
[ OK ] Started Save/Restore Sound Card State.
See 'systemctl statusMK* х m[0m.
[ OK ] Created slice sy[ OK ] Started Serial Getty o[ OK ] Reached target Multi-User System.
Starting File System Check on /dev/mmcblk1p1...
Starting File System Check on /dev/mmcblk2p1...
Starting File System Check on /dev/mmcblk2p2...
Starting Update UTMP about System Runlevel Changes...
[ OK ] Created slice User Slice of UID 0.
% 0...
[ 6.371199] audit: type=1006 audit(1650445389.216:2): pid=686 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1
[ OK ] Started User Manager for UID 0.

 

As you can appreciate some characters doesn't look correct, and also the UBOOT Model and DDR are wrong values, probably I'm not changing the DTSI and DTS correctly for Uboot and kernel and maybe it generated some errors such doesn't look well terminal behaviour. Also after root the serial characters are not receive and send correctly, maybe it's a hardware fault from the USB-Serie converter cause it works from inputs to 3.3V and I think that IMX8MN generates 1.8V and maybe cause the problem.

 

So right now I'm near to get it working but I'd like some tech support about how to fix the DTS and DTSI in yocto enviroment for a different DDR size.

I've been researching about it and I've find the next:

 

memory@40000000 {
device_type = "memory";
reg = <0x0 0x40000000 0 0x80000000>;
};

resmem: reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;

/* global autoconfigured region for contiguous allocations */
linux,cma {
compatible = "shared-dma-pool";
reusable;
size = <0 0x28000000>;
alloc-ranges = <0 0x40000000 0 0x60000000>;
linux,cma-default;
};
};

 

How I should play with the DDR size and that parameters?

 

Best regards,

 

Jorge.

0 Kudos

765 Views
Vrushabh
Contributor I

 

Hello decastro_25,

We have developed the custom board with an i.MX8MNano QuadLite (MIMX8MN5CVTIZAA) and LPDDR4 from Micron-(MT53D512M16D1DS-046 IT) with emmc and sd card.
we have the yocto generated image "core-image-minimal-imx8mn-lpddr4-evk2-20220630063413.rootfs.wic.bz2"

we have flashed this image on to the emmc and sd-card
with the following command :

"bzcat core-image-minimal-imx8mn-lpddr4-evk2.wic.bz2 | sudo dd of=/dev/sda bs=1M conv=fsync"

we are facing isssue while booting from sd card mode : The bootloader is booting from sd card but when we tried to load the kernel image and dtb it is giving error.
the u-boot logs are as follows:

U-Boot SPL 2021.04-lf_v2021.04+gf7b43f8b4c (Mar 01 2022 - 07:31:56 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
SEC0: RNG instantiated
Normal Boot
WDT: Not found!
Trying to boot from BOOTROM
image offset 0x8000, pagesize 0x200, ivt offset 0x0
NOTICE: BL31: v2.4(release):lf-5.15.5-1.0.0-0-g05f788b9b
NOTICE: BL31: Built : 05:49:10, Mar 2 2022


U-Boot 2021.04-lf_v2021.04+gf7b43f8b4c (Mar 01 2022 - 07:31:56 +0000)

CPU: i.MX8MNano QuadLite rev1.0 1400 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 43C
Reset cause: POR
Model: NXP i.MX8MNano EVK board
DRAM: 992 MiB
tcpc_init: Can't find device id=0x52
setup_typec: tcpc port2 init failed, err=-19
tcpc_init: Can't find device id=0x50
setup_typec: tcpc port1 init failed, err=-19
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment

[*]-Video Link 0adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
mxs_video lcd-controller@32e00000: failed to get any video link display timings
probe video device failed, ret -22

[0] lcd-controller@32e00000, video
[1] dsi_controller@32e10000, video_bridge
[2] adv7535@3d, panel
adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
mxs_video lcd-controller@32e00000: failed to get any video link display timings
probe video device failed, ret -22
In: serial
Out: serial
Err: serial
SEC0: RNG instantiated

BuildInfo:
- ATF 05f788b

switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:
Warning: ethernet@30be0000 (eth0) using random MAC address - 52:8e:26:96:14:5a
eth0: ethernet@30be0000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
u-boot=> mmc list
FSL_SDHC: 1 (SD)
FSL_SDHC: 2
u-boot=> mmc info
Device: FSL_SDHC
Manufacturer ID: 3
OEM: 5344
Name: SC32G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
u-boot=> mmc dev 1
switch to partitions #0, OK
mmc1 is current device
u-boot=> fatls mmc 1:1
30792192 Image
42751 imx8mn-evk2.dtb
1971456 imx-boot-imx8mn-lpddr4-evk2-sd.bin-flash_evk

3 file(s), 0 dir(s)

u-boot=> ext4ls mmc 1:2
<DIR> 1024 .
<DIR> 1024 ..
<DIR> 12288 lost+found
43760580 core-image-minimal-imx8mn-lpddr4-evk2-20220630063413.rootfs.tar.bz2
<DIR> 3072 bin
<DIR> 1024 boot
<DIR> 1024 dev
<DIR> 3072 etc
<DIR> 1024 home
<DIR> 3072 lib
<DIR> 1024 media
<DIR> 1024 mnt
<DIR> 1024 proc
<DIR> 1024 run
<DIR> 3072 sbin
<DIR> 1024 srv
<DIR> 1024 sys
<DIR> 1024 tmp
<DIR> 1024 usr
<DIR> 1024 var
u-boot=> mmc part

Partition Map for MMC device 1 -- Partition Type: DOS

Part Start Sector Num Sectors UUID Type
1 16384 204800 d063a9a2-01 0e Boot
2 221184 614400 d063a9a2-02 83
u-boot=> fatload mmc 1:1 0x40480000 Image
Error reading cluster
** Unable to read file Image **
Failed to load 'Image'
u-boot=> fatload mmc 1:1 0x40480000 Image
** No partition table - mmc 1 **
Can't set block device
u-boot=> mmc part
## Unknown partition table type 0
u-boot=>

-->When we are booting from emmc mode ->u-boot from emmc and we tried to load the kernel image and dtb from sd-card ,it is able to load the image and kernel is booting up.

-->The issue seems to be same as you were facing , can you please tell how you have fixed the issue regarding sd card.

Thanks in advance.

 

Best Regards,
Vrushabh.

0 Kudos