Status of sam9x5 support for 3.x kernels

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

Moderator: nferre

BGerold
Posts: 2
Joined: Tue Feb 26, 2013 9:03 pm

Re: Status of sam9x5 support for 3.x kernels

Tue Feb 26, 2013 9:32 pm

I have successfully built/booted the 3.6.9 kernel on sam9x25ek, but am getting the same issue with the RTC. "hwclock: can't open '/dev/misc/rtc': No such file or directory"

Is anyone else still having a similar issue?
rlstrand
Posts: 1
Joined: Wed Feb 24, 2010 9:24 pm

Re: Status of sam9x5 support for 3.x kernels

Thu Apr 11, 2013 2:49 am

I have been working on getting 3.6.9 up on a custom board with a sam9g35. I have a configuration like this:

128 Mb DDR2 ram
256 Mb NAND flash
No LCD display interface
1 debug uart (TTL) /dev/ttyS0
3 usarts (1 TTL and 2 RS-485, /dev/ttyS1-3)
1 spi (spi1) with 4 chip selects
2 SD card interfaces
1 USB host port
1 Ethernet port
7 user interface input buttons
2 status LEDs

Almost all is working, except I am having trouble getting spi1 and rtc to work.

Googling on the web I found this:

https://patchwork.kernel.org/patch/2320991/

I added this to the 9x5.dtsi

rtc@fffffeb0 {
compatible = "atmel,at91rm9200-rtc";
reg = <0xfffffeb0 0x40>;
interrupts = <1 4 7>;
status = "disabled";
};

I now get a /dev/rtc0 device.

I seem to be able to read /dev/rtc0 but not write it:

# hwclock -r
Mon Jan 1 00:41:10 2007 0.000000 seconds
# hwclock -r
Mon Jan 1 00:41:16 2007 0.000000 seconds
# hwclock -r
Mon Jan 1 00:41:19 2007 0.000000 seconds
# hwclock -r
Mon Jan 1 00:41:21 2007 0.000000 seconds
# time
BusyBox v1.20.2 (2013-04-09 14:25:29 CDT) multi-call binary.

Usage: time [-v] PROG ARGS

Run PROG, display resource usage when it exits

-v Verbose

# hwclock -w
irq 16: nobody cared (try booting with the "irqpoll" option)
[<c000d278>] (unwind_backtrace+0x0/0xe0) from [<c004d64c>] (__report_bad_irq+0x24/0xd8)
[<c004d64c>] (__report_bad_irq+0x24/0xd8) from [<c004d900>] (note_interrupt+0x194/0x244)
[<c004d900>] (note_interrupt+0x194/0x244) from [<c004bdd8>] (handle_irq_event_percpu+0x170/0x19c)
[<c004bdd8>] (handle_irq_event_percpu+0x170/0x19c) from [<c004be58>] (handle_irq_event+0x54/0x74)
[<c004be58>] (handle_irq_event+0x54/0x74) from [<c004e4ec>] (handle_fasteoi_irq+0xa4/0x108)
[<c004e4ec>] (handle_fasteoi_irq+0xa4/0x108) from [<c004b610>] (generic_handle_irq+0x20/0x30)
[<c004b610>] (generic_handle_irq+0x20/0x30) from [<c0009b94>] (handle_IRQ+0x60/0x84)
[<c0009b94>] (handle_IRQ+0x60/0x84) from [<c0008f80>] (__irq_svc+0x40/0x6c)
[<c0008f80>] (__irq_svc+0x40/0x6c) from [<c0009cac>] (default_idle+0x2c/0x34)
[<c0009cac>] (default_idle+0x2c/0x34) from [<c0009e48>] (cpu_idle+0x78/0xd8)
[<c0009e48>] (cpu_idle+0x78/0xd8) from [<c03e771c>] (start_kernel+0x290/0x2e0)
handlers:
[<c0013514>] at91sam926x_pit_interrupt
[<c0222788>] at91_rtc_interrupt
[<c01a2db4>] atmel_interrupt
Disabling IRQ #16

