i.MX6 and boot from eMMC - not working with MMC/eMMC config

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

i.MX6 and boot from eMMC - not working with MMC/eMMC config

Jump to solution
25,590 Views
ThomasG1z
Contributor III

Trying out eMMC boot from our custom board (partly based on the Sabrelite desgin) and find that the board will not boot from the eMMC device (on USDHC2 port) with what I think is the correct settings with boot mode "10" for using external boot config settings. With the BT_CFG1_5 bit '1' which should be correct for eMMC boot, it will not boot, however if I set this bit to '0' for SD boot, it will boot. The boards also boots from a uSD card on USDHC4 port with this bit set to '0' as it should. Interface is 4 bit.

The eMMC device I use is a rev 4.41 device N2M400FDB311A3CE - Micron Technology, Inc.

Something obvious(?) I must have overlooked... u-boot is currently written to offset 0x400 of the eMMC

1 Solution
5,297 Views
leoschwab
Contributor III

I've was just fighting with this today.

You need to fiddle some obscure settings in the eMMC before the boot ROM will deign to load U-Boot from it.  See this post for the tantalizing details, but basically you need to change the eMMC's low-level boot config.  This can be done through sysfs:

$ cd /sys/devices/platform/sdhci-esdhc-imx.2/mmc_host/mmc0/mmc0:0001

$ cat boot_info

boot_info:0x07;

  ALT_BOOT_MODE:1 - Supports alternate boot method

  DDR_BOOT_MODE:1 - Supports alternate dual data rate during boot

  HS_BOOTMODE:1 - Supports high speed timing during boot

boot_size:536870912KB

boot_partition:0x01;

  BOOT_ACK:0 - No boot acknowledge sent

  BOOT_PARTITION-ENABLE: 0 - Device not boot enabled

  PARTITION_ACCESS:1 - R/W boot partition 1

boot_bus:0x00

  BOOT_MODE:0 - Use single data rate + backward compatible timings in boot operation

$ echo 8 > boot_config

$ cat boot_info

boot_info:0x07;

  ALT_BOOT_MODE:1 - Supports alternate boot method

  DDR_BOOT_MODE:1 - Supports alternate dual data rate during boot

  HS_BOOTMODE:1 - Supports high speed timing during boot

boot_size:536870912KB

boot_partition:0x48;

  BOOT_ACK:1 - Boot acknowledge sent during boot operation

  BOOT_PARTITION-ENABLE: 1 - Boot partition 1 enabled

  PARTITION_ACCESS:0 - No access to boot partition

boot_bus:0x00

  BOOT_MODE:0 - Use single data rate + backward compatible timings in boot operation

This should enable booting from the first boot partition on the eMMC (/dev/mmcblk0boot0).  You could also echo a '9' into boot_config instead, which would preserve read/write access to the partition.

EDIT: Fixed sysfs path above, since you're using USDHC2 rather than USDHC3.

View solution in original post

9 Replies
5,297 Views
alex_park
Contributor II

Hello,

I'm also suffering from similar situation ...

[    0.000000] Booting Linux on physical CPU 0x0

[    0.000000] Linux version 3.10.53-00009-g5eecc3f (smart@ubuntu) (gcc version 4.8.3 20140401 (prerelease) (crosstool-NG 1.20.0 - 4.8-2014.11-x86_64) ) #1 SMP PREEMPT Sat Mar 12 00:05:29 KST 2016

