hi all
i make a board based on imx283 evk, but repalce SD card with emmc(SanDisk SDIN5D2-16G) .data0-3,clk.cmd.now there is a problem:the emmc is new one,not formatted,even no partition.so i can not use it directly.debug window txt out:new high speed.....14.8Gb/unknown partition table.how can i create a new patition and format it?
i tried "fdisk",but when i execute"fdisk /dev/mmcblk0",system is down.
i tried again with a sd card that i canfix it use card reader.
1,insert a formatted sd card, powerup, txt out:.....14.8Gb/mmcblk0p1;
2,execut"fdisk /dev/mmcblk0",type "m" for help,and type "d" for delete patition,type "w" and quit, powerdown;
3,powerup,txt out:....14.8Gb/unknown patition table;
4, i can not do anything unless put the sd card to cardreader and format with PC.
Hi Xu Wang,
I didn't understand you completely, which boot device are you using?
And could you please paste the bootlog here?
Best Regards,
Isaí
"fdisk" command is useless,if i type"fdisk /dev/mmcblk0",the system is down.
Ok, let's try this, check if you can read/write on the eMMC, you can try 'dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=512.' Just to make sure it's not a disk issue.
It seems more like a hardware issue, could you please provide the SD/eMMC schematic and your code for pin configuration?
Best regards,
Isai
Isai,
thanks for reply.
i tried 'dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=512.' it does not work too, system is down.
can i send emai to you, for i don't know how to upload pdf file.
best regards.
wang
Hi Wang,
You can attach a file using the advanced editor located at the top right of the reply section. Once you have selected the advanced editor there will be an "Attach" option. You can use the "Insert Image" option as well.
Have a good one,
Isai
Isai,
here is part of sch.
IMX283_CORE is a core board base on offical EVM,and it is work well on other projects.i just replace SD card with EMMC.
UPDATE:
1,emmc is :SDIN5D2-16G;
2,SSP0_WP is pull-down to GND.
regards,
wang
Hi Wang,
It seems that your schematic is correct.
According to your bootlog you are using battery power, this may cause problems if the regulators are not configured correctly.
In chapter 11 of the Reference Manual:
"If the system is operating from the DC-DC converter and is using more
current than the linear regulators can supply, then the VDDD, VDDA, and VDDIO rails
will droop when 5V is attached and the system may brownout and shut down."
Please make sure that the microcontroller always has valid voltages during eMMC or SD Card R/W operations, which is the time when they use more current. This may be the cause of your shut down.
If you believe this is a Linux problem, you can try R/W on the eMMC in Uboot :
- Choose the right mmc instance of your eMMC (You can check the available devices with "mmc list")
U-Boot > mmc dev #instance
Example:
U-Boot > mmc dev 2
mmc2(part 0) is current device
- If you are not sure that's the right one you can see its properties with: mmcinfo.
Example:
U-Boot > mmcinfo
Device: FSL_SDHC
Manufacturer ID: 45
OEM: 100
Name: SEM08
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.41
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 8-bit
- Now you can write/read on it
U-Boot > mmc write 0x10000000 0x600 0x10
MMC write: dev # 2, block # 1536, count 16 ... 16 blocks write: OK
U-Boot > mmc read 0x10000000 0x600 0x10
MMC read: dev # 2, block # 1536, count 16 ... 16 blocks read: OK
Best regards,
Isai
Isai,
I trid "mmcinfo" command, but it seem no this command.and the power is correct. it looks like hardware issue, yes, but i am not sure, so i want to exclude sofeware problem.
regards.
wang.
here is bootlog:
PowerPrep start initialize power...
Battery Voltage = 4.79V
5v source detected.Valid battery voltage detected.Booting from battery voltage source.
Apr 13 201417:13:10
FRAC 0x92925552
memory type is DDR2
Wait for ddr ready 1power 0x00820616
Frac 0x92925552
start change cpu freq
hbus 0x00000003
cpu 0x00010001
start test memory accress
ddr2 0x40000000
finish simple test
U-Boot 2009.08 (Dec 03 2014 - 21:04:20)
Freescale i.MX28 family
CPU: 454 MHz
BUS: 151 MHz
EMI: 205 MHz
GPMI: 24 MHz
DRAM: 128 MB
NAND: Manufacturer : Macronix (0xc2)
Device Code : 0xf1
Cell Technology : SLC
Chip Size : 128 MiB
Pages per Block : 64
Page Geometry : 2048+64
ECC Strength : 1 bits
ECC Size : 512 B
Data Setup Time : 5 ns
Data Hold Time : 5 ns
Address Setup Time: 15 ns
GPMI Sample Delay : 6 ns
tREA : 20 ns
tRLOH : 4294967295 ns
tRHOH : 4294967295 ns
Description : MX30LF1G08AA
128 MiB
*** Warning - bad CRC or NAND, using default environment
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:04:00:00:00:00
FEC0
Hit any key to stop autoboot: 0
MX28 U-Boot > mmcinfo
Unknown command 'mmcinfo' - try 'help'
MX28 U-Boot > help
? - alias for 'help'
autoscr - DEPRECATED - use "source" command instead
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
echo - echo args to console
go - start application at address 'addr'
help - print online help
iminfo - print header information for application image
imxtract- extract a part of a multi-image
itest - return true/false on integer compare
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
md - memory display
mii - MII utility commands
mm - memory modify (auto-incrementing address)
mtest - simple RAM read/write test
mw - memory write (fill)
nand - NAND sub-system
nboot - boot from NAND device
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sleep - delay execution for some time
source - run script from memory
tftpboot- boot image via network using TFTP protocol
version - print monitor version
MX28 U-Boot >
Hi Xu Wang,
If your u-boot doesn't have that command you need to add it in your board configuration file mx28evk.h
#define CONFIG_CMD_MMC
Best regards,
Isai
laid,
Thanks for replay, as a now one in embedded linux, I have no idea about bootlog, I will try what you say.
I don't use battery suplly, I just short battery pin and vcc pin.
Regards,
Wang
hi Isai,
thanks for reply.
my board boot from nand flash,and the system files are in nand flash too.i just replace sd card with emmc chip.i want to use it for storage.
here is the bootlog:
PowerPrep start initialize power...
Battery Voltage = 4.72V
5v source detected.Valid battery voltage detected .Booting from battery voltage source.
Apr 13 201417:13:10
FRAC 0x92925552
memory type is DDR2
Wait for ddr ready 1power 0x00820616
Frac 0x92925552
start change cpu freq
hbus 0x00000003
cpu 0x00010001
start test memory accress
ddr2 0x40000000
finish simple test
U-Boot 2009.08 (Dec 03 2014 - 21:04:20)
Freescale i.MX28 family
CPU: 454 MHz
BUS: 151 MHz
EMI: 205 MHz
GPMI: 24 MHz
DRAM: 128 MB
NAND: Manufacturer : Macronix (0xc2)
Device Code : 0xf1
Cell Technology : SLC
Chip Size : 128 MiB
Pages per Block : 64
Page Geometry : 2048+64
ECC Strength : 1 bits
ECC Size : 512 B
Data Setup Time : 5 ns
Data Hold Time : 5 ns
Address Setup Time: 15 ns
GPMI Sample Delay : 6 ns
tREA : 20 ns
tRLOH : 4294967295 ns
tRHOH : 4294967295 ns
Description : MX30LF1G08AA
128 MiB
*** Warning - bad CRC or NAND, using default environment
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:04:00:00:00:00
FEC0
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x300000, size 0x300000
3145728 bytes read: OK
## Booting kernel from Legacy Image at 42000000 ...
Image Name: Linux-2.6.35.3-670-g914558e-gb28
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2563784 Bytes = 2.4 MB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.35.3-670-g914558e-gb2817d0-dirty (myzr@myzr) (gcc version 4.4. 4 (4.4.4_09.06.2010) ) #5 PREEMPT Fri Dec 19 16:34:45 CST 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Freescale MX28EVK board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: console=ttyAM0,115200 ubi.mtd=1 root=ubi0:rootfs0 rootfstyp e=ubifs gpmi rw rootwait ip=none
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 124316k/124316k available, 6756k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xfde00000 - 0xffe00000 ( 32 MB)
vmalloc : 0xc8800000 - 0xf0000000 ( 632 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc0030000 ( 160 kB)
.text : 0xc0030000 - 0xc04f7000 (4892 kB)
.data : 0xc04f8000 - 0xc0535ca0 ( 248 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:288
Console: colour dummy device 80x30
console [ttyAM0] enabled
Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
pid_max: default: 32768 minimum: 301
Security Framework initialized
SELinux: Initializing.
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
regulator: vddd: 800 <--> 1575 mV at 1500 mV fast normal
regulator: vdddbo: 800 <--> 1575 mV fast normal
regulator: vdda: 1500 <--> 2275 mV at 1800 mV fast normal
vddio = 3380000, val=10
regulator: vddio: 2880 <--> 3680 mV at 3380 mV fast normal
regulator: overall_current: fast normal
regulator: vbus5v:
regulator: mxs-duart-1: fast normal
regulator: mxs-bl-1: fast normal
regulator: mxs-i2c-1: fast normal
regulator: mmc_ssp-1: fast normal
regulator: mmc_ssp-2: fast normal
regulator: charger-1: fast normal
regulator: power-test-1: fast normal
regulator: cpufreq-1: fast normal
i.MX IRAM pool: 124 KB@0xc8820000
Initializing GPMI pins
usb DR wakeup device is registered
IMX usb wakeup probe
audit: cannot initialize inotify handle
bio: create slab <bio-0> at 0
SCSI subsystem initialized
Freescale USB OTG Driver loaded, $Revision: 1.55 $
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource mxs clock source
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Bus freq driver module loaded
IMX usb wakeup probe
usb h1 wakeup device is registered
mxs_cpu_init: cpufreq init finished
audit: initializing netlink socket (disabled)
type=2000 audit(0.610:1): initialized
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 242
alg: No test for stdrng (krng)
cryptodev: driver loaded.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 60x34
mxs-duart.0: ttyAM0 at MMIO 0x80074000 (irq = 47) is a DebugUART
mxs-auart.0: ttySP0 at MMIO 0x8006a000 (irq = 112) is a mxs-auart.0
Found APPUART 3.1.0
mxs-auart.1: ttySP1 at MMIO 0x8006c000 (irq = 113) is a mxs-auart.1
Found APPUART 3.1.0
mxs-auart.2: ttySP2 at MMIO 0x8006e000 (irq = 114) is a mxs-auart.2
Found APPUART 3.1.0
mxs-auart.3: ttySP3 at MMIO 0x80070000 (irq = 115) is a mxs-auart.3
Found APPUART 3.1.0
mxs-auart.4: ttySP4 at MMIO 0x80072000 (irq = 116) is a mxs-auart.4
Found APPUART 3.1.0
brd: module loaded
loop: module loaded
i.MX GPMI NFC
NFC: Version 1, 8-chip GPMI and BCH
Boot ROM: Version 1, Single-chip boot area, block mark swapping supported
Scanning for NAND Flash chips...
NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (Macronix NAND 128MiB 3,3V 8-bit)
-----------------------------
NAND Flash Device Information
-----------------------------
Manufacturer : Macronix (0xc2)
Device Code : 0xf1
Cell Technology : SLC
Chip Size : 128 MiB
Pages per Block : 64
Page Geometry : 2048+64
ECC Strength : 1 bits
ECC Size : 512 B
Data Setup Time : 5 ns
Data Hold Time : 5 ns
Address Setup Time: 15 ns
GPMI Sample Delay : 6 ns
tREA : 20 ns
tRLOH : 4294967295 ns
tRHOH : 4294967295 ns
Description : MX30LF1G08AA
-----------------
Physical Geometry
-----------------
Chip Count : 1
Page Data Size in Bytes: 2048 (0x800)
Page OOB Size in Bytes : 64
Block Size in Bytes : 131072 (0x20000)
Block Size in Pages : 64 (0x40)
Chip Size in Bytes : 134217728 (0x8000000)
Chip Size in Pages : 65536 (0x10000)
Chip Size in Blocks : 1024 (0x400)
Medium Size in Bytes : 134217728 (0x8000000)
------------
NFC Geometry
------------
ECC Algorithm : BCH
ECC Strength : 8
Page Size in Bytes : 2112
Metadata Size in Bytes : 10
ECC Chunk Size in Bytes: 512
ECC Chunk Count : 4
Payload Size in Bytes : 2048
Auxiliary Size in Bytes: 16
Auxiliary Status Offset: 12
Block Mark Byte Offset : 1999
Block Mark Bit Offset : 0
-----------------
Boot ROM Geometry
-----------------
Boot Area Count : 1
Boot Area Size in Bytes : 20971520 (0x1400000)
Stride Size in Pages : 64
Search Area Stride Exponent: 2
Boot area protection is enabled.
Creating 2 MTD partitions on "gpmi-nfc-main":
0x000000000000-0x000001400000 : "gpmi-nfc-0-boot"
0x000001400000-0x000008000000 : "gpmi-nfc-general-use"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: attached mtd1 to ubi0
UBI: MTD device name: "gpmi-nfc-general-use"
UBI: MTD device size: 108 MiB
UBI: number of good PEBs: 864
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 864
UBI: number of PEBs reserved for bad PEB handling: 8
UBI: max/mean erase counter: 2/1
UBI: image sequence number: 0
UBI: background thread "ubi_bgt0d" started, PID 1004
ubiblka: unknown partition table
mxs-spi mxs-spi.0: Max possible speed 24000 = 24000000/2 kHz
mxs-spi mxs-spi.0: at 0x80014000 mapped to 0xF0014000, irq=84, bus 1, DMA ver_major 4
FEC Ethernet Driver
fec_enet_mii_bus: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
fsl-ehci fsl-ehci: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci: irq 93, io base 0x80080000
fsl-ehci fsl-ehci: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 2
fsl-ehci fsl-ehci.0: irq 92, io base 0x80090000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
ARC USBOTG Device Controller driver (1 August 2005)
mice: PS/2 mouse device common for all mice
input: mxs-kbd as /devices/platform/mxs-kbd.0/input/input0
input: MXS touchscreen as /devices/virtual/input/input1
MXS RTC driver v1.0 hardware v2.3.0
mxs-rtc mxs-rtc.0: rtc core: registered mxs-rtc as rtc0
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
Linux video capture interface: v2.00
mxs-pxp mxs-pxp.0: initialized
mxs watchdog: initialized, heartbeat 19 sec
mxs-mmc: MXS SSP Controller MMC Interface driver
__mxs_reset_block(f0010000): timeout when resetting
__mxs_reset_block(f0010000): timeout when resetting
mxs-mmc mxs-mmc.0: mmc0: MXS SSP MMC DMAIRQ 82 ERRIRQ 96
dcp dcp.0: DCP crypto enabled.!
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
sgtl5000_hw_read: read reg error : Reg 0x00
Device with ID register 0 is not a SGTL5000
mxs-spdif mxs-spdif.0: MXS SPDIF Audio Transmitter
No device for codec mxs spdif
No device for DAI mxs spdif
No device for DAI mxs-saif
No device for DAI mxs-spdif
asoc: mxs spdif <-> mxs-spdif mapping ok
ALSA device list:
#0: mxs-evk (mxs spdif)
TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
regulator_init_complete: incomplete constraints, leaving vbus5v on
mxs-rtc mxs-rtc.0: setting system clock to 1970-01-01 00:00:12 UTC (12)
mmc0: new high speed MMC card at address 0001
mmcblk0: mmc0:0001 SEM16G 14.8 GiB
mmcblk0: unknown partition table
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs0"
UBIFS: file system size: 106913792 bytes (104408 KiB, 101 MiB, 842 LEBs)
UBIFS: journal size: 5332992 bytes (5208 KiB, 5 MiB, 42 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 4952683 bytes (4836 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:14.
Freeing init memory: 160K
starting pid 1121, tty '': '/etc/rc.d/rcS'
Mounting /proc and /sys
Starting the hotplug events dispatcher udevd
Synthesizing initial hotplug events
Setting the hostname to freescale
Mounting filesystems
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
starting pid 2273, tty '': '/etc/rc.d/rc_gpu.S'
can't run '/etc/rc.d/rc_gpu.S': No such file or directory
starting pid 2274, tty '/dev/ttyAM0': '/bin/login root'
login[2274]: root login on 'ttyAM0'
BusyBox v1.20.2 () built-in shell (ash)
Enter 'help' for a list of built-in commands.
root@freescale ~$
////end
all bootlog is here,i want to known how to format the chip.
best regards
wang