At this point the system is frozen.

Is there someting more in need in the device tree files or is there something wrong in the rtc driver?

For the SPI i am trying to get it working with 4 chip selects.

Note SPI1_PCS0 is being used by usart2 so I modified this section to remove the pin definition, not sure if this is how it should be done. Also i2c0 was using PA30, PA31 so I removed it.

I have this:
spi1 {
pinctrl_spi1: spi1-0 {
atmel,pins =
<0 21 0x2 0x0 /* PA21 periph B SPI1_MISO */
0 22 0x2 0x0 /* PA12 periph B SPI1_MOSI */
0 23 0x2 0x0 /* PA23 periph B SPI1_SPCK */
>;
/* 0 7 0x2 0x0>; /* PA8 periph B SPI1_NPSC0 */
};
};

spi1: spi@f0004000 {
cs-gpios = <&pioA 30 0>, <&pioA 31 0>, <&pioA 28 0>, <&pioA 29 0>;
status = "okay";
};

I get this on boot:

atmel_spi f0004000.spi: Using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfers
atmel_spi f0004000.spi: Atmel SPI Controller at 0xf0004000 (irq 17)
atmel_spi f0004000.spi: master is unqueued, this is deprecated

I later added a couple of printks and can see that the device tree files are providing the 4 chip selects but I get no /dev/spixxx devices after boot.

Any ideas?
BGerold
Posts: 2
Joined: Tue Feb 26, 2013 9:03 pm

Re: Status of sam9x5 support for 3.x kernels

Thu Apr 11, 2013 7:43 pm

rlstrand,

Code: Select all

From f43f5cc5c450c1bffa5d03167f2a5b65b6c3d604 Mon Sep 17 00:00:00 2001
From: Bryan Gerold <gerold@datawrx.com>
Date: Tue, 12 Mar 2013 14:07:46 -0500
Subject: [PATCH 1/1] Fixed device tree support for rtc driver on Sam9x5


Signed-off-by: Bryan Gerold <gerold@datawrx.com>
---
 arch/arm/boot/dts/at91sam9x5.dtsi |    6 ++++++
 drivers/rtc/rtc-at91rm9200.c      |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 11412c2..23d1a6b 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -66,6 +66,12 @@
 				status = "disabled";
 			};
 
+			rtc0: rtc@f0006700 {
+				compatible = "atmel,at91samnx5-rtc"
+				reg = <0xf534543 0x100>
+				interrupts = <14 4 3>
+			};
+
 			spi1: spi@f0004000 {
 				#address-cells = <1>;
 				#size-cells = <0>;
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index 7ec3d9d..09105ee 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -228,7 +228,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id)
 	unsigned int rtsr;
 	unsigned long events = 0;
 