[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d

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

[    0.000000] Machine: Freescale i.MX6 SoloX (Device Tree), model: Freescale i.MX6 SoloX SDB Board

[    0.000000] cma: CMA: reserved 320 MiB at aa000000

[    0.000000] Memory policy: ECC disabled, Data cache writealloc

[    0.000000] On node 0 totalpages: 262144

[    0.000000] free_area_init_node: node 0, pgdat 80b4df40, node_mem_map 80bb4000

[    0.000000]   DMA zone: 2048 pages used for memmap

[    0.000000]   DMA zone: 0 pages reserved

[    0.000000]   DMA zone: 262144 pages, LIFO batch:31

[    0.000000] PERCPU: Embedded 8 pages/cpu @813cb000 s8576 r8192 d16000 u32768

[    0.000000] pcpu-alloc: s8576 r8192 d16000 u32768 alloc=8*4096

[    0.000000] pcpu-alloc: [0] 0

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

[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk3p8 ro rootfstype=ext4 loglevel=8 rootdelay=3 lpj=9936896

[    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: 1024MB = 1024MB total

[    0.000000] Memory: 699100k/699100k available, 349476k 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]     vmalloc : 0xc0800000 - 0xff000000   (1000 MB)

[    0.000000]     lowmem  : 0x80000000 - 0xc0000000   (1024 MB)

[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)

[    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)

[    0.000000]       .text : 0x80008000 - 0x80ac8fd8   (11012 kB)

[    0.000000]       .init : 0x80ac9000 - 0x80b0b180   ( 265 kB)

[    0.000000]       .data : 0x80b0c000 - 0x80b4f420   ( 270 kB)

[    0.000000]        .bss : 0x80b4f420 - 0x80bb35d4   ( 401 kB)

[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[    0.000000] Preemptible hierarchical RCU implementation.

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

[    0.000000] NR_IRQS:16 nr_irqs:16 16

[    0.000000] L310 cache controller enabled

[    0.000000] l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x32030000, Cache size: 262144 B

[    0.000000] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms

[    0.000000] Console: colour dummy device 80x30

[    0.000509] Calibrating delay loop (skipped) preset value.. 1987.37 BogoMIPS (lpj=9936896)

[    0.000521] pid_max: default: 32768 minimum: 301

[    0.000647] Mount-cache hash table entries: 512

[    0.001166] CPU: Testing write buffer coherency: ok

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

[    0.001451] Setting up static identity map for 0x8053d5f0 - 0x8053d648

[    0.040202] Brought up 1 CPUs

[    0.040214] SMP: Total of 1 processors activated (1987.37 BogoMIPS).

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

[    0.040648] devtmpfs: initialized

[    0.043300] pinctrl core: initialized pinctrl subsystem

[    0.043522] regulator-dummy: no parameters

[    0.059784] NET: Registered protocol family 16

[    0.067424] DMA: preallocated 1024 KiB pool for atomic coherent allocations

[    0.067826] Use WDOG1 as reset source

[    0.070069] syscon 20c8000.anatop: regmap [mem 0x020c8000-0x020c8fff] registered

[    0.070252] vdd1p1: 800 <--> 1375 mV at 1100 mV

[    0.070485] vdd3p0: 2625 <--> 3400 mV at 3000 mV

[    0.070683] vdd2p5: 2100 <--> 2875 mV at 2500 mV

[    0.071020] cpu: 725 <--> 1450 mV

[    0.071247] vddpcie: 725 <--> 1450 mV

[    0.071523] vddsoc: 725 <--> 1450 mV

[    0.076026] syscon 20e4000.iomuxc-gpr: regmap [mem 0x020e4000-0x020e7fff] registered

[    0.078616] syscon 21bc000.ocotp-ctrl: regmap [mem 0x021bc000-0x021bffff] registered

[    0.078902] syscon 21ac000.romcp: regmap [mem 0x021ac000-0x021affff] registered

[    0.080602] syscon 2294000.mu: regmap [mem 0x02294000-0x02297fff] registered

[    0.082290] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.

[    0.082300] hw-breakpoint: maximum watchpoint size is 4 bytes.

[    0.083865] imx6sx-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver

[    0.089266] bio: create slab <bio-0> at 0

[    0.090844] mxs-dma 1804000.dma-apbh: initialized

[    0.091413] VCC_SD3: 3000 mV

[    0.091557] VCC_SD4: 3000 mV

[    0.091711] vref-3v3: 3300 mV

[    0.091839] PSU-5V0: 5000 mV

[    0.091986] usb_otg1_vbus: 5000 mV

[    0.092120] usb_otg2_vbus: 5000 mV

[    0.092496] i2c-core: driver [max17135] using legacy suspend method

[    0.092504] i2c-core: driver [max17135] using legacy resume method

[    0.092911] SCSI subsystem initialized

[    0.093073] usbcore: registered new interface driver usbfs

[    0.093115] usbcore: registered new interface driver hub

[    0.093230] usbcore: registered new device driver usb

[    0.094450] i2c i2c-0: IMX I2C adapter registered

[    0.094656] i2c i2c-1: IMX I2C adapter registered

[    0.095127] i2c i2c-2: IMX I2C adapter registered

[    0.095575] i2c i2c-3: IMX I2C adapter registered

[    0.095704] pps_core: LinuxPPS API ver. 1 registered

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

[    0.095732] PTP clock support registered

[    0.096177] MIPI CSI2 driver module loaded

[    0.096280] Advanced Linux Sound Architecture Driver Initialized.

[    0.097251] cfg80211: Calling CRDA to update world regulatory domain

[    0.098096] disp-regulator: no parameters

[    0.098426] pureg-dummy: no parameters

[    0.099028] Switching to clocksource mxc_timer1

[    0.105411] NET: Registered protocol family 2

[    0.106008] TCP established hash table entries: 8192 (order: 4, 65536 bytes)

[    0.106115] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)

[    0.106213] TCP: Hash tables configured (established 8192 bind 8192)

[    0.106280] TCP: reno registered

[    0.106293] UDP hash table entries: 512 (order: 2, 16384 bytes)

[    0.106329] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)

[    0.106550] NET: Registered protocol family 1

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

[    0.106795] RPC: Registered udp transport module.

[    0.106801] RPC: Registered tcp transport module.

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

[    0.107848] Bus freq driver module loaded

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

[    0.113874] NFS: Registering the id_resolver key type

[    0.113909] Key type id_resolver registered

[    0.113916] Key type id_legacy registered

[    0.113946] NTFS driver 2.1.30 [Flags: R/W].

[    0.114264] fuse init (API version 7.22)

[    0.114645] msgmni has been set to 2005

[    0.116649] io scheduler noop registered

[    0.116660] io scheduler deadline registered

[    0.116803] io scheduler cfq registered (default)

[    0.119788] MIPI DSI driver module loaded

[    0.122058] mxsfb 2224000.lcdif: registered mxc display driver ldb

[    0.126623] mxsfb 2224000.lcdif: initialized

[    0.127149] imx-sdma 20ec000.sdma: no iram assigned, using external mem

[    0.127487] imx-sdma 20ec000.sdma: no event needs to be remapped

[    0.129760] imx-sdma 20ec000.sdma: initialized

[    0.130355] imx-sdma 20ec000.sdma: loaded firmware 1.1

[    0.131342] pfuze100-regulator 0-0008: Full lay: 2, Metal lay: 1

[    0.131851] pfuze100-regulator 0-0008: FAB: 0, FIN: 0

[    0.131863] pfuze100-regulator 0-0008: pfuze200 found.

[    0.133076] SW1AB: 300 <--> 1875 mV at 1175 mV

[    0.134716] SW2: 800 <--> 3300 mV at 3300 mV

[    0.136321] SW3A: 400 <--> 1975 mV at 1350 mV

[    0.137931] SW3B: 400 <--> 1975 mV at 1350 mV

[    0.139033] SWBST: 5000 <--> 5150 mV at 5000 mV

[    0.140232] VSNVS: 1000 <--> 3000 mV at 3000 mV

[    0.140849] VREFDDR: 750 mV

[    0.141943] VGEN1: 800 <--> 1550 mV at 1200 mV

[    0.143055] VGEN2: 800 <--> 1550 mV at 1500 mV

[    0.144653] VGEN3: 1800 <--> 3300 mV at 2800 mV

[    0.146253] VGEN4: 1800 <--> 3300 mV at 1800 mV

[    0.147864] VGEN5: 1800 <--> 3300 mV at 3300 mV

[    0.149488] VGEN6: 1800 <--> 3300 mV at 3000 mV

[    0.150230] Serial: IMX driver

[    0.150480] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX

[    0.925992] console [ttymxc0] enabled

[    0.930160] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 59) is a IMX

[    0.937284] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX

[    0.944451] 21f0000.serial: ttymxc3 at MMIO 0x21f0000 (irq = 61) is a IMX

[    0.951573] 21f4000.serial: ttymxc4 at MMIO 0x21f4000 (irq = 62) is a IMX

[    0.958630] serial: Freescale lpuart driver

[    0.963999] imx sema4 driver is registered.

[    0.968270] [drm] Initialized drm 1.1.0 20060810

[    0.973283] [drm] Initialized vivante 1.0.0 20120216 on minor 0

[    0.981916] loop: module loaded

[    0.990924] libphy: fec_enet_mii_bus: probed

[    0.995623] fec 2188000.ethernet eth0: registered PHC device 0

[    1.001724] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver

[    1.009238] usbcore: registered new interface driver pegasus

[    1.014950] usbcore: registered new interface driver rtl8150

[    1.020682] usbcore: registered new interface driver r8152

[    1.026225] usbcore: registered new interface driver asix

[    1.031720] usbcore: registered new interface driver ax88179_178a

[    1.037861] usbcore: registered new interface driver cdc_ether

[    1.043774] usbcore: registered new interface driver cdc_eem

[    1.049524] usbcore: registered new interface driver net1080

[    1.055228] usbcore: registered new interface driver cdc_subset

