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/AM3358: Understanding MMC0 Card Detect

Part Number: AM3358
Other Parts Discussed in Thread: TPS65217

Tool/software: Linux

We have made it a long way to get our custom AM335x board kernel to boot this far... yea, But now we are stopping at:  Waiting for root device /dev/mmcblk0p2

Lots of posts talk about the SD Card Detect line.  Our SD Card Socket has the DATA3 and SD line tied together,  we have been using this socket for some time now on a previous AM335x board.  We have tried several things including using a different ARM MMC0_SDCD pin and tying it low.  

Questions:

1. We are using pin C15 (same as BBB) It seems all references to SD Card detect sets pinmux to Mode7 (MMC0_SDCD is Mode5).  What should it be set to?

2. What is the kernel looking for on the SD card (file, directory, etc.) when it is waiting at "Waiting for root device /dev/mmcblk0p2" ?  We have an Ubuntu ext4 file system on mmcblk0p2.

Thanks again oh TI gurus!

Brian Weir

 

  • The software team have been notified. They will respond here.
  • Hi,

    I am referring to TISDK 03.02.00.05 (kernel 4.4.32).

    1. We are using pin C15 (same as BBB) It seems all references to SD Card detect sets pinmux to Mode7 (MMC0_SDCD is Mode5).  What should it be set to?

    The &mmc1  node uses:

      cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;

    So if you have an implementation similar to BBB, then you should set it to MUX_MODE7 (gpio0_6).

    2. What is the kernel looking for on the SD card (file, directory, etc.) when it is waiting at "Waiting for root device /dev/mmcblk0p2" ?  We have an Ubuntu ext4 file system on mmcblk0p2.

    The kernel looks for rootfs partition (for the filesystem). See the create-sdcard.sh (create-sdcard.sh) script to see how it is created for AM335x devices. 

    Best Regards, 
    Yordan

  • Hi Brian,

    1) Right - gpio is used for the sd card detect function instead of the MMC's own sd card detect (low power reasons).
    2) When you see the "Waiting for root device /dev/mmcblk0p2" that pretty much means the SD card isn't responding. At this point the OS just stops and waits.

    Could we see your boot log?

    Regards,
    Ahmad
  • Ahmad,

    Thank you for the response, and your time. 

    Regards, Brian

    When you say:

    1) Right - gpio is used for the sd card detect function instead of the MMC's own SD card detect (low power reasons).

    Do you mean low power reasons: to run on lower voltage or do you mean the internal MMC card detect derw too much current?  I curious because the SD card socket we are using has the SDCD line shared with Data3 and I was concerned that that might have an effect on the Data3 line impedance.  

    Reference our "Waiting for root device /dev/mmcblk0p2" stop, below is the boot log:

    NASCENT ActiveEdge 2017
    U-Boot SPL 2014.07-00010-gfcd7278-dirty (Mar 03 2017 - 11:44:06)
    inside s_init()
    enable rtc32k clock disabled for now...
    about to call early_init_f...
    mux.c board is boneabout to call sdram_init
    inside sdram_init...
    BoneBlack config ddr...
    end sdram_init...
    After call to sdram_init
    Inside am335x_spl_board_init...
    reading u-boot.img
    reading u-boot.img


    U-Boot 2014.07-00010-gfcd7278-dirty (Mar 03 2017 - 11:44:06)

    I2C:   ready
    DRAM:  512 MiB
    Inside board_init..
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - readenv() failed, using default environment

    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  1 0
    WARNING: Could not determine device tree to use
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading uEnv.txt
    223 bytes read in 4 ms (53.7 KiB/s)
    Loaded environment from uEnv.txt
    Importing environment from mmc ...
    Running uenvcmd ...
    reading uImage
    3802632 bytes read in 220 ms (16.5 MiB/s)
    reading am335x-ActiveEdge.dtb
    37189 bytes read in 9 ms (3.9 MiB/s)
    ## Booting kernel from Legacy Image at 82000000 ...
       Image Name:   Linux-4.4.52-02812-g3d718f1-dirt
       Created:      2017-03-08  16:53:45 UTC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3802568 Bytes = 3.6 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Kernel Image ... OK
       Loading Device Tree to 8fff3000, end 8ffff144 ... OK

    Starting kernel ...

    [    0.000000] Booting Linux on physical CPU 0x0

    [    0.000000] Initializing cgroup subsys cpuset

    [    0.000000] Initializing cgroup subsys cpu

    [    0.000000] Initializing cgroup subsys cpuacct

    [    0.000000] Linux version 4.4.52-02812-g3d718f1-dirty (zclark@debian) (gcc version 4.9.3 (Timesys 20160328) ) #53 SMP Wed Mar 8 11:53:29 EST 2017

    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d

    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

    [    0.000000] Machine model: Remkon EdgeCOM

    [    0.000000] bootconsole [earlycon0] enabled

    [    0.000000] cma: Reserved 16 MiB at 0x9e800000

    [    0.000000] Memory policy: Data cache writeback

    [    0.000000] CPU: All CPU(s) started in SVC mode.

    [    0.000000] AM335X ES2.1 (sgx neon )

    [    0.000000] PERCPU: Embedded 13 pages/cpu @df913000 s24512 r8192 d20544 u53248

    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129408

    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ip=none earlyprintk

    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)

    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

    [    0.000000] Memory: 481632K/522240K available (6965K kernel code, 715K rwdata, 2388K rodata, 436K init, 8222K bss, 24224K reserved, 16384K cma-reserved, 0K highmem)

    [    0.000000] Virtual kernel memory layout:

    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)

    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)

    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)

    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)

    [    0.000000]       .text : 0xc0008000 - 0xc092a910   (9355 kB)

    [    0.000000]       .init : 0xc092b000 - 0xc0998000   ( 436 kB)

    [    0.000000]       .data : 0xc0998000 - 0xc0a4afd0   ( 716 kB)

    [    0.000000]        .bss : 0xc0a4d000 - 0xc1254bd0   (8223 kB)

    [    0.000000] Running RCU self tests

    [    0.000000] Hierarchical RCU implementation.

    [    0.000000]     RCU lockdep checking is enabled.

    [    0.000000]     Build-time adjustment of leaf fanout to 32.

    [    0.000000]     RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.

    [    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1

    [    0.000000] NR_IRQS:16 nr_irqs:16 16

    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts

    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz

    [    0.000018] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns

    [    0.008166] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns

    [    0.017770] OMAP clocksource: timer1 at 24000000 Hz

    [    0.023351] clocksource_probe: no matching clocksources found

    [    0.030477] Console: colour dummy device 80x30

    [    0.035209] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'

    [    0.042004] This ensures that you still see kernel messages. Please

    [    0.048547] update your kernel commandline.

    [    0.052930] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar

    [    0.060985] ... MAX_LOCKDEP_SUBCLASSES:  8

    [    0.065292] ... MAX_LOCK_DEPTH:          48

    [    0.069674] ... MAX_LOCKDEP_KEYS:        8191

    [    0.074247] ... CLASSHASH_SIZE:          4096

    [    0.078811] ... MAX_LOCKDEP_ENTRIES:     32768

    [    0.083474] ... MAX_LOCKDEP_CHAINS:      65536

    [    0.088124] ... CHAINHASH_SIZE:          32768

    [    0.092775]  memory used by lock dependency info: 5167 kB

    [    0.098418]  per task-struct memory footprint: 1536 bytes

    [    0.104080] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)

    [    0.145884] pid_max: default: 32768 minimum: 301

    [    0.151109] Security Framework initialized

    [    0.155544] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)

    [    0.162435] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)

    [    0.172760] Initializing cgroup subsys io

    [    0.177130] Initializing cgroup subsys memory

    [    0.181780] Initializing cgroup subsys devices

    [    0.186579] Initializing cgroup subsys freezer

    [    0.191299] Initializing cgroup subsys perf_event

    [    0.196301] CPU: Testing write buffer coherency: ok

    [    0.202869] CPU0: thread -1, cpu 0, socket -1, mpidr 0

    [    0.208432] Setting up static identity map for 0x80008340 - 0x800083b8

    [    0.219416] Brought up 1 CPUs

    [    0.222571] SMP: Total of 1 processors activated (996.14 BogoMIPS).

    [    0.229189] CPU: All CPU(s) started in SVC mode.

    [    0.237898] devtmpfs: initialized

    [    0.279619] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3

    [    0.301362] omap_hwmod: rtc: no dt node

    [    0.305450] ------------[ cut here ]------------

    [    0.310297] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2523 _init+0x1c8/0x410()

    [    0.319346] omap_hwmod: rtc: doesn't have mpu register target base

    [    0.325804] Modules linked in:

    [    0.329040] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.52-02812-g3d718f1-dirty #53

    [    0.337172] Hardware name: Generic AM33XX (Flattened Device Tree)

    [    0.343545] [<c0017934>] (unwind_backtrace) from [<c00140b0>] (show_stack+0x10/0x14)

    [    0.351600] [<c00140b0>] (show_stack) from [<c034b0e8>] (dump_stack+0xb0/0xe4)

    [    0.359122] [<c034b0e8>] (dump_stack) from [<c003a23c>] (warn_slowpath_common+0x7c/0xb8)

    [    0.367529] [<c003a23c>] (warn_slowpath_common) from [<c003a2a8>] (warn_slowpath_fmt+0x30/0x40)

    [    0.376562] [<c003a2a8>] (warn_slowpath_fmt) from [<c0939370>] (_init+0x1c8/0x410)

    [    0.384436] [<c0939370>] (_init) from [<c0025608>] (omap_hwmod_for_each+0x34/0x60)

    [    0.392309] [<c0025608>] (omap_hwmod_for_each) from [<c09398ec>] (__omap_hwmod_setup_all+0x24/0x40)

    [    0.401702] [<c09398ec>] (__omap_hwmod_setup_all) from [<c00098a4>] (do_one_initcall+0x80/0x1e0)

    [    0.410839] [<c00098a4>] (do_one_initcall) from [<c092beb4>] (kernel_init_freeable+0x208/0x2d8)

    [    0.419878] [<c092beb4>] (kernel_init_freeable) from [<c0699e74>] (kernel_init+0x8/0xec)

    [    0.428293] [<c0699e74>] (kernel_init) from [<c000f850>] (ret_from_fork+0x14/0x24)

    [    0.436354] ---[ end trace e0209a6a301524c3 ]---

    [    0.476863] omap_hwmod: debugss: _wait_target_disable failed

    [    0.538860] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

    [    0.549172] futex hash table entries: 256 (order: 2, 16384 bytes)

    [    0.558442] pinctrl core: initialized pinctrl subsystem

    [    0.569276] NET: Registered protocol family 16

    [    0.579838] DMA: preallocated 256 KiB pool for atomic coherent allocations

    [    0.589112] cpuidle: using governor ladder

    [    0.593500] cpuidle: using governor menu

    [    0.610219] OMAP GPIO hardware version 0.1

    [    0.638043] hw-breakpoint: debug architecture 0x4 unsupported.

    [    0.644857] omap4_sram_init:Unable to allocate sram needed to handle errata I688

    [    0.652554] omap4_sram_init:Unable to get sram pool needed to handle errata I688

    [    0.705637] edma 49000000.edma: TI EDMA DMA engine driver

    [    0.714755] SCSI subsystem initialized

    [    0.720510] usbcore: registered new interface driver usbfs

    [    0.726501] usbcore: registered new interface driver hub

    [    0.732207] usbcore: registered new device driver usb

    [    0.738777] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe

    [    0.752355] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe

    [    0.765874] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe

    [    0.779558] pps_core: LinuxPPS API ver. 1 registered

    [    0.784774] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>

    [    0.794332] PTP clock support registered

    [    0.799236] Advanced Linux Sound Architecture Driver Initialized.

    [    0.809170] clocksource: Switched to clocksource timer1

    [    0.962362] NET: Registered protocol family 2

    [    0.969181] TCP established hash table entries: 4096 (order: 2, 16384 bytes)

    [    0.976605] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)

    [    0.984626] TCP: Hash tables configured (established 4096 bind 4096)

    [    0.991517] UDP hash table entries: 256 (order: 2, 20480 bytes)

    [    0.997856] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)

    [    1.005383] NET: Registered protocol family 1

    [    1.011761] RPC: Registered named UNIX socket transport module.

    [    1.017949] RPC: Registered udp transport module.

    [    1.022958] RPC: Registered tcp transport module.

    [    1.027882] RPC: Registered tcp NFSv4.1 backchannel transport module.

    [    1.041036] audit: initializing netlink subsys (disabled)

    [    1.046927] audit: type=2000 audit(0.910:1): initialized

    [    1.057056] VFS: Disk quotas dquot_6.6.0

    [    1.061504] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

    [    1.071551] NFS: Registering the id_resolver key type

    [    1.077207] Key type id_resolver registered

    [    1.081754] Key type id_legacy registered

    [    1.086186] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.

    [    1.099304] io scheduler noop registered

    [    1.103451] io scheduler deadline registered

    [    1.107973] io scheduler cfq registered (default)

    [    1.115520] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568

    [    1.125539] Serial: 8250/16550 driver, 3 ports, IRQ sharing enabled

    [    1.141124] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250

    [    1.150813] console [ttyS0] enabled
    [    1.150813] console [ttyS0] enabled

    [    1.157988] bootconsole [earlycon0] disabled
    [    1.157988] bootconsole [earlycon0] disabled

    [    1.170169] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    1.181389] 481a8000.serial: ttyS2 at MMIO 0x481a8000 (irq = 160, base_baud = 3000000) is a 8250
    [    1.228636] brd: module loaded
    [    1.254820] loop: module loaded
    [    1.260935] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.329073] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    1.335219] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [    1.345489] libphy: 4a101000.mdio: probed
    [    1.349680] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Atheros 8031 ethernet
    [    1.360399] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property
    [    1.368721] cpsw 4a100000.ethernet: Detected MACID = 38:d2:69:4c:a1:19
    [    1.375862] cpsw 4a100000.ethernet: cpts: overflow check period 850
    [    1.386486] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    1.393218] ehci-omap: OMAP-EHCI Host Controller driver
    [    1.398880] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [    1.405224] ohci-omap3: OHCI OMAP3 driver
    [    1.409798] usbcore: registered new interface driver usb-storage
    [    1.416003] usbcore: registered new interface driver usbtest
    [    1.425374] 47401300.usb-phy supply vcc not found, using dummy regulator
    [    1.440642] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [    1.451239] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [    1.460273] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
    [    1.470027] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    1.476857] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.484193] usb usb1: Product: MUSB HDRC host driver
    [    1.489211] usb usb1: Manufacturer: Linux 4.4.52-02812-g3d718f1-dirty musb-hcd
    [    1.496467] usb usb1: SerialNumber: musb-hdrc.1.auto
    [    1.505506] hub 1-0:1.0: USB hub found
    [    1.509859] hub 1-0:1.0: 1 port detected
    [    1.520568] mousedev: PS/2 mouse device common for all mice
    [    1.526209] i2c /dev entries driver
    [    1.532278] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.538835] usbcore: registered new interface driver ushc
    [    1.546356] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.559843] davinci_evm sound: ASoC: CODEC DAI tlv320aic3x-hifi not registered
    [    1.567136] davinci_evm sound: snd_soc_register_card failed (-517)
    [    1.574443] Initializing XFRM netlink socket
    [    1.578916] NET: Registered protocol family 17
    [    1.583563] NET: Registered protocol family 15
    [    1.588446] Key type dns_resolver registered
    [    1.593033] omap_voltage_late_init: Voltage driver support not added
    [    1.599475] sr_dev_init: No voltage domain specified for smartreflex0. Cannot initialize
    [    1.607605] sr_dev_init: No voltage domain specified for smartreflex1. Cannot initialize
    [    1.617343] ThumbEE CPU extension supported.
    [    1.621769] Registering SWP/SWPB emulation handler
    [    1.626598] SmartReflex Class3 initialized
    [    1.643928] tlv320aic3x-codec 0-001b: Failed to get supply 'IOVDD': -517
    [    1.650869] tlv320aic3x-codec 0-001b: Failed to request supplies: -517
    [    1.698633] tps65217 0-0024: TPS65217 ID 0xe version 1.2
    [    1.705012] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [    1.712121] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.720679] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
    [    1.728906] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
    [    1.735744] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.780695] davinci_evm sound: ASoC: CODEC DAI tlv320aic3x-hifi not registered
    [    1.787984] davinci_evm sound: snd_soc_register_card failed (-517)
    [    1.810950] davinci_evm sound: tlv320aic3x-hifi <-> 4803c000.mcasp mapping ok
    [    1.833775] sr_init: No PMIC hook to init smartreflex
    [    1.839266] sr_init: platform driver register failed for SR
    [    1.865030] ALSA device list:
    [    1.868044]   #0: AM335x-EVMSK
    [    1.875254] Waiting for root device /dev/mmcblk0p2...
    [   80.989284] random: nonblocking pool is initialized

  • Reference "Waiting for root device /dev/mmcblk0p2" not being able to boot to the SD Card Root File system, I am able to do file lists of the SD card ext partition using U-Boot commands: ext2ls mmc 0:2 or for a specific folder ext2ls mmc 0:2 /sbin

    For some reason when the kernel goes out to find the file system, it can't find it.

    Perhaps I am using the wrong file system type? should it be ext2 , ext3, ext4, other?

    Thanks, Brian
  • We have redirected uenv.txt to point the kernel to /dev/sda1 and boot to a usb stick that only contained the root file system. The u-boot, kernel, and device tree are still on the sd card. This seems to work correctly but the kernel is still unable to see the sd card /dev/.

    What have we missed in either the device tree or kernel configuration or....?

    Thanks, Brian
  • What did you mean that the SDCD and DAT3 are on the same line? Take a look at the microSD card connector on page 11 of the BeagleBone Black schematic for example - the connector does have a pin labeled "CD/DAT3" however that should only be used for DAT3. There should be another pin labeled only "CD" and that is for use with the GPIO for card detect.

    FYI - when the AM335x is put into deep sleep mode it will turn off the clock to the MMC peripheral to save additional power. That will effectively disable the MMC's SDCD. So instead GPIO is used to detect the card presence.

  • Ahmad, Thank you for the response.

    We are using an ALPS SCHD3A0100 MicroSD Card Socket: www.datasheets360.com/.../3045515680420154110

    Pin #2 on this socket si CD/DAT3. We have been using this same SD Card Socket on our previous AM335x board for a couple of years. I did not design the schematic for that board and only copied it to our new board. I must admit I don't understand how it works and can't find any form of an explanation of how the SD card detection is with multiplexed CD/DAT3. Biser talks about it here: e2e.ti.com/.../232955 There is also a discussion here: community.nxp.com/.../312338

    Either way I don't think we are using the SD Card Detect SD_CD line on our older board. The older board has a zero ohm resistor connecting the AM335x MMC_DAT3 to the SD_CD line GPIO0_6 pin C15. I removed the zero ohm resistor and the board boots to the prompt with an older 3.2.0 kernel and newer 4.4.19 kernel with the SD_CD input floating (2.9v), tied to ground, or tied to 3.3v. The hardware is the same on our new board that is not detecting the MMC0 SD Card. There must be a work around in the kernel or pin mux that is allowing the SD Card Detect input to not be used, hard coded to being present. Four our design this would be OK as we only will be booting from an SD Card.

    Regards, Brian
  • Ahmad, I found this that better explains how to use the multiplexed DAT3/CD line:
    hackaday.io/.../9878-microsd-fatfs-in-dma

    Regards, Brian
  • Ahmad, Thank you for the post.

    We did however find our problem yesterday, we are able to boot to the Root File System from the SD Card without the SD_CD line connected.

    it turned out to be a problem in the mmc device tree:

    This patch fixed it:
    &mmc1 {
    status = "okay";
    - vqmmc-supply = <&ldo3_reg>;
    vmmc-supply = <&ldo4_reg>;
    bus-width = <0x4>;
    - pinctrl-names = "default"; /*, "sleep";*/
    - pinctrl-0 = <&sd_card_pins_default>;
    - /*pinctrl-1 = <&sd_card_pins_sleep>;*/
    - /*no-1-8-v;*/
    - /*broken-cd;*/
    - cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
    };

    Thanks and Regards, Brian
  • Hi Brian,
    The device tree is definitely tricky. I'm glad it was resolved for you!

    Regards,
    Ahmad