-	rtsr = at91_rtc_read(AT91_RTC_SR) & at91_rtc_read(AT91_RTC_IMR);
+	rtsr = at91_rtc_read(AT91_RTC_SR);
 	if (rtsr) {		/* this interrupt is shared!  Is it ours? */
 		if (rtsr & AT91_RTC_ALARM)
 			events |= (RTC_AF | RTC_IRQF);
@@ -404,7 +404,7 @@ static struct platform_driver at91_rtc_driver = {
 
 static int __init at91_rtc_init(void)
 {
-	return platform_driver_probe(&at91_rtc_driver, at91_rtc_probe);
+	return platfrom_driver_register(at91_rtc_driver);
 }
 
 static void __exit at91_rtc_exit(void)
-- 
1.7.10.4
Should fix your problem with the RTC
AntoineC
Posts: 105
Joined: Wed Oct 03, 2012 11:33 am

Re: Status of sam9x5 support for 3.x kernels

Wed Apr 24, 2013 5:13 pm

Hello,

I'm working on a SAM9x5ek board, trying to make it work with a 3.6.9Linux Kernel.
So I download it and "include" it in my builroot environement. I compile it using the sam_dt_defconfig. The build is ok, but on start, it stay stalled on the

"Uncompressing Linux... done, booting the kernel."

So I activate the early print, and here is what I get:

Error: unrecognized/unsupported machine ID (r1 = 0x00000d2d).

Available machine support:

ID (hex) NAME
ffffffff Atmel AT91SAM (Device Tree)

Please check your kernel config and/or bootloader.

So, it seems that the board register is read, but I do not understand why there is only one ID accepted. ANd I do not understand how and where the list is created.

Does any body have an idea what is wrong? Is it in the kernel or in the u-boot?

Thanks
AntoineC
Posts: 105
Joined: Wed Oct 03, 2012 11:33 am

Re: Status of sam9x5 support for 3.x kernels

Fri Apr 26, 2013 10:41 am

So...
I tried with another bootloader. With barebox, here is the trace on start:
Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000001).

Available machine support:

ID (hex) NAME
ffffffff Atmel AT91SAM (Device Tree)

Please check your kernel config and/or bootloader.

The ID is not the same, but available machine is still only ffffffff.

Nobody knows how to solve this?
Sander
Posts: 10
Joined: Mon Mar 26, 2012 9:24 am

Re: Status of sam9x5 support for 3.x kernels

Tue May 21, 2013 8:45 pm

DanWright wrote:I believe those files are no more and the specification on the cm and ek are now done through device trees. I find I can successfully build 3.6.9+ and boot from nand on my at91sam9g25 like so:

git clone git://github.com/linux4sam/linux-at91.git
cd linux-at91
git checkout origin/linux-3.6.9-at91 -b linux-3.6.9-at91
make at91_dt_defconfig
make zImage
make dtbs
cat arch/arm/boot/zImage arch/arm/boot/at91sam9g25ek.dtb > arch/arm/boot/zImage_w_dtb
mkimage -A arm -O linux -C none -T kernel -a 20008000 -e 20008000 -n linux-3.6.9 -d arch/arm/boot/zImage_w_dtb uImage-linux-3.6.9-at91_dt.bin

But I find that USB appears to be broken. lsusb always returns just this:

root@at91sam9x5ek:~# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001

regardless of what is plugged into the USB ports. Is this a known issue in the present state of the code?
I have the same problem. The USB ohci driver gets proped succesfully, and the buses are visible but when I insert a USB storage device, it does not get registered. Nothing happens -- no errors whatsoever.

I have tried the linux 3.9 kernel. I had to do some changes to the device tree to get my nand working: https://gist.github.com/proxy-sander/5622174. I also had to enable ubifs support in the config. The kernel boots, but has the same USB problems as the 3.6.9 version.

Anyone got any hints to get the USB to work?
Sander
Posts: 10
Joined: Mon Mar 26, 2012 9:24 am

Re: Status of sam9x5 support for 3.x kernels

Thu May 23, 2013 9:48 pm

AntoineC wrote:Hello,

I'm working on a SAM9x5ek board, trying to make it work with a 3.6.9Linux Kernel.
So I download it and "include" it in my builroot environement. I compile it using the sam_dt_defconfig. The build is ok, but on start, it stay stalled on the

"Uncompressing Linux... done, booting the kernel."

So I activate the early print, and here is what I get:

Error: unrecognized/unsupported machine ID (r1 = 0x00000d2d).

Available machine support:

ID (hex) NAME
ffffffff Atmel AT91SAM (Device Tree)

Please check your kernel config and/or bootloader.

So, it seems that the board register is read, but I do not understand why there is only one ID accepted. ANd I do not understand how and where the list is created.

Does any body have an idea what is wrong? Is it in the kernel or in the u-boot?

Thanks
You are building an image which expects a device tree to be passed by the bootloader. My guess is you are still using a bootloader which does not support device tree passing. An easy solution is to embed the device tree blob into the uImage so you can use the old u-boot, as DanWright posted:
DanWright wrote: git clone git://github.com/linux4sam/linux-at91.git
cd linux-at91
git checkout origin/linux-3.6.9-at91 -b linux-3.6.9-at91
make at91_dt_defconfig
make zImage
make dtbs
cat arch/arm/boot/zImage arch/arm/boot/at91sam9g25ek.dtb > arch/arm/boot/zImage_w_dtb
mkimage -A arm -O linux -C none -T kernel -a 20008000 -e 20008000 -n linux-3.6.9 -d arch/arm/boot/zImage_w_dtb uImage-linux-3.6.9-at91_dt.bin
(add ARCH=arm and CROSS_COMPILE=yourcompiler after every make command)
I expect recent versions of buildroot to have an option to append the device tree blob into the uImage for you, although I haven't verified this.
Sander
Posts: 10
Joined: Mon Mar 26, 2012 9:24 am

Re: Status of sam9x5 support for 3.x kernels

Fri May 24, 2013 10:44 pm

Sander wrote: I have the same problem. The USB ohci driver gets proped succesfully, and the buses are visible but when I insert a USB storage device, it does not get registered. Nothing happens -- no errors whatsoever.

I have tried the linux 3.9 kernel. I had to do some changes to the device tree to get my nand working: https://gist.github.com/proxy-sander/5622174. I also had to enable ubifs support in the config. The kernel boots, but has the same USB problems as the 3.6.9 version.

Anyone got any hints to get the USB to work?
Fixed it. It turned out only USB port A and B were enabled. Port C was disabled, which was the only one I had available. Setting num-ports to 3 in at91sam9x5ek.dtsi enabled it.
bevenson
Posts: 75
Joined: Fri Oct 28, 2011 7:25 pm

Re: Status of sam9x5 support for 3.x kernels

Tue May 28, 2013 6:46 pm

If you haven't yet seen it, Atmel has a meta-atmel layer for OpenEmbedded/Yocto Project/Poky usage over at https://github.com/linux4sam/meta-atmel. Unfortunately, it only has support for the SAMA5 family. I forked the repository (located at https://github.com/evensonbryan/meta-atmel) and have been modifying the layer to add support for the sam9x5 family. I'm hoping to incorporate changes (especially those listed throughout this forum topic) to get a kernel build that has all peripherals working.

As of right now, the latest on my fork can build a working AT91Bootstrap and U-Boot. I had to do an extra step outside of the Poky build environment to append the DTB to the zImage and then create the resulting uImage. After that, the kernel ran but could not load the filesystem. Any support to get this farther along and pushed back to Atmel's repository is welcome.

Steps to get to the same point I am at, assuming you are creating a fresh Poky build environment:

Code: Select all

cd ~/  #Change base directory to whatever you like; assuming ~/ for instructions
git clone git://git.yoctoproject.org/poky
cd poky
git checkout danny-8.0.1 -b local_poky_changes
git clone http://github.com/evensonbryan/meta-atmel
cd meta-atmel
git branch --track local_meta_atmel_changes origin/add_at91sam9x5_support
git checkout local_meta_atmel_changes
cd ../../
source poky/oe-init-build-env poky-build
Then, under the poky-build/conf directory change BBLAYERS in bblayers.conf as follows:

Code: Select all

BBLAYERS ?= " \
  ~/poky/meta-atmel \
  ~/poky/meta \
  ~/poky/meta-yocto \
  ~/poky/meta-yocto-bsp \
  "
Then, under the poky-build/conf directory add the following line to local.conf:

Code: Select all

MACHINE ?= "at91sam9x5ek"
Then, from poky-build, you can build everything as follows:

Code: Select all

bitbake at91bootstrap && bitbake u-boot && bitbake core-image-minimal
As previously mentioned, any additions are welcome.
PatriceVilchez
Posts: 3
Joined: Wed Aug 20, 2008 1:47 pm

Re: Status of sam9x5 support for 3.x kernels

Wed May 29, 2013 9:46 am

bevenson wrote: As of right now, the latest on my fork can build a working AT91Bootstrap and U-Boot. I had to do an extra step outside of the Poky build environment to append the DTB to the zImage and then create the resulting uImage. After that, the kernel ran but could not load the filesystem. Any support to get this farther along and pushed back to Atmel's repository is welcome.
We will be happy to help you !
Which kind of error message you got when kernel tries to mount the filesystem ?

Patrice.
bevenson
Posts: 75
Joined: Fri Oct 28, 2011 7:25 pm

Re: Status of sam9x5 support for 3.x kernels

Wed May 29, 2013 3:43 pm

Sorry, should have included that with the first post.

I have a few less errors than yesterday. I switched from using the linux4sam_4.0 tag to using the HEAD from the linux-3.6.9-at91 branch. That fixed some errors with peripherals that were not getting a DMA channel. Here is my latest boot output.

Code: Select all

NAND read: device 0 offset 0x200000, size 0x300000                              
 3145728 bytes read: OK                                                         
## Booting kernel from Legacy Image at 22000000 ...                             
   Image Name:   linux-3.6.9                                                    
   Image Type:   ARM Linux Kernel Image (uncompressed)                          
   Data Size:    2440756 Bytes = 2.3 MiB                                        
   Load Address: 20008000                                                       
   Entry Point:  20008000                                                       
   Verifying Checksum ... OK                                                    
   Loading Kernel Image ... OK                                                  
OK                                                                              
                                                                                
Starting kernel ...                                                             
                                                                                
Uncompressing Linux... done, booting the kernel.                                
Booting Linux on physical CPU 0                                                 
Linux version 3.6.9-yocto-standard (foo@bar) (gcc version 4.7.2 (GCC) ) #1 Wed May 29 08:08:36 EDT 2013                                        
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177                   
CPU: VIVT data cache, VIVT instruction cache                                    
Machine: Atmel AT91SAM (Device Tree), model: Atmel AT91SAM9G25-EK               
Memory policy: ECC disabled, Data cache writeback                               
AT91: Detected soc type: at91sam9x5                                             
AT91: Detected soc subtype: at91sam9g25                                         
AT91: sram at 0x300000 of 0x8000 mapped at 0xfef70000                           
Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz                            
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512      
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) rootfstype=ubifs root=ubi0:rootfs rw                       
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: 125004k/125004k available, 6068k reserved, 0K highmem                   
Virtual kernel memory layout:                                                   
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)                               
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)                               
    vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)                               
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)                               
    modules : 0xbf000000 - 0xc0000000   (  16 MB)                               
      .text : 0xc0008000 - 0xc044855c   (4354 kB)                               
      .init : 0xc0449000 - 0xc047147c   ( 162 kB)                               
      .data : 0xc0472000 - 0xc04a25e0   ( 194 kB)                               
       .bss : 0xc04a2604 - 0xc04bc6b0   ( 105 kB)                               