[    1.061211] usbcore: registered new interface driver zaurus

[    1.066852] usbcore: registered new interface driver cdc_ncm

[    1.072551] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

[    1.079156] usbcore: registered new interface driver usb-storage

[    1.086079] imx6sx-pinctrl 20e0000.iomuxc: pin MX6SX_PAD_GPIO1_IO10 already requested by 20e0000.iomuxc; cannot claim for 2184000.usb

[    1.098144] imx6sx-pinctrl 20e0000.iomuxc: pin-15 (2184000.usb) status -22

[    1.105056] imx6sx-pinctrl 20e0000.iomuxc: could not request pin 15 on device 20e0000.iomuxc

[    1.113526] imx_usb 2184000.usb: Error applying setting, reverse things back

[    1.124121] ci_hdrc ci_hdrc.0: doesn't support gadget

[    1.129216] ci_hdrc ci_hdrc.0: EHCI Host Controller

[    1.134120] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1

[    1.159109] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00

[    1.164987] hub 1-0:1.0: USB hub found

[    1.168758] hub 1-0:1.0: 1 port detected

[    1.176302] ci_hdrc ci_hdrc.1: EHCI Host Controller

[    1.181256] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 2

[    1.199091] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00

[    1.204988] hub 2-0:1.0: USB hub found

[    1.208761] hub 2-0:1.0: 1 port detected

[    1.213297] mousedev: PS/2 mouse device common for all mice

[    1.219579] input: 20cc000.snvs-pwrkey as /devices/soc0/soc.1/2000000.aips-bus/20cc000.snvs-pwrkey/input/input0

[    1.229911] snvs_pwrkey 20cc000.snvs-pwrkey: i.MX snvs powerkey probed

[    1.236847] ft5x06-ts 2-0038: ft5x06: Could not detect touch screen.

[    1.243273] ft5x06: Mar 12 2016

[    1.246483] i2c-core: driver [isl29023] using legacy suspend method

[    1.252774] i2c-core: driver [isl29023] using legacy resume method

[    1.261456] rtc-ds1307 0-0068: rtc core: registered ds1307 as rtc0

[    1.267652] rtc-ds1307 0-0068: 56 bytes nvram

[    1.273008] snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc1

[    1.281468] i2c /dev entries driver

[    1.285479] cpuidle: using governor ladder

[    1.289636] cpuidle: using governor menu

[    1.293607] sdhci: Secure Digital Host Controller Interface driver

[    1.299823] sdhci: Copyright(c) Pierre Ossman

[    1.304249] usbcore: registered new interface driver ushc

[    1.310560] sdhci-pltfm: SDHCI platform and OF driver helper

[    1.317515] mmc3: no vqmmc regulator found

[    1.359095] mmc3: SDHCI controller on 219c000.usdhc [219c000.usdhc] using ADMA

[    1.366695] galcore: clk_get 2d core clock failed, disable 2d/vg!

[    1.374909] Galcore version 5.0.11.25762

