NAND flash is not found in AT91SAM9263-EK

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

wuylz
Posts: 2
Joined: Sun Jan 20, 2019 12:37 pm

NAND flash is not found in AT91SAM9263-EK

Sun Jan 20, 2019 1:03 pm

hello,
I'm working on AT91SAM9263-EK (ver B) board, and I'm compling linux kernel 4.14 based on: linux4sam/bin/view/Linux4SAM/LinuxKernel

I used the config file and cmd 'make ARCH=arm at91_dt_defconfig', and generate a zImage and at91sam9263ek.dtb,
and when I download the kernel and dtb, the terminal show me the 'nand: second ID read did not match 52,04 against 0d,0d
nand: No NAND device found
',the nand flash driver does't work.
The attachment is the log file,What's wrong?
please help me! thank you


RomBOOT
>

AT91Bootstrap 3.8.12 (2018骞12鏈31鏃鏄熸湡涓€ 16:49:09 CST)

NAND: ONFI flash detected
NAND: Manufacturer ID: 0x2c Chip ID: 0xda
NAND: Page Bytes: 2048, Spare Bytes: 64
NAND: ECC Correctability Bits: 1, ECC Sector Bytes: 512
NAND: Disable On-Die ECC
NAND: Press the recovery button (BP2) to recovery
NAND: Using Software ECC
NAND: Image: Copy 0xa0000 bytes from 0x40000 to 0x21f00000
NAND: Done to load image
<debug_uart>

U-Boot 2018.07-linux4sam_6.0 (Dec 31 2018 - 18:27:19 +0800)

CPU: AT91SAM9263
Crystal frequency: 16.368 MHz
CPU clock : 199.919 MHz
Master clock : 99.960 MHz
DRAM: 64 MiB
NAND: 256 MiB
MMC: Atmel mci: 0
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Net:
Error: ethernet@fffbc000 address not set.
eth-1: ethernet@fffbc000
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x180000, size 0xc800
51200 bytes read: OK

