Troubleshooting SD card, i.mx6ul custom board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Troubleshooting SD card, i.mx6ul custom board

2,337 Views
dluberger
Contributor V

I can get into the bootloader (u-boot) and the kernel seems to be loading fine, so i have to imagine the sd card itself is fine, and is connected correctly on the board, but I keep getting stuck on the message "Waiting for root device /dev/mmcblk0p2".

I know that's the right device and partition; the sd card is connected to sdhc port 1, and the file system is indeed on partition 2.  The only thing I can figure is that something must be messed up in my bootcfg resistors.

The 3 hardware boot port settings are: bootcfg4 = 0x00, bootcfg2 = 00000000 ; bootcfg1 = 01010010.  The latter sets the boot device as: SD card, fast boot, normal SD speed, SD power cycle enable via SD pad, and SD loopback clock source via SD pad.

I pretty much followed the i.mx6ull evk board schematic (I'm told the i.mx6ull is pin- and software-compatible with the i.mx6ul, aside from a couple of peripherals i'm not using).

Could it be something in the device tree related to the SD card? I didn't touch anything in the "&usdhc1" section of imx6ul-14x14-evk.dts

Labels (3)
0 Kudos
12 Replies

1,564 Views
igorpadykov
NXP Employee
NXP Employee

what exactly not working, could you attach full log. So, mfg tool finished successfully

to program sd, correct?


Best regards
igor

0 Kudos

1,564 Views
dluberger
Contributor V

no the mfg tool seems to hang at partitioning.  i let it sit for one hour and nothing. i know the sd card is good and i know the sd card connections to the i.mx are good. the mfg tool hangs at "partitioning..." for no clear reason.  the log doesnt show anything helpful that i can see but I'll post it tomorrow when i get in. is there anything else i should check?

0 Kudos

1,564 Views
igorpadykov
NXP Employee
NXP Employee

could you confirm that mfg tool/..firmware/fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot

was rebuilt with new calibration settings obtained from ddr test.

0 Kudos

1,564 Views
dluberger
Contributor V

I didn't build the mfgtool, i downloaded it from the nxp product page for the i.mx6ul processor.

0 Kudos

1,564 Views
igorpadykov
NXP Employee
NXP Employee

Hi David

 

for custom board it is necessary first to run ddr test and rebuild image with new calibration coefficients,

also recommended to program sd card with mfg tool found on

i.MX Software|NXP 

https://community.nxp.com/docs/DOC-105652 

 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,564 Views
dluberger
Contributor V

I ran the DDR test from u-boot using the script that is launched from u-boot command line.  It ran fine. It only failed at one frequency, but at every other frequency it ran from 333MHz to 528MHz several hours with no failures, so it seems there's no reason to change calibration coefficients.

The MFG tool doesn't work for some reason. I get errors like red bar and "PUSH" error. Something wrong with the usb connection? I'm not sure, but it does enumerate in windows.  Does the mfg tool do something that the commands in linux host don't do? my understanding was that they're equivalent, and it's a lot faster just to use SD card reader in linux host to write u-boot, kernel, device tree, and rootfs.

0 Kudos

1,564 Views
igorpadykov
NXP Employee
NXP Employee

DDR test from u-boot is very weak test, seems MFG tool doesn't work for the same reason.

Please run ddr test and update ddr coefficients in uboot/../mx6ul_14x14_evk/imximage.cfg.

Also rebuild mfg tools firmware (files in /firmware folder) using Yocto Guide sect.6.2 Manufacturing Tool, MFGTool

https://www.nxp.com/webapp/Download?colCode=L4.1.15_1.2.0_LINUX_DOCS&Parent_nodeId=13376994810717061... 

Best regards
igor

0 Kudos

1,564 Views
dluberger
Contributor V

I've rebuilt u-boot with the cal values, and i re-downloaded mfgtool. i copied the 4 files over with the appropriate names, and since the sd card is attached to sd port 1 on the i.mx6ul i'm using the script "mfgtool2-yocto-mx-evk-sdcard-sd1.vbs".  It quick shows loading u-boot, initramfs, etc. and eventually the usb disconnects and reconnects, appearing as a mass storage device. mfgtool then shows "partitioning..." and has been that way for roughly 20 minutes now. so this is progress over the mfgtool issues i was having before, but it still doesn't seem like it's working.

0 Kudos

1,564 Views
dluberger
Contributor V

Ok I ran calibration at 528MHz and the cal values hardly changed.  Is it really worth rebuilding with the new cal values? It seems to me there's nothing wrong with the DDR config as-is.  

What's wrong with writing to the sd card from the linux host, instead of the MFGtool?  I find the Yocto project very difficult and time consuming to use; it took all night to build the latest image, whereas building within the linux host with the make command for u-boot, zimage, and dtb is very fast and easy.  What am i missing?

0 Kudos

1,564 Views
marcomadrigal
Contributor III

Hi,

Could you share your entire boot log, please?

Regards,

-Marco

http://www.ridgerun.com

0 Kudos

1,564 Views
dluberger
Contributor V

Also, I'm not sure if it matters, but the bad crc is because I put my current build of u-boot, kernel, and device tree on a demo card.  I don't get that error on other cards I've built myself, but I always get the same "waiting for root device" message no matter what card I use.  I've tried multiple file systems as well: linaro, the yocto project fs that comes with the demo board; nothing works.

0 Kudos

1,564 Views
dluberger
Contributor V

Log also attached to this comment post. The second to last line is where it hangs; but occasionally the text on the last line, "randon: nonblocking pool is initialized" will appear after about a minute.

U-Boot 2016.03 (Sep 11 2018 - 10:40:19 -0400)

CPU:   Freescale i.MX6UL rev1.2 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 37C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

Display: TFT50 (800x480)
Video: 800x480x24
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc0 is current device
Net:   Board Net Initialization Failed
No ethernet found.
Normal Boot
Hit any key to stop autoboot:  0

switch to partitions #0, OK
mmc0 is current device
switch to partitions #0, OK
mmc0 is current device
reading boot.scr
** Unable to read file boot.scr **
reading zImage
5601224 bytes read in 254 ms (21 MiB/s)
Booting from mmc ...
reading imx6ul-14x14-evk.dtb
36350 bytes read in 20 ms (1.7 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x5577c8 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300bdfd
Modify /soc/aips-bus@02000000/bee@02044000:status disabled
ft_system_setup for mx6

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.1.15 (user@dave-VBOX-UBUNTU) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11) ) #5 SMP PREEMPT Tue Sep 11 10:20:46 EDT 2018
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Freescale i.MX6 UltraLite 14x14 EVK Board
Reserved memory: created CMA memory pool at 0x8c000000, size 320 MiB
Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
Memory policy: Data cache writealloc
PERCPU: Embedded 12 pages/cpu @8bb32000 s16716 r8192 d24244 u49152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p2 rootwait rw
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 180836K/524288K available (6900K kernel code, 322K rwdata, 2360K rodata, 392K init, 424K bss, 15772K reserved, 327680K cma-reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xa0800000 - 0xff000000   (1512 MB)
    lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)
      .text : 0x80008000 - 0x809134dc   (9262 kB)
      .init : 0x80914000 - 0x80976000   ( 392 kB)
      .data : 0x80976000 - 0x809c6840   ( 323 kB)
       .bss : 0x809c9000 - 0x80a33194   ( 425 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
        Additional per-CPU info printed with stalls.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS:16 nr_irqs:16 16
mxc_clocksource_init 3000000
Switching to timer-based delay loop, resolution 333ns
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
/cpus/cpu@0 missing clock-frequency property
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x80008280 - 0x800082f0
Brought up 1 CPUs
SMP: Total of 1 processors activated (6.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
device-tree: Duplicate name in lcdif@021c8000, renamed to "display#1"
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
mxs-dma 1804000.dma-apbh: initialized
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c i2c-0: IMX I2C adapter registered
i2c i2c-0: can't use DMA
i2c i2c-1: IMX I2C adapter registered
i2c i2c-1: can't use DMA
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource mxc_timer1
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
imx rpmsg driver is registered.
Bus freq driver module loaded
futex hash table entries: 256 (order: 2, 16384 bytes)
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.23)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
imx-weim 21b8000.weim: Driver registered.
backlight supply power not found, using dummy regulator
21c8000.lcdif supply lcd not found, using dummy regulator
mxsfb 21c8000.lcdif: failed to find mxc display driver
Console: switching to colour frame buffer device 100x30
mxsfb 21c8000.lcdif: initialized
imx-sdma 20ec000.sdma: no event needs to be remapped
imx-sdma 20ec000.sdma: loaded firmware 3.3
imx-sdma 20ec000.sdma: initialized
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 19, base_baud = 5000000) is a IMX
console [ttymxc0] enabled
21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 235, base_baud = 5000000) is a IMX
imx sema4 driver is registered.
[drm] Initialized drm 1.1.0 20060810
[drm] Initialized vivante 1.0.0 20120216 on minor 0
brd: module loaded
loop: module loaded
fsl-quadspi 21e0000.qspi: unrecognized JEDEC id bytes: ff, ff, ff
fsl-quadspi 21e0000.qspi: Freescale QuadSPI probe failed
20b4000.ethernet supply phy not found, using dummy regulator
pps pps0: new PPS source ptp0
fec 20b4000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
fec 20b4000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 02:43:2d:42:c9:f3
libphy: fec_enet_mii_bus: probed
fec 20b4000.ethernet eth0: registered PHC device 0
2188000.ethernet supply phy not found, using dummy regulator
pps pps1: new PPS source ptp1
fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 3a:01:7e:a6:9d:21
fec 2188000.ethernet eth1: registered PHC device 1
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-mxc: Freescale On-Chip EHCI Host driver
usbcore: registered new interface driver usb-storage
2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
2184000.usb supply vbus not found, using dummy regulator
2184200.usb supply vbus not found, using dummy regulator
ci_hdrc ci_hdrc.1: EHCI Host Controller
ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Mass Storage Function, version: 2009/09/11
LUN: removable file: (no medium)
no file given for LUN0
g_mass_storage ci_hdrc.0: failed to start g_mass_storage: -22
mousedev: PS/2 mouse device common for all mice
input: 20cc000.snvs:snvs-powerkey as /devices/platform/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
input: iMX6UL TouchScreen Controller as /devices/platform/soc/2000000.aips-bus/2040000.tsc/input/input1
input: TSC2007 Touchscreen as /devices/platform/soc/2100000.aips-bus/21a4000.i2c/i2c-1/1-0049/input/input2
snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
i2c /dev entries driver
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
pxp-v4l2 pxp_v4l2: initialized
imx2-wdt 20bc000.wdog: use WDOG_B to reboot.
imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
/soc/aips-bus@02100000/usdhc@02190000: voltage-ranges unspecified
sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
/soc/aips-bus@02100000/usdhc@02194000: voltage-ranges unspecified
sdhci-esdhc-imx 2194000.usdhc: could not get ultra high speed state, work on normal mode
sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 00:31:53 UTC (1913)
VSD_3V3: disabling
can-3v3: disabling
ALSA device list:
  No soundcards found.
Waiting for root device /dev/mmcblk0p2...
random: nonblocking pool is initialized
0 Kudos