[    1.463540] mmc3: BKOPS_EN bit is not set

[    1.495421] Bad mode in undefined instruction handler detected

[    1.501284] Internal error: Oops - bad mode: 0 [#1] PREEMPT SMP ARM

[    1.507557] Modules linked in:

[    1.510637] CPU: 0 PID: 19 Comm: kworker/u2:1 Not tainted 3.10.53-00009-g5eecc3f #1

[    1.518315] Workqueue: kmmcd mmc_rescan

[    1.522169] task: a811a780 ti: a8160000 task.ti: a8160000

[    1.527572] PC is at 0xffff10a4

[    1.530728] LR is at sdhci_execute_tuning+0x298/0x6d8

[    1.535785] pc : [<ffff10a4>]    lr : [<803628c4>]    psr: 20000197

[    1.535785] sp : a8161d80  ip : 00000000  fp : a82d8000

[    1.547266] r10: a8160000  r9 : 00012004  r8 : a82d839c

[    1.552493] r7 : 00000000  r6 : a8161e20  r5 : 00000096  r4 : 00000028

[    1.559022] r3 : cccccccd  r2 : 3333333f  r1 : 60000113  r0 : 00000005

[    1.565554] Flags: nzCv  IRQs off  FIQs on  Mode ABT_32  ISA ARM  Segment kernel

[    1.572953] Control: 10c53c7d  Table: 8000404a  DAC: 00000015

[    1.578701] Process kworker/u2:1 (pid: 19, stack limit = 0xa8160238)

[    1.585057] Stack: (0xa8161d80 to 0xa8162000)

[    1.589422] 1d80: 00000005 60000113 3333333f cccccccd 00000028 00000096 a8161e20 00000000

[    1.597604] 1da0: a82d839c 00012004 a8160000 a82d8000 00000000 a8161d80 803628c4 ffff10a4

[    1.605786] 1dc0: 20000197 ffffffff 00000015 a82d82c0 80b14424 80b26290 800487b4 107f000b

[    1.613968] 1de0: 000e000f 00000007 0bcd3d80 0bcd3d80 a80d8810 00000008 00000000 a8161e20

[    1.622149] 1e00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[    1.630330] 1e20: 00000015 00000000 00000000 00000000 00000000 00000000 00000035 00000000

[    1.638511] 1e40: 00000000 00000000 00000000 00000000 a82d8000 a82d8000 00000000 00000000

[    1.646693] 1e60: 00000003 a82d8000 80585428 00000000 a82d1000 80353ae4 00000000 a80d8810

[    1.654875] 1e80: a82d8000 a80d8870 c0ff8080 a82a4200 11010030 30344745 300096c8 e723b100

[    1.663057] 1ea0: a82d8000 a82d8000 80585290 a82d8000 00061a80 8058529c 00000000 a8160038

[    1.671238] 1ec0: a8003e00 80354478 00061a80 00ff8080 00000000 a82d81fc 80585290 80350f6c

[    1.679420] 1ee0: a8151080 a82d81fc a8003e00 a8159000 00000000 80041c74 ffd7dde6 a8081ea4

[    1.687601] 1f00: 00000001 a8081eb0 00000000 a8151080 a8003e14 a8151098 a8160000 a8160030

[    1.695783] 1f20: 00000001 a8160000 a8003e00 800428f8 a8160010 a8160000 800427c0 80b4f29f

[    1.703965] 1f40: 00000000 a8081e98 00000000 a8151080 800427c0 00000000 00000000 00000000

[    1.712146] 1f60: 00000000 80047ca4 de7fff55 00000000 21b7ff7e a8151080 00000000 00000000

[    1.720329] 1f80: a8161f80 a8161f80 00000000 00000000 a8161f90 a8161f90 a8161fac a8081e98

[    1.728510] 1fa0: 80047bf0 00000000 00000000 8000df18 00000000 00000000 00000000 00000000

[    1.736691] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[    1.744872] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 def2b5cf f9c5fdd1

[    1.753067] [<803628c4>] (sdhci_execute_tuning+0x298/0x6d8) from [<00000000>] (  (null))

[    1.761165] Code: 00000081 00000000 00000080 e7fddef1 (e7fddef1)

[    1.767286] ---[ end trace 38f4bae5b191aa92 ]---

[    1.868476] Unable to handle kernel paging request at virtual address ffffffec

[    1.875715] pgd = 80004000

[    1.878425] [ffffffec] *pgd=bff5e821, *pte=00000000, *ppte=00000000

[    1.884742] Internal error: Oops: 17 [#2] PREEMPT SMP ARM

[    1.890143] Modules linked in:

[    1.893220] CPU: 0 PID: 19 Comm: kworker/u2:1 Tainted: G      D      3.10.53-00009-g5eecc3f #1

[    1.901842] task: a811a780 ti: a8160000 task.ti: a8160000

[    1.907257] PC is at kthread_data+0x4/0xc

[    1.911274] LR is at wq_worker_sleeping+0xc/0xbc

[    1.915896] pc : [<800481bc>]    lr : [<80042e78>]    psr: 00000193

[    1.915896] sp : a8161c10  ip : 00000420  fp : a8161cb4

[    1.927375] r10: a806c000  r9 : a811a918  r8 : 80b14700

[    1.932602] r7 : 00000000  r6 : a8160018  r5 : a811a780  r4 : 00000000

[    1.939131] r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : a811a780

[    1.945662] Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user

[    1.952887] Control: 10c53c7d  Table: 8000404a  DAC: 00000015

[    1.958635] Process kworker/u2:1 (pid: 19, stack limit = 0xa8160238)

[    1.964992] Stack: (0xa8161c10 to 0xa8162000)

[    1.969355] 1c00:                                     813ccac0 8053bc0c 80b30d88 60000193

[    1.977537] 1c20: 00000004 a8161c54 a814a800 80b0d6d8 a8160010 80b0aac0 80b0aac0 80b0aac0

[    1.985719] 1c40: 80b4f2d3 805405dc a810da40 800b562c 00000000 00000000 a81509c0 80b09318

[    1.993901] 1c60: 80b50dd8 00200200 a810da40 a811a780 a814a800 a806c000 80b09318 8002e824

[    2.002084] 1c80: a810df44 00000000 a811a778 a8160038 a811a89c 00000001 a811a778 a811a89c

[    2.010267] 1ca0: a811a778 a8160000 a811a89c a806c000 a811a780 8002eefc a8161cc8 00000001

[    2.018449] 1cc0: a811a8e4 002b002b 002b002b a8161cc8 00000000 80b18678 a8160000 0000000b

[    2.026630] 1ce0: 00000001 ffff10a6 ffff10a8 80a00070 80b4f744 80011570 a8160238 0000000b

[    2.034811] 1d00: 00000000 60000193 a8160038 00000000 00000000 00000008 30000000 30303030

[    2.042993] 1d20: 20313830 30303030 30303030 30303020 38303030 37652030 65646466 28203166

[    2.051174] 1d40: 64663765 31666564 a8002029 80536c40 80a001c0 a8161d80 ffff10a4 20000197

[    2.059355] 1d60: ffffffff a82d839c 00012004 a8160000 a82d8000 800119d8 cccccccd 803628c4

[    2.067537] 1d80: 00000005 60000113 3333333f cccccccd 00000028 00000096 a8161e20 00000000

[    2.075719] 1da0: a82d839c 00012004 a8160000 a82d8000 00000000 a8161d80 803628c4 ffff10a4

[    2.083901] 1dc0: 20000197 ffffffff 00000015 a82d82c0 80b14424 80b26290 800487b4 107f000b

[    2.092082] 1de0: 000e000f 00000007 0bcd3d80 0bcd3d80 a80d8810 00000008 00000000 a8161e20

[    2.100263] 1e00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[    2.108444] 1e20: 00000015 00000000 00000000 00000000 00000000 00000000 00000035 00000000

[    2.116626] 1e40: 00000000 00000000 00000000 00000000 a82d8000 a82d8000 00000000 00000000

[    2.124807] 1e60: 00000003 a82d8000 80585428 00000000 a82d1000 80353ae4 00000000 a80d8810

[    2.132989] 1e80: a82d8000 a80d8870 c0ff8080 a82a4200 11010030 30344745 300096c8 e723b100

[    2.141170] 1ea0: a82d8000 a82d8000 80585290 a82d8000 00061a80 8058529c 00000000 a8160038

[    2.149352] 1ec0: a8003e00 80354478 00061a80 00ff8080 00000000 a82d81fc 80585290 80350f6c

[    2.157533] 1ee0: a8151080 a82d81fc a8003e00 a8159000 00000000 80041c74 ffd7dde6 a8081ea4

[    2.165714] 1f00: 00000001 a8081eb0 00000000 a8151080 a8003e14 a8151098 a8160000 a8160030

[    2.173896] 1f20: 00000001 a8160000 a8003e00 800428f8 a8160010 a8160000 800427c0 80b4f29f

[    2.182077] 1f40: 00000000 a8081e98 00000000 a8151080 800427c0 00000000 00000000 00000000

[    2.190257] 1f60: 00000000 80047ca4 de7fff55 00000000 21b7ff7e a8151080 00000000 00000000

[    2.198439] 1f80: a8161f80 a8161f80 00000001 00010001 a8161f90 a8161f90 a8161fac a8081e98

[    2.206620] 1fa0: 80047bf0 00000000 00000000 8000df18 00000000 00000000 00000000 00000000

[    2.214800] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[    2.222982] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 def2b5cf f9c5fdd1

[    2.231174] [<800481bc>] (kthread_data+0x4/0xc) from [<80042e78>] (wq_worker_sleeping+0xc/0xbc)

[    2.239884] [<80042e78>] (wq_worker_sleeping+0xc/0xbc) from [<8053bc0c>] (__schedule+0x380/0x598)

[    2.248769] [<8053bc0c>] (__schedule+0x380/0x598) from [<8002eefc>] (do_exit+0x64c/0x8a4)

[    2.256961] [<8002eefc>] (do_exit+0x64c/0x8a4) from [<80011570>] (die+0x210/0x3d4)

[    2.264541] [<80011570>] (die+0x210/0x3d4) from [<800119d8>] (bad_mode+0x4c/0x5c)

[    2.272042] [<800119d8>] (bad_mode+0x4c/0x5c) from [<803628c4>] (sdhci_execute_tuning+0x298/0x6d8)

[    2.281010] [<803628c4>] (sdhci_execute_tuning+0x298/0x6d8) from [<00000000>] (  (null))

[    2.289106] Code: e513001c e7e00150 e12fff1e e590316c (e5130014)

[    2.295206] ---[ end trace 38f4bae5b191aa93 ]---

[    2.299827] Fixing recursive fault but reboot is needed!

[    0.385258]

0 Kudos
5,297 Views
xray38
Contributor I

Hi,

I am trying to figure out the commands needed to make the following changes to the eMMC extended CSD (179)

I am using the Micron 4GB eMMC, JDEC 4.5 with my iMX6 solo.  Below is what I can get from Micron's technical note.

The examples posted above work for editing the boot partition, enabling write and read to it, boot acknowledgement but I am wondering if there is a cheat sheet on additional commands to open up more features.

Partition_Config Register (EXT CSD 179)

Bit 0:2 0x1 (Partition Access)
Bit 5:3 0x1 (Boot Partition)
Bit 6 0x1 (Boot Access)
Bit 7 N/A

Thanks!  I am new to programming so please excuse any omission.

0 Kudos
5,297 Views
jiwongpark
Contributor I

Hi, in my case, emmc 5.1 (4GB)

android jb 4.3-1.1.0 mfgtool's following code in ucl2.xml doesn't work but without any error messages.

$ echo 8 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config

so boot myboard with sdcard, enter above command finally set emmc boot flag on.

i can't understand why.

0 Kudos
5,297 Views
niklasmolin
Senior Contributor I

Hi Thomas.

Did you manage to resolve this?

I'm trying to boot from a custom board too (based on SabreSD design), but we are using an emmc v4.5.

Did you see the u-boot start at all?

For me I don't even see the u-boot start.

I recall I managed to get the board boot from the emmc on the SabreSD, but I think I just used the .sdcard image to initialize the flash.

When i start with the SD card I can read the content of the flash.

Is the u-boot stored in the different location on the SDcard compared to the emmc?

Regards,

Niklas

0 Kudos
5,297 Views
ThomasG1z
Contributor III

Yes got it working, as per the reply by Leo. The main culprit being the need to set the boot enable flag of the bootpartition with u-boot. Remember the eMMC has two boot paritions, and its important that you write u-boot to one of those and enable it for boot. That should be done within a booted linux system itself. (or indirectly via the manufacturing toolkit)

0 Kudos
5,297 Views
imxcommunitysco
Senior Contributor II

Since no reply from you, we assumed the DI is answered.

0 Kudos
5,298 Views
leoschwab
Contributor III

I've was just fighting with this today.

You need to fiddle some obscure settings in the eMMC before the boot ROM will deign to load U-Boot from it.  See this post for the tantalizing details, but basically you need to change the eMMC's low-level boot config.  This can be done through sysfs:

$ cd /sys/devices/platform/sdhci-esdhc-imx.2/mmc_host/mmc0/mmc0:0001

$ cat boot_info

boot_info:0x07;

  ALT_BOOT_MODE:1 - Supports alternate boot method

  DDR_BOOT_MODE:1 - Supports alternate dual data rate during boot

  HS_BOOTMODE:1 - Supports high speed timing during boot

boot_size:536870912KB

boot_partition:0x01;

  BOOT_ACK:0 - No boot acknowledge sent

  BOOT_PARTITION-ENABLE: 0 - Device not boot enabled

  PARTITION_ACCESS:1 - R/W boot partition 1

boot_bus:0x00

  BOOT_MODE:0 - Use single data rate + backward compatible timings in boot operation

$ echo 8 > boot_config

$ cat boot_info

boot_info:0x07;

  ALT_BOOT_MODE:1 - Supports alternate boot method

  DDR_BOOT_MODE:1 - Supports alternate dual data rate during boot

  HS_BOOTMODE:1 - Supports high speed timing during boot

boot_size:536870912KB

boot_partition:0x48;

  BOOT_ACK:1 - Boot acknowledge sent during boot operation

  BOOT_PARTITION-ENABLE: 1 - Boot partition 1 enabled

  PARTITION_ACCESS:0 - No access to boot partition

boot_bus:0x00

  BOOT_MODE:0 - Use single data rate + backward compatible timings in boot operation

This should enable booting from the first boot partition on the eMMC (/dev/mmcblk0boot0).  You could also echo a '9' into boot_config instead, which would preserve read/write access to the partition.

EDIT: Fixed sysfs path above, since you're using USDHC2 rather than USDHC3.

5,297 Views
ningli
Contributor III

Hi Leo,

i have a problem like this. Can you view my question?

this is address can't boot emmc

0 Kudos
5,297 Views
marcelgrosshans
Contributor II

Hi Leo,

I'm using kernel 3.10.17 on the iMX6Q sabre sd board. It seems like the path of boot_info has moved to:

/sys/devices/soc0/soc.1/2100000.aips-bus/219c000.usdhc/mmc_host/mmc2/mmc2:0001/boot_info

The content is as follows:

mmc2: BKOPS_EN bit is not set
boot_info:0x07;
  ALT_BOOT_MODE:1 - Supports alternate boot method
  DDR_BOOT_MODE:1 - Supports alternate dual data rate during boot
  HS_BOOTMODE:1 - Supports high speed timing during boot
boot_size:2048KB
boot_partition:0x49;
  BOOT_ACK:1 - Boot acknowledge sent during boot operation
  BOOT_PARTITION-ENABLE: 1 - Boot partition 1 enabled
boot_bus:0x00
  BOOT_MODE:0 - Use single data rate + backward compatible timings in boot operation
  RESET_BOOT_BUS_WIDTH:0 - Reset bus width to x1, single data rate and backwardcompatible timings after b
oot operation
  BOOT_BUS_WIDTH:0 - x1 (sdr) or x4 (ddr) bus width in boot operation mode

Is there any detailed description on what else can be set from command line with boot_config?

0 Kudos