I am using SAM9G25 (EMBEST) Evaluation board (SAM9X5EK).
My kernel version is 2.6.39 and build root is 2011-05
I need to enable and test(R/W) all the serial ports in the board (connectinng to the correponding pin in IO expander ports J1, J2 and J3).
I'm able to read/write ONLY to USART0 port (ttyS1) and cannot in S2-S6.
I tried below things to enable the serial ports:
I have disabled the ISI (video capture) and SPI interfaces in the kernel build. I added the following code in function "ek_map_io" of "board-sam9x5ek.c" (in arch/arm/mach-at91 path).
at91_register_uart(AT91SAM9X5_ID_USART1, 2, 0); /*ttyS2*/
at91_register_uart(AT91SAM9X5_ID_USART2, 3, 0); /*ttyS3*/
at91_register_uart(AT91SAM9X5_ID_USART3, 4, 0); /*ttyS4*/
at91_register_uart(AT91SAM9X5_ID_UART0, 5, 0); /*ttyS5*/
at91_register_uart(AT91SAM9X5_ID_UART1, 6, 0); /*ttyS6*/Also, kernel boot-up message shows the correct registration on the serial ports.
I created corresponding /dev/ttyS devices in /dev directory of RFS.
# ls -l /dev/ttyS*
crw------- 1 root root 4, 64 Jan 23 2012 /dev/ttyS0
crw-rw---- 1 root root 4, 65 Jan 23 2012 /dev/ttyS1
crw-rw---- 1 root root 4, 66 Jan 23 2012 /dev/ttyS2
crw-rw---- 1 root root 4, 67 Jan 23 2012 /dev/ttyS3
crw-rw---- 1 root root 4, 68 Jan 23 2012 /dev/ttyS4
crw-rw---- 1 root root 4, 69 Jan 23 2012 /dev/ttyS5
crw-rw---- 1 root root 4, 70 Jan 23 2012 /dev/ttyS6
I tried to write to S2-S6 tty serial ports.
The "open" call returns a valid file descriptor and "write" returns success with specified number of written bytes.
Now, the bytes do not appear on the corresponding pins on IO expanders (J1, J2 and J3).
Please help me in enabling ALL the serial ports in SAM9G25 evaluation board.
please find the kernel bootup log below:
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.39 (root@ubuntu) (gcc version 4.3.5 (Buildroot 2011.05) ) #8 M
on Jan 23 17:38:45 IST 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9X5-EK
Memory policy: ECC disabled, Data cache writeback
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: root=/dev/nfs rw nfsroot=192.168.1.147:/rootfs/rfs_samg25 i
p=192.168.1.174:192.168.1.147:192.168.1.1:255.255.255.0::: console=ttyS0,115200
mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) mem=128M
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: 125312k/125312k available, 5760k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xff000000 - 0xffe00000 ( 14 MB)
vmalloc : 0xc8800000 - 0xfee00000 ( 870 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc002d000 ( 148 kB)
.text : 0xc002d000 - 0xc043f97c (4171 kB)
.data : 0xc0440000 - 0xc0468520 ( 162 kB)
NR_IRQS:192
AT91: 128 gpio irqs in 4 banks
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
AT91: CM rev B and higher
AT91: EK rev B and higher
AT91: Power Management (with slow clock mode)
AT91: Starting after general reset
bio: create slab <bio-0> at 0
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 62 (SDA) and 63 (SCL)
at_hdmac at_hdmac.0: Atmel AHB DMA Controller ( cpy slave ), 8 channels
at_hdmac at_hdmac.1: Atmel AHB DMA Controller ( cpy slave ), 8 channels
Advanced Linux Sound Architecture Driver Version 1.0.24.
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource tcb_clksrc
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.
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 244
io scheduler noop registered (default)
[color=#BF0040]atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xf801c000 (irq = 5) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xf8020000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.3: ttyS3 at MMIO 0xf8024000 (irq = 7) is a ATMEL_SERIAL
atmel_usart.4: ttyS4 at MMIO 0xf8028000 (irq =
is a ATMEL_SERIAL
atmel_usart.5: ttyS5 at MMIO 0xf8040000 (irq = 15) is a ATMEL_SERIAL
atmel_usart.6: ttyS6 at MMIO 0xf8044000 (irq = 16) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.0: Atmel SSC device at 0xc8898000 (irq 28)
atmel_nand atmel_nand: Using dma0chan0 for DMA transfers.
ONFI flash detected
ONFI param page 0 valid
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08AAD)
atmel_pmecc_init_params
Scanning device for bad blocks
2 cmdlinepart partitions found on MTD device atmel_nand
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000000800000 : "bootstrap/uboot/kernel"
0x000000800000-0x000010000000 : "rootfs"
macb macb.0: eth0: Features changed: 0x00004800 -> 0x00004000
MACB_mii_bus: probed
eth0: Atmel MACB at 0xf802c000 irq 24 (82:8a:d6:84:e7:3a)
eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=0:00, irq=-1)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
atmel-ehci atmel-ehci: Atmel EHCI UHP HS
atmel-ehci atmel-ehci: new USB bus registered, assigned bus number 1
atmel-ehci atmel-ehci: irq 22, io mem 0x00700000
atmel-ehci atmel-ehci: USB 2.0 started, EHCI 1.00
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 at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 2
at91_ohci at91_ohci: irq 22, io mem 0x00600000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
atmel_usba_udc atmel_usba_udc: MMIO registers at 0xf803c000 mapped at c88a2000
atmel_usba_udc atmel_usba_udc: FIFO at 0x00500000 mapped at c8900000
qt1070 0-001b: can not read register, returned -6
qt1070 0-001b: ID -6 not supported
at91_rtc at91_rtc: rtc core: registered at91_rtc as rtc0
AT91 Real Time Clock driver.
i2c /dev entries driver
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
asoc: wm8731-hifi <-> atmel-ssc-dai.0 mapping ok
ASoC: at91sam9x5ek_init ok
ALSA device list:
#0: AT91SAM9X5
nf_conntrack version 0.5.0 (1958 buckets, 7832 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
at91_rtc at91_rtc: setting system clock to 2007-01-01 00:00:12 UTC (1167609612)
atmel_mci atmel_mci.0: Using dma0chan1 for DMA transfers
atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots
atmel_mci atmel_mci.1: Using dma1chan0 for DMA transfers
atmel_mci atmel_mci.1: Atmel MCI controller at 0xf000c000 irq 26, 1 slots
IP-Config: Complete:
device=eth0, addr=192.168.1.174, mask=255.255.255.0, gw=192.168.1.1,
host=192.168.1.174, domain=, nis-domain=(none),
bootserver=192.168.1.147, rootserver=192.168.1.147, rootpath=
eth0: link up (100/Full)
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing init memory: 148K
starting pid 449, tty '': '/etc/init.d/rcS'
mknod: /dev/null: File exists
Populating /dev using udev: udevd (453): /proc/453/oom_adj is deprecated, please
use /proc/453/oom_score_adj instead.
done
Starting portmap: done
Initializing random number generator... done.
ALSA: Restoring mixer settings...
Starting network...
RTNETLINK answers: File exists
Starting dropbear sshd: OK
starting pid 480, tty '/dev/ttyS0': '/sbin/getty -L ttyS0 115200 vt100 '
Welcome to Buildroot
AT91SAM9 login: root
#[/color]