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.
Tool/software: Linux
Hello,
On our custom board, we are using SD card on MMC0 and eMMC on MMC1 of AM3352 (according to schematic).
In kernel 4.4, we did following configuration in dts file which is working fine for that kernel.
/* uSD card */
&mmc1 {
status = "okay";
vmmc-supply = <&vmmc_reg>;
bus-width = <4>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mmc1_card_pins_default>;
pinctrl-1 = <&mmc1_card_pins_sleep>;
cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
ti,needs-special-hs-handling;
};
&mmc2 {
status = "okay";
vmmc-supply = <&vmmc_reg>;
ti,non-removable;
bus-width = <8>;
cap-power-off-card;
keep-power-in-suspend;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mmc2_emmc_pins_default>;
pinctrl-1 = <&mmc2_emmc_pins_sleep>;
};
// Micro SD card PINMUX
mmc1_card_pins_default: pinmux_mmc1_card_pins_default {
pinctrl-single,pins = <
0x100 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (G17) mmc0_cmd.mmc0_cmd */
0x104 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (G19) mmc0_clk.mmc0_clk */
0xfc ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (G18) mmc0_dat0.mmc0_dat0 */
0xf8 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (H17) mmc0_dat1.mmc0_dat1 */
0xf4 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (H18) mmc0_dat2.mmc0_dat2 */
0xf0 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (H19) mmc0_dat3.mmc0_dat3 */
0x160 ( PIN_INPUT | MUX_MODE5 ) /* (B16) spi0_cs1.mmc0_sdcd */
>;
};
mmc1_card_pins_sleep: pinmux_mmc1_card_pins_sleep {
pinctrl-single,pins = <
0x100 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (G17) mmc0_cmd.mmc0_cmd */
0x104 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (G19) mmc0_clk.mmc0_clk */
0xfc (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (G18) mmc0_dat0.mmc0_dat0 */
0xf8 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (H17) mmc0_dat1.mmc0_dat1 */
0xf4 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (H18) mmc0_dat2.mmc0_dat2 */
0xf0 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (H19) mmc0_dat3.mmc0_dat3 */
0x160 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (B16) spi0_cs1.mmc0_sdcd */
>;
};
mmc2_emmc_pins_default: pinmux_mmc2_card_pins_default {
pinctrl-single,pins = <
0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* (V14) gpmc_csn1.mmc1_clk */
0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* (U15) gpmc_csn2.mmc1_cmd */
0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* (W10) gpmc_ad0.mmc1_dat0 */
0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* (V9) gpmc_ad1.mmc1_dat1 */
0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* (V12) gpmc_ad2.mmc1_dat2 */
0x0C (PIN_INPUT_PULLUP | MUX_MODE1) /* (W13) gpmc_ad3.mmc1_dat3 */
0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* (V13) gpmc_ad4.mmc1_dat4 */
0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* (W14) gpmc_ad5.mmc1_dat5 */
0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* (U14) gpmc_ad6.mmc1_dat6 */
0x1C (PIN_INPUT_PULLUP | MUX_MODE1) /* (W15) gpmc_ad7.mmc1_dat7 */
>;
};
mmc2_emmc_pins_sleep: pinmux_mmc2_card_pins_sleep {
pinctrl-single,pins = <
0x80 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V14) gpmc_csn1.mmc1_clk */
0x84 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U15) gpmc_csn2.mmc1_cmd */
0x00 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (W10) gpmc_ad0.mmc1_dat0 */
0x04 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V9) gpmc_ad1.mmc1_dat1 */
0x08 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V12) gpmc_ad2.mmc1_dat2 */
0x0C (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (W13) gpmc_ad3.mmc1_dat3 */
0x10 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V13) gpmc_ad4.mmc1_dat4 */
0x14 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (W14) gpmc_ad5.mmc1_dat5 */
0x18 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U14) gpmc_ad6.mmc1_dat6 */
0x1C (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (W15) gpmc_ad7.mmc1_dat7 */
>;
};
SYS_BOOT configuration is: SYSBOOT[4:0] = 11100 - MMC1 -> MMC0 -> UART0 -> USB0
But, When I use the same configuration in dts file in kernel 4.9.59 and enable mmc2 node by status = "okay", It creates kernel panic(SD card is connected so kernel should boot up from it.). and on status = "disable" kernel boots up from SD card.
Following is the kernel panic error:
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.59-gae091debed (einfochips@AHMLPT0458) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #2 PREEMPT Tue 8
[ 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] OF: fdt:Machine model: TI AM335x EVM
[ 0.000000] cma: Reserved 48 MiB at 0xbd000000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (neon)
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260416
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=00000000-02 rw rootfstype=ext4 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: 976304K/1048576K available (8192K kernel code, 334K rwdata, 2384K rodata, 1024K init, 260K bss, 23120K reserved, 49152K)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0900000 (9184 kB)
[ 0.000000] .init : 0xc0c00000 - 0xc0d00000 (1024 kB)
[ 0.000000] .data : 0xc0d00000 - 0xc0d53b90 ( 335 kB)
[ 0.000000] .bss : 0xc0d53b90 - 0xc0d94bc0 ( 261 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 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.000029] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000075] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000100] OMAP clocksource: timer1 at 24000000 Hz
[ 0.000474] clocksource_probe: no matching clocksources found
[ 0.000812] Console: colour dummy device 80x30
[ 0.000872] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992)
[ 0.067737] pid_max: default: 32768 minimum: 301
[ 0.068010] Security Framework initialized
[ 0.068098] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.068127] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.069881] CPU: Testing write buffer coherency: ok
[ 0.070570] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.075983] devtmpfs: initialized
[ 0.105135] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.105913] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.105965] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.113108] pinctrl core: initialized pinctrl subsystem
[ 0.115775] NET: Registered protocol family 16
[ 0.120310] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.154759] omap_hwmod: debugss: _wait_target_disable failed
[ 0.237817] cpuidle: using governor ladder
[ 0.267802] cpuidle: using governor menu
[ 0.283275] OMAP GPIO hardware version 0.1
[ 0.322000] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.388408] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.395883] SCSI subsystem initialized
[ 0.396799] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring e
[ 0.397146] pps_core: LinuxPPS API ver. 1 registered
[ 0.397169] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.397232] PTP clock support registered
[ 0.397332] EDAC MC: Ver: 3.0.0
[ 0.399934] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.402042] Bluetooth: Core ver 2.22
[ 0.402159] NET: Registered protocol family 31
[ 0.402181] Bluetooth: HCI device and connection manager initialized
[ 0.402216] Bluetooth: HCI socket layer initialized
[ 0.402246] Bluetooth: L2CAP socket layer initialized
[ 0.402344] Bluetooth: SCO socket layer initialized
[ 0.404878] clocksource: Switched to clocksource timer1
[ 0.431143] NET: Registered protocol family 2
[ 0.432800] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.433035] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.433251] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.433465] UDP hash table entries: 512 (order: 1, 8192 bytes)
[ 0.433538] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
[ 0.433867] NET: Registered protocol family 1
[ 0.434743] RPC: Registered named UNIX socket transport module.
[ 0.434772] RPC: Registered udp transport module.
[ 0.434790] RPC: Registered tcp transport module.
[ 0.434806] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.436463] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 0.442337] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[ 0.463358] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.468052] NFS: Registering the id_resolver key type
[ 0.468137] Key type id_resolver registered
[ 0.468158] Key type id_legacy registered
[ 0.468262] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.497588] bounce: pool size: 64 pages
[ 0.498198] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 0.498230] io scheduler noop registered
[ 0.498250] io scheduler deadline registered
[ 0.498661] io scheduler cfq registered (default)
[ 0.501457] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 0.664827] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[ 0.673518] omap_uart 44e09000.serial: no wakeirq for uart0
[ 0.673769] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a OMAP UART0
[ 1.283126] console [ttyO0] enabled
[ 1.288082] omap_uart 48024000.serial: no wakeirq for uart2
[ 1.294468] 48024000.serial: ttyO2 at MMIO 0x48024000 (irq = 159, base_baud = 3000000) is a OMAP UART2
[ 1.305543] omap_uart 481a6000.serial: no wakeirq for uart3
[ 1.311759] 481a6000.serial: ttyO3 at MMIO 0x481a6000 (irq = 160, base_baud = 3000000) is a OMAP UART3
[ 1.322798] omap_uart 481a8000.serial: no wakeirq for uart4
[ 1.329090] 481a8000.serial: ttyO4 at MMIO 0x481a8000 (irq = 161, base_baud = 3000000) is a OMAP UART4
[ 1.356514] loop: module loaded
[ 1.367434] libphy: Fixed MDIO Bus: probed
[ 1.392896] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property
[ 1.401839] cpsw 4a100000.ethernet: Detected MACID = f4:5e:ab:39:6c:6c
[ 1.409043] cpsw 4a100000.ethernet: device node lookup for pps timer failed
[ 1.416610] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.428743] mousedev: PS/2 mouse device common for all mice
[ 1.435728] i2c /dev entries driver
[ 1.442752] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 1.450417] Bluetooth: HCI UART driver ver 2.3
[ 1.455210] Bluetooth: HCI UART protocol LL registered
[ 1.463029] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 600000 KHz
[ 1.470942] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP for freq 600000000 (-34)
[ 1.480273] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 300000 KHz
[ 1.490235] cpuidle: enable-method property 'ti,am3352' found operations
[ 1.501611] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 1.677029] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.690165] mmc1: new high speed MMC card at address 0001
[ 1.696424] mmc0: new high speed SDHC card at address aaaa
[ 1.705874] mmcblk0: mmc0:aaaa SL16G 14.8 GiB
[ 1.715570] mmcblk1: mmc1:0001 W62704 3.56 GiB
[ 1.723090] mmcblk0: p1 p2 p3 p4 < p5 p6 >
[ 1.728231] mmcblk1boot0: mmc1:0001 W62704 partition 1 2.00 MiB
[ 1.735850] mmcblk1boot1: mmc1:0001 W62704 partition 2 2.00 MiB
[ 1.745983] mmcblk1: p1 p2
[ 1.755041] random: fast init done
[ 1.778558] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[ 1.791981] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.798456] omap_hsmmc 47810000.mmc: card claims to support voltages below defined range
[ 1.809593] NET: Registered protocol family 10
[ 1.814580] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.829496] NET: Registered protocol family 17
[ 1.829695] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need .
[ 1.830151] Bluetooth: RFCOMM TTY layer initialized
[ 1.830207] Bluetooth: RFCOMM socket layer initialized
[ 1.830357] Bluetooth: RFCOMM ver 1.11
[ 1.830631] 8021q: 802.1Q VLAN Support v1.8
[ 1.831325] Key type dns_resolver registered
[ 1.831970] omap_voltage_late_init: Voltage driver support not added
[ 1.924274] mmc2: new SDIO card at address 0001
[ 1.943314] rtc-pcf8563 2-0051: rtc core: registered rtc-pcf8563 as rtc0
[ 1.952325] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[ 1.961964] rtc-pcf8563 2-0051: setting system clock to 2018-05-02 04:51:27 UTC (1525236687)
[ 1.973388] vwl1271: disabling
[ 1.976850] sw-ksz8863: disabling
[ 2.069617] EXT4-fs (mmcblk1p2): recovery complete
[ 2.074864] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.083978] VFS: Mounted root (ext4 filesystem) on device 179:18.
[ 2.092267] devtmpfs: error mounting -2
[ 2.104064] Freeing unused kernel memory: 1024K
[ 2.112050] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for gu.
[ 2.126147] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.t.
[ 130.925083] random: crng init done
Regards,
Rohit