NAND read: device 0 offset 0x200000, size 0x400000
4194304 bytes read: OK
Kernel image @ 0x22000000 [ 0x000000 - 0x3e3a70 ]
## Flattened Device Tree blob at 21000000
Booting using the fdt blob at 0x21000000
Loading Device Tree to 23eb5000, end 23ebf034 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.14.88-01432-g7e44ddb093c3-dirty (jing@jing-virtual-machine) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04)) #5 Sun Jan 20 18:25:47 CST 2019
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt: Machine model: Atmel at91sam9263ek
Memory policy: Data cache writeback
Built 1 zonelists, mobility grouping on. Total pages: 16256
Kernel command line: console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) root=/dev/mtdblock7 rw rootfstype=jffs2
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 56576K/65536K available (5935K kernel code, 233K rwdata, 1500K rodata, 204K init, 168K bss, 8960K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc05d42c0 (5937 kB)
.init : 0xc0775000 - 0xc07a8000 ( 204 kB)
.data : 0xc07a8000 - 0xc07e2700 ( 234 kB)
.bss : 0xc07e2700 - 0xc080c79c ( 169 kB)
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 9560166000 ns
sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 16777215996093750ns
Console: colour dummy device 80x30
Calibrating delay loop... 99.77 BogoMIPS (lpj=389120)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x20008400 - 0x2000847c
devtmpfs: initialized
OF: Duplicate name in fb@700000, renamed to "display#1"
random: get_random_u32 called from bucket_table_alloc+0x84/0x254 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 14931722236523437 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
AT91: PM: standby: standby, suspend: ulp0
gpio-at91 fffff200.gpio: at address c4875200
gpio-at91 fffff400.gpio: at address c4877400
gpio-at91 fffff600.gpio: at address c4879600
gpio-at91 fffff800.gpio: at address c487b800
gpio-at91 fffffa00.gpio: at address c487da00
pinctrl-at91 ahb:apb:pinctrl@fffff200: initialized AT91 pinctrl driver
clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 152962657116 ns
AT91: Detected SoC: at91sam9263, revision 2
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c-gpio i2c-gpio-0: using pins 36 (SDA) and 37 (SCL)
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource tcb_clksrc
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
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 named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=30 max_order=14 bucket_order=0
io scheduler noop registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
atmel_lcdfb 700000.fb: 700000.fb supply lcd not found, using dummy regulator
atmel_lcdfb 700000.fb: 150KiB frame buffer at 239c0000 (mapped at c4883000)
atmel_lcdfb 700000.fb: fb0: Atmel LCDC at 0x00700000 (mapped at c48aa000), irq 27
brd: module loaded
loop: module loaded
atmel_usart_serial.0.auto: ttyS0 at MMIO 0xffffee00 (irq = 16, base_baud = 6247474) is a ATMEL_SERIAL
console [ttyS0] enabled
atmel_usart_serial.1.auto: ttyS1 at MMIO 0xfff8c000 (irq = 21, base_baud = 6247474) is a ATMEL_SERIAL
atmel_spi fffa4000.spi: can not allocate dma coherent memory
atmel_spi fffa4000.spi: Atmel SPI Controller version 0x171 at 0xfffa4000 (irq 25)
libphy: Fixed MDIO Bus: probed
CAN device driver interface
at91_can fffac000.can: device registered (reg_base=c48f8000, irq=26)
macb fffbc000.ethernet: invalid hw address, using random
libphy: MACB_mii_bus: probed
Davicom DM9161A fffbc000.ethernet-ffffffff:00: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=fffbc000.ethernet-ffffffff:00, irq=POLL)
macb fffbc000.ethernet eth0: Cadence MACB rev 0x0001010c at 0xfffbc000 irq 22 (e6:7f:d8:f3:36:43)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-atmel: OHCI Atmel driver
at91_ohci a00000.ohci: failed to find sfr node
at91_ohci a00000.ohci: USB Host Controller
at91_ohci a00000.ohci: new USB bus registered, assigned bus number 1
at91_ohci a00000.ohci: irq 28, io mem 0x00a00000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: USB Host Controller
usb usb1: Manufacturer: Linux 4.14.88-01432-g7e44ddb093c3-dirty ohci_hcd
usb usb1: SerialNumber: at91
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver pl2303
usbserial: USB Serial support registered for pl2303
i2c /dev entries driver
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
AT91: Starting after user reset
at91_wdt fffffd40.watchdog: watchdog is disabled
at91_wdt: probe of fffffd40.watchdog failed with error -22
pinctrl-at91 ahb:apb:pinctrl@fffff200: pin pioA1 already requested by fffa4000.spi; cannot claim for fff80000.mmc
pinctrl-at91 ahb:apb:pinctrl@fffff200: pin-1 (fff80000.mmc) status -22
pinctrl-at91 ahb:apb:pinctrl@fffff200: could not request pin 1 (pioA1) from group mmc0_slot0_cmd_dat0-0 on device ahb:apb:pinctrl@fffff200
atmel_mci fff80000.mmc: Error applying setting, reverse things back
atmel_mci: probe of fff80000.mmc failed with error -22
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
nand: second ID read did not match 52,52 against 0d,0d
nand: No NAND device found
atmel-nand-controller 10000000.ebi:nand-controller: nand_scan_ident() failed: -19
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
input: gpio_keys as /devices/platform/gpio_keys/input/input0
hctosys: unable to open rtc device (rtc0)
ALSA device list:
No soundcards found.
VFS: Cannot open root device "mtdblock7" or unknown-block(0,0): error -19
Please append a correct "root=" boot option; here are the available partitions:
0100 8192 ram0
(driver?)
0101 8192 ram1
(driver?)
0102 8192 ram2
(driver?)
0103 8192 ram3
(driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
random: fast init done
blue_z
Location: USA
Posts: 1921
Joined: Thu Apr 19, 2007 10:15 pm

Re: NAND flash is not found in AT91SAM9263-EK

Tue Jan 22, 2019 12:50 am

wuylz wrote: I'm working on AT91SAM9263-EK (ver B) board,
What is the BOM revision of your board?
Do you have a BOM revision 007, and have you read section 1.5, NAND Flash Access Issue, of the Rev B User Guide?

wuylz wrote: ...and I'm compling linux kernel 4.14 based on: linux4sam/bin/view/Linux4SAM/LinuxKernel
You need to provide more context.
Is this the only Linux that you have booted on this board?

wuylz wrote: I used the config file and cmd 'make ARCH=arm at91_dt_defconfig', and generate a zImage and at91sam9263ek.dtb,
and when I download the kernel and dtb, the terminal show me the 'nand: second ID read did not match 52,04 against 0d,0d
nand: No NAND device found
',the nand flash driver does't work.
Actually that is not the sole error during the boot.
Prior to that NAND error there are watchdog and pinctrl issues:
wuylz wrote: ...
at91_wdt fffffd40.watchdog: watchdog is disabled
at91_wdt: probe of fffffd40.watchdog failed with error -22
pinctrl-at91 ahb:apb:pinctrl@fffff200: pin pioA1 already requested by fffa4000.spi; cannot claim for fff80000.mmc
pinctrl-at91 ahb:apb:pinctrl@fffff200: pin-1 (fff80000.mmc) status -22
pinctrl-at91 ahb:apb:pinctrl@fffff200: could not request pin 1 (pioA1) from group mmc0_slot0_cmd_dat0-0 on device ahb:apb:pinctrl@fffff200
atmel_mci fff80000.mmc: Error applying setting, reverse things back
atmel_mci: probe of fff80000.mmc failed with error -22
That Device Tree is suspect because it enables two peripherals (spi0 and mmc0) that share a common PIO (PIOA 1).
There could be something else that isn't properly resolved for an old board.

Have you tried building/testing any other (i.e. older) kernels?
For instance version 3.10, e.g. Linux4SAM 4.6, was quite solid.


Regards
wuylz
Posts: 2
Joined: Sun Jan 20, 2019 12:37 pm

Re: NAND flash is not found in AT91SAM9263-EK

Wed Jan 23, 2019 1:14 pm

Hi,
Thanks for your reply!
My hardware boom is :BOOM 006, after I connected pin 2 of J29 together with pin 30 of J23,the nand flash is working.
But as you mentioned, the sdcard and usb device doesn't work, and I need sdcard.
So, I tried to make kernel as your mentioned as : linux4sam_4.6, based on given link:https://github.com/linux4sam/linux-at91 ... ux4sam_4.6 , but there is another question, when builing complete, the dtb file didn't generate,I use the
command "make ARCH=arm at91sam9263_defconfig", and the dir "script/dtc/" doesn't generate dtc executable file .
so I use "apt-get install device-tree-complier" install dtc, and use dtc command to generator, the result is "the at91sam9263ek.dts" syntax error in line 9.
is there something wrong?

thanks~

blue_z wrote:
Tue Jan 22, 2019 12:50 am
wuylz wrote: I'm working on AT91SAM9263-EK (ver B) board,
What is the BOM revision of your board?
Do you have a BOM revision 007, and have you read section 1.5, NAND Flash Access Issue, of the Rev B User Guide?

wuylz wrote: ...and I'm compling linux kernel 4.14 based on: linux4sam/bin/view/Linux4SAM/LinuxKernel
You need to provide more context.
Is this the only Linux that you have booted on this board?

wuylz wrote: I used the config file and cmd 'make ARCH=arm at91_dt_defconfig', and generate a zImage and at91sam9263ek.dtb,
and when I download the kernel and dtb, the terminal show me the 'nand: second ID read did not match 52,04 against 0d,0d
nand: No NAND device found
',the nand flash driver does't work.
Actually that is not the sole error during the boot.
Prior to that NAND error there are watchdog and pinctrl issues:
wuylz wrote: ...
at91_wdt fffffd40.watchdog: watchdog is disabled
at91_wdt: probe of fffffd40.watchdog failed with error -22
pinctrl-at91 ahb:apb:pinctrl@fffff200: pin pioA1 already requested by fffa4000.spi; cannot claim for fff80000.mmc
pinctrl-at91 ahb:apb:pinctrl@fffff200: pin-1 (fff80000.mmc) status -22
pinctrl-at91 ahb:apb:pinctrl@fffff200: could not request pin 1 (pioA1) from group mmc0_slot0_cmd_dat0-0 on device ahb:apb:pinctrl@fffff200
atmel_mci fff80000.mmc: Error applying setting, reverse things back
atmel_mci: probe of fff80000.mmc failed with error -22
That Device Tree is suspect because it enables two peripherals (spi0 and mmc0) that share a common PIO (PIOA 1).
There could be something else that isn't properly resolved for an old board.

Have you tried building/testing any other (i.e. older) kernels?
For instance version 3.10, e.g. Linux4SAM 4.6, was quite solid.


Regards
blue_z
Location: USA
Posts: 1921
Joined: Thu Apr 19, 2007 10:15 pm

Re: NAND flash is not found in AT91SAM9263-EK

Thu Jan 24, 2019 10:09 am

wuylz wrote: My hardware boom is :BOOM 006, after I connected pin 2 of J29 together with pin 30 of J23,the nand flash is working.
"Boom"??!!
That makes no sense, since (1) the EK BOM Revision 006 cannot boot from on-board NAND Flash, and (2) the NAND Flash Access Issue applies to only EK BOM Revision 007.

What NAND flash chip is installed on your board?

wuylz wrote: I use the command "make ARCH=arm at91sam9263_defconfig", and the dir "script/dtc/" doesn't generate dtc executable file .
You specified the defconfig that uses a (legacy) board file instead of a Device Tree.

Regards

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 5 guests