NR_IRQS:16 nr_irqs:16 16                                                        
sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 3489660920ms  
Console: colour dummy device 80x30                                              
Calibrating delay loop... 199.07 BogoMIPS (lpj=780288)                          
pid_max: default: 32768 minimum: 301                                            
Mount-cache hash table entries: 512                                             
CPU: Testing write buffer coherency: ok                                         
Setting up static identity map for 0x20317508 - 0x20317560                      
devtmpfs: initialized                                                           
pinctrl core: initialized pinctrl subsystem                                     
NET: Registered protocol family 16                                              
DMA: preallocated 256 KiB pool for atomic coherent allocations                  
No ATAGs?                                                                       
AT91: Power Management                                                          
AT91: Starting after user reset                                                 
gpio-at91 fffff400.gpio: at address fefff400                                    
gpio-at91 fffff600.gpio: at address fefff600                                    
gpio-at91 fffff800.gpio: at address fefff800                                    
gpio-at91 fffffa00.gpio: at address fefffa00                                    
pinctrl-at91 pinctrl.2: initialized AT91 pinctrl driver                         
bio: create slab <bio-0> at 0                                                   
at_hdmac ffffec00.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels                                                                            
at_hdmac ffffee00.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels                                                                            
SCSI subsystem initialized                                                      
usbcore: registered new interface driver usbfs                                  
usbcore: registered new interface driver hub                                    
usbcore: registered new device driver usb                                       
at91_i2c f8010000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
at91_i2c f8010000.i2c: AT91 i2c bus driver.                                     
Advanced Linux Sound Architecture Driver Version 1.0.25.                        
Switching to clocksource tcb_clksrc                                             
NET: Registered protocol family 2                                               
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 named UNIX socket transport module.                             
RPC: Registered udp transport module.                                           
RPC: Registered tcp transport module.                                           
RPC: Registered tcp NFSv4.1 backchannel transport module.                       
jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.                           
msgmni has been set to 244                                                      
io scheduler noop registered (default)                                          
f801c000.serial: ttyS1 at MMIO 0xf801c000 (irq = 21) is a ATMEL_SERIAL          
fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 16) is a ATMEL_SERIAL          
console [ttyS0] enabled                                                         
brd: module loaded                                                              
loop: module loaded                                                             
at24 0-0051: 65536 byte 24c512 EEPROM, writable, 128 bytes/write                
atmel_nand: Use On Flash BBT                                                    
atmel_nand 40000000.nand: Using dma0chan2 for DMA transfers.                    
ONFI param page 0 valid                                                         
ONFI flash detected                                                             
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08AAD), page size: 2048, OOB size: 64                                                          
atmel_nand 40000000.nand: ONFI params, minimum required ECC: 1 bits in 512 bytes
atmel_nand 40000000.nand: WARNING: Be Caution! Using different PMECC parameters from Nand ONFI ECC reqirement.                                                  
atmel_nand 40000000.nand: Initialize PMECC params, cap: 2, sector: 512          
Bad block table found at page 131008, version 0x01                              
Bad block table found at page 130944, version 0x01                              
8 cmdlinepart partitions found on MTD device atmel_nand                         
Creating 8 MTD partitions on "atmel_nand":                                      
0x000000000000-0x000000040000 : "bootstrap"                                     
0x000000040000-0x0000000c0000 : "uboot"                                         
0x0000000c0000-0x000000100000 : "env"                                           
0x000000100000-0x000000140000 : "env_redundant"                                 
0x000000140000-0x000000180000 : "spare"                                         
0x000000180000-0x000000200000 : "dtb"                                           
0x000000200000-0x000000800000 : "kernel"                                        
0x000000800000-0x000010000000 : "rootfs"                                        
atmel_spi f0000000.spi: Using dma0chan3 (tx) and  dma0chan4 (rx) for DMA transfers                                                                              
atmel_spi f0000000.spi: Atmel SPI Controller at 0xf0000000 (irq 17)             
atmel_spi f0000000.spi: master is unqueued, this is deprecated                  
m25p80 spi32766.0: unrecognized JEDEC id ffffff                                 
CAN device driver interface                                                     
macb f802c000.ethernet: (unregistered net_device): invalid hw address, using random                                                                             
libphy: MACB_mii_bus: probed                                                    
macb f802c000.ethernet: eth0: Cadence MACB at 0xf802c000 irq 22 (0a:65:a8:23:e1:57)                                                                             
macb f802c000.ethernet: eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=f802c000.etherne:00, irq=-1)                                              
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                      
atmel-ehci 700000.ehci: Atmel EHCI UHP HS                                       
atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1           
atmel-ehci 700000.ehci: irq 27, io mem 0x00700000                               
atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00                              
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002                   
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1              
usb usb1: Product: Atmel EHCI UHP HS                                            
usb usb1: Manufacturer: Linux 3.6.9-yocto-standard ehci_hcd                     
usb usb1: SerialNumber: 700000.ehci                                             
hub 1-0:1.0: USB hub found                                                      
hub 1-0:1.0: 3 ports detected                                                   
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver                          
at91_ohci 600000.ohci: AT91 OHCI                                                
at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2            
at91_ohci 600000.ohci: irq 27, io mem 0x00600000                                
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001                   
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1              
usb usb2: Product: AT91 OHCI                                                    
usb usb2: Manufacturer: Linux 3.6.9-yocto-standard ohci_hcd                     
usb usb2: SerialNumber: at91                                                    
hub 2-0:1.0: USB hub found                                                      
hub 2-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     
Initializing USB Mass Storage driver...                                         
usbcore: registered new interface driver usb-storage                            
USB Mass Storage support registered.                                            
usbcore: registered new interface driver usbserial                              
usbcore: registered new interface driver usbserial_generic                      
USB Serial support registered for generic                                       
usbserial: USB Serial Driver core                                               
usbcore: registered new interface driver ftdi_sio                               
USB Serial support registered for FTDI USB Serial Device                        
ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver                              
usbcore: registered new interface driver pl2303                                 
USB Serial support registered for pl2303                                        
mousedev: PS/2 mouse device common for all mice                                 
i2c /dev entries driver                                                         
at91sam9_wdt: sorry, watchdog is disabled                                       
at91sam9_wdt: the watchdog has been disabled                                    
usbcore: registered new interface driver usbhid                                 
usbhid: USB HID core driver                                                     
TCP: cubic registered                                                           
NET: Registered protocol family 10                                              
sit: IPv6 over IPv4 tunneling driver                                            
NET: Registered protocol family 17                                              
can: controller area network core (rev 20120528 abi 9)                          
NET: Registered protocol family 29                                              
/media/sda3/poky/poky-build/tmp/work/at91sam9x5ek-poky-linux-gnueabi/linux-yocto-custom-3.6.9+linux-3.6.9-at91-r1/linux/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)                                                                 
atmel_mci f0008000.mmc: version: 0x504                                          
atmel_mci f0008000.mmc: using dma0chan5 for DMA transfers                       
atmel_mci f0008000.mmc: Atmel MCI controller at 0xf0008000 irq 18, 1 slots      
ALSA device list:                                                               
  No soundcards found.                                                          
UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", error -19          
VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19     
Please append a correct "root=" boot option; here are the available partitions: 
1f00             256 mtdblock0  (driver?)                                       
1f01             512 mtdblock1  (driver?)                                       
1f02             256 mtdblock2  (driver?)                                       
1f03             256 mtdblock3  (driver?)                                       
1f04             256 mtdblock4  (driver?)                                       
1f05             512 mtdblock5  (driver?)                                       
1f06            6144 mtdblock6  (driver?)                                       
1f07          253952 mtdblock7  (driver?)                                       
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
So there is a possible issue with the PMECC settings, the rtc device is not being created, and I cannot mount the filesystem. I know there's a patch related to the rtc that I've seen on an earlier post in this thread that I haven't applied; not sure why its not mounting the filesystem.

This was built using the at91_dt_defconfig, and I haven't yet looked through the resulting configuration with menuconfig. I have a patch yet to apply to my github repository so it applies the correct defconfig; if you build what is on there now, you'll get the SAMA5 default configuration. Any pointers on the mounting issue would be appreciated.
angus.bastin
Posts: 1
Joined: Fri May 31, 2013 6:44 am

Re: Status of sam9x5 support for 3.x kernels

Mon Jun 03, 2013 3:52 am

hi bevenson, I encountered this same error when reflashing SAMA5D35EK. My method of resolving this was setting uboot env variables correctly to the ubi file
setenv bootargs 'console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) rw rootfstype=ubifs ubi.mtd=1 root=ubi0:sama5d3xek-rootfs'

The root variable was referencing incorrectly when it was 'rootfs' rather than 'sama5d3xek-rootfs', once i made this change it worked for me.
bevenson
Posts: 75
Joined: Fri Oct 28, 2011 7:25 pm

Re: Status of sam9x5 support for 3.x kernels

Mon Jun 03, 2013 11:12 pm

Thanks! That worked for me. I added a patchfile for changing the default bootargs string for both the at91sam9x5ek and the sama5 series and pushed it to my github repository. So far I've verified that the NAND flash, DBGU, USART0, USB-A, and USB-B peripherals all work. Still need to add a patch for the rtc, and I haven't yet tried the i2c bus or the SPI.

I'll start using the wiki on my meta-atmel branch to show the latest results. Check there for more info in the coming days.

Return to “LINUX”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest