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.

MMC3 probe failure using linux 3.0.8 on DM37x

Other Parts Discussed in Thread: TPS65950, BQ27200

Hi all,

This is my first post on TI e2e, hope my association will be enjoyable.

We have a custom board, a beagle-xm clone,using DM37x which has mmc3 pins connected to a sd/mmc connector. MMC1 works fine, used for booting Linux 3.0.8 and MMC2 for WL12xx works fine too on this board, however MMC3 doesn't seem to be coming up. For testing MMC3, MMC2 has been disabled for the time being. For card detection, CD2 of TPS65950 is used on the h/w. A ext3 formatted 4GB card is present at boot time.

The MMC3 gpios are muxed in u-boot itself and the mux modes are confirmed to be in Mode2(i.e., SD/MMC) for these pins by debugfs.

Following is the patch on the board file:

/************************************************************************************************************************************************************************/

static struct omap2_hsmmc_info mmcbbt[] = {
     {
         .mmc        = 1,
         .caps        = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
         .gpio_wp    = -EINVAL,
     },
    {
         .mmc        = 3,
         .caps        = MMC_CAP_4_BIT_DATA,
         .gpio_wp    = -EINVAL,
     },
     {}    /* Terminator */
 };

static struct regulator_consumer_supply beagle_vmmc3_supply[] = {
    REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
};

static int beagle_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
{

...

+ mmcbbt[1].gpio_cd = gpio + 1; //card detect CD2

...

}

static struct regulator_init_data beagle_vmmc3 = {
    .constraints = {
        .min_uV            = 1850000,
        .max_uV            = 3150000,
        .valid_modes_mask    = REGULATOR_MODE_NORMAL
                    | REGULATOR_MODE_STANDBY,
        .valid_ops_mask        = REGULATOR_CHANGE_VOLTAGE
                    | REGULATOR_CHANGE_MODE
                    | REGULATOR_CHANGE_STATUS,
    },
    .num_consumer_supplies    = ARRAY_SIZE(beagle_vmmc3_supply),
    .consumer_supplies    = beagle_vmmc3_supply,
};

static struct twl4030_platform_data beagle_twldata = {

...

+ .vmmc2        = &beagle_vmmc3,

...

}

/*********************************************************************************************************************************************************************/

Following is the kernel log:

Linux version 3.0.8 (root@gh-lappy) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Sun Apr 8 07:27:36 IST 2012
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: OMAP3 Beagle Board
[    0.000000] Beagle expansionboard: none
[    0.000000] Truncating RAM at a0000000-bfffffff to -afffffff (vmalloc region overlap).
[    0.000000] Reserving 12582912 bytes SDRAM for VRAM
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk )
[    0.000000] SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
[    0.000000] On node 0 totalpages: 193536
[    0.000000] free_area_init_node: node 0, pgdat c064b058, node_mem_map c0b9e000
[    0.000000]   Normal zone: 1536 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 192000 pages, LIFO batch:31
[    0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
[    0.000000] Reprogramming SDRC clock to 400000000 Hz
[    0.000000] dpll3_m2_clk rate change failed: -22
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0  
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 192000
[    0.000000] Kernel command line: console=ttyO2,115200n8 mpurate=auto buddy=none camera=none vram=12M omapfb.mode=dvi:1024x600MR-16@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 756MB = 756MB total
[    0.000000] Memory: 755236k/755236k available, 31196k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
[    0.000000]     vmalloc : 0xf0800000 - 0xf8000000   ( 120 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .init : 0xc0008000 - 0xc003e000   ( 216 kB)
[    0.000000]       .text : 0xc003e000 - 0xc05f758c   (5862 kB)
[    0.000000]       .data : 0xc05f8000 - 0xc064c340   ( 337 kB)
[    0.000000]        .bss : 0xc064c364 - 0xc0b9d4ac   (5445 kB)
[    0.000000] NR_IRQS:410
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
[    0.000000] Total of 96 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 3695 kB
[    0.000000]  per task-struct memory footprint: 1152 bytes
[    0.000701] Calibrating delay loop... 597.64 BogoMIPS (lpj=2334720)
[    0.093749] pid_max: default: 32768 minimum: 301
[    0.094116] Security Framework initialized
[    0.094329] Mount-cache hash table entries: 512
[    0.097473] CPU: Testing write buffer coherency: ok
[    0.105865] omap_hwmod: gpt12_fck: missing clockdomain for gpt12_fck.
[    0.112060] print_constraints: dummy:  
[    0.113037] NET: Registered protocol family 16
[    0.113891] GPMC revision 5.0
[    0.122497] OMAP GPIO hardware version 2.5
[    0.123687] OMAP GPIO hardware version 2.5
[    0.124725] OMAP GPIO hardware version 2.5
[    0.126068] OMAP GPIO hardware version 2.5
[    0.127105] OMAP GPIO hardware version 2.5
[    0.128234] OMAP GPIO hardware version 2.5
[    0.133483] omap_mux_init: Add partition: #1: core, flags: 0
[    0.135650] OMAP3 Beagle Rev: Ax/Bx
[    0.145080] CONFIG OMAP MUX IS ON!!
[    0.145111] Found NAND on CS0
[    0.145111] Registering NAND on CS0
[    0.146759] Bq register return value = -288817152
[    0.146789] gpio_request: gpio--22 (DVI reset) status -22
[    0.146789] Unable to get DVI reset GPIO
[    0.147125] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.155059] omap_device: omap-mcbsp.2: alias fck already exists
[    0.155670] omap_device: omap-mcbsp.3: alias fck already exists
[    0.159790] OMAP DMA hardware revision 5.0
[    0.210906] bio: create slab <bio-0> at 0
[    0.217712] S0.219757] omap2_mcspi omap2_mcspi.1: registered master spi1
[    0.220123] spi spi1.0: setup: speed 375000, sample trailing edge, clk inverted
[    0.220153] spi spi1.0: setup mode 3, 8 bits/w, 480000 Hz max --> 0
[    0.221191] omap2_mcspi omap2_mcspi.1: registered child spi1.0
[    0.221954] omap2_mcspi omap2_mcspi.2: registered master spi2
[    0.222656] omap2_mcspi omap2_mcspi.3: registered master spi3
[    0.223358] omap2_mcspi omap2_mcspi.4: registered master spi4
[    0.225952] usbcore: registered new interface driver usbfs
[    0.227203] usbcore: registered new interface driver hub
[    0.227874] usbcore: registered new device driver usb
[    0.229400] omap_i2c omap_i2c.1: bus 1 rev4.0 at 2600 kHz
[    0.237884] twl4030: PIH (irq 7) chaining IRQs 368..375
[    0.238037] twl4030: power (irq 373) chaining IRQs 376..383
[    0.239562] twl4030: gpio (irq 368) chaining IRQs 384..401
[    0.240783] ***********gpio = 192
[    0.251373] print_constraints: VMMC1: 1850 <--> 3150 mV at 3000 mV normal standby
[    0.253112] print_constraints: VDAC: 1800 mV normal standby
[    0.254974] print_constraints: VDVI: 1800 mV normal standby
[    0.256774] print_constraints: VMMC2: 1850 <--> 3150 mV at 2600 mV normal standby
[    0.259063] print_constraints: VSIM: 1800 <--> 3000 mV at 1800 mV normal standby
[    0.259857] omap_i2c omap_i2c.3: bus 3 rev4.0 at 100 kHz
[    0.268737] cfg80211: Calling CRDA to update world regulatory domain
[    0.270751] Switching to clocksource 32k_counter
[    0.273742] Switched to NOHz mode on CPU #0
[    0.349121] NET: Registered protocol family 2
[    0.349578] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.351013] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.354522] TCP bind hash table entries: 65536 (order: 9, 2359296 bytes)
[    0.387603] TCP: Hash tables configured (established 131072 bind 65536)
[    0.387695] TCP reno registered
[    0.387725] UDP hash table entries: 512 (order: 3, 40960 bytes)
[    0.388305] UDP-Lite hash table entries: 512 (order: 3, 40960 bytes)
[    0.389404] NET: Registered protocol family 1
[    0.390777] RPC: Registered named UNIX socket transport module.
[    0.390808] RPC: Registered udp transport module.
[    0.390838] RPC: Registered tcp transport module.
[    0.390838] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.391632] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.549835] VFS: Disk quotas dquot_6.5.2
[    0.549926] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.551666] JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.552307] msgmni has been set to 1475
[    0.556518] io scheduler noop registered
[    0.556549] io scheduler deadline registered
[    0.556640] io scheduler cfq registered (default)
[    0.614746] OMAP DSS rev 2.0
[    0.624206] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.630126] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
[    0.631927] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
[    0.632904] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
[    1.305816] console [ttyO2] enabled
[    1.310791] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3
[    1.344207] brd: module loaded
[    1.359710] loop: module loaded
[    1.369567] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.376464] omap2-nand driver initializing
[    1.381347] NAND device: Manufacturer ID: 0xad, Chip ID: 0xbc (Hynix NAND 512MiB 1,8V 16-bit)
[    1.390411] Creating 5 MTD partitions on "omap2-nand.0":
[    1.396026] 0x000000000000-0x000000080000 : "X-Loader"
[    1.407958] 0x000000080000-0x000000260000 : "U-Boot"
[    1.417877] 0x000000260000-0x000000280000 : "U-Boot Env"
[    1.427337] 0x000000280000-0x000000680000 : "Kernel"
[    1.438323] 0x000000680000-0x000020000000 : "File System"
[    1.673919] OneNAND driver initializing
[    1.687744] usbcore: registered new interface driver asix
[    1.694091] usbcore: registered new interface driver cdc_ether
[    1.700744] usbcore: registered new interface driver net1080
[    1.707092] usbcore: registered new interface driver cdc_subset
[    1.713806] usbcore: registered new interface driver zaurus
[    1.719726] cdc_ncm: 04-Aug-2011
[    1.723571] usbcore: registered new interface driver cdc_ncm
[    1.731506] usbcore: registered new interface driver cdc_wdm
[    1.737518] Initializing USB Mass Storage driver...
[    1.743225] usbcore: registered new interface driver usb-storage
[    1.749572] USB Mass Storage support registered.
[    1.755584] usbcore: registered new interface driver libusual
[    1.762084] usbcore: registered new interface driver usbtest
[    1.770721] mousedev: PS/2 mouse device common for all mice
[    1.779174] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    1.789642] input: TWL4030 Keypad as /devices/platform/omap/omap_i2c.1/i2c-1/1-004a/twl4030_keypad/input/input1
[    1.807098] input: twl4030_pwrbutton as /devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl4030_pwrbutton/input/input2
[    1.820159] twl_rtc twl_rtc: Power up reset detected.
[    1.825897] twl_rtc twl_rtc: Enabling TWL-RTC.
[    1.833587] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
[    1.841430] i2c /dev entries driver
[    1.848114] Driver for 1-wire Dallas network protocol.
[    1.854919] Bq27200 initialising
[    1.862487] bq27x00-battery 3-0055: support ver. 1.2.0 enabled
[    1.879058] ret = 0
[    1.881317] Bq27200 initialised
[    1.888854] OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[    1.896362] twl4030_wdt twl4030_wdt: Failed to register misc device
[    1.903137] twl4030_wdt: probe of twl4030_wdt failed with error -16
[    1.916076] gpio_request: gpio-193 (mmc_cd) status -16
[    1.916137] omap_hsmmc: probe of omap_hsmmc.2 failed with error -16
[    1.926574] usbcore: registered new interface driver usbhid
[    1.932495] usbhid: USB HID core driver
[    1.936553] oprofile: hardware counters not available
[    1.941833] oprofile: using timer interrupt.
[    1.946838] TCP cubic registered
[    1.950225] Initializing XFRM netlink socket
[    1.954864] NET: Registered protocol family 17
[    1.959655] NET: Registered protocol family 15
[    1.964538] lib80211: common routines for IEEE802.11 drivers
[    1.970550] lib80211_crypt: registered algorithm 'NULL'
[    1.970550] Registering the dns_resolver key type
[    1.975982] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    1.984069] ThumbEE CPU extension supported.
[    2.025421] clock: disabling unused clocks to save power
[    2.035003] fbcvt: Aspect ratio not CVT standard
[    2.039978] fbcvt: 1024x600@60: CVT Name - Not a CVT standard - 0.614 Mega Pixel Image
[    2.039978]  
[    2.068847] Console: switching to colour frame buffer device 128x37
[    2.091064] regulator_init_complete: VDAC: incomplete constraints, leaving on
[    2.099761] twl_rtc twl_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[    2.111968] Waiting for root device /dev/mmcblk0p2...
[    2.292053] mmc0: host does not support reading read-only switch. assuming write-enable.
[    2.300689] mmc0: new SDHC card at address e624
[    2.307830] mmcblk0: mmc0:e624 SU04G 3.69 GiB  
[    2.330596]  mmcblk0: p1 p2
[    2.459381] EXT3-fs: barriers not enabled
[    2.465789] kjournald starting.  Commit interval 5 seconds
[    2.471862] EXT3-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is recommended
[    2.493835] EXT3-fs (mmcblk0p2): using internal journal
[    2.499816] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[    2.507446] VFS: Mounted root (ext3 filesystem) on device 179:2.
[    2.513946] Freeing init memory: 216K
[    3.396240] udevd (613): /proc/613/oom_adj is deprecated, please use /proc/613/oom_score_adj instead.
[    4.787017] rtc_twl: disagrees about version of symbol module_layout
/*******************************************************************************************************************************************************************************/

Lines of interest:

print_constraints: VMMC2: 1850 <--> 3150 mV at 2600 mV normal standby

gpio_request: gpio-193 (mmc_cd) status -16
omap_hsmmc: probe of omap_hsmmc.2 failed with error -16

gpio_193 is at an offset of 2 after omap max gpio lines (counting from 0) which I assume points to gpio1 of tps65950 i.e., CD2.

The track length between MMC3 connector and processor is around 6 inches, for commercial reasons, connected via FPC from main board to a daughter board, hope that's not a problem.The following wiki talks about capacitance loading issues hindering functionality with longer track lengths when a transceiver is used, however in our case we are not using a transceiver, its a direct connection.

http://processors.wiki.ti.com/index.php/SD-MMC_Usage_Notes_on_AM35x

Don't have much time to debug this problem, any help on this is much appreciated. Thanks.