I have tried multiple stuffs over few days but the result is i am stuck at the same place...
I have added the following at91_add_device_i2c(1, ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); in board-sam9m10g45ek.c file but doesn't show any positive result. I also forcibly enabled the following statement in at91sam8g45_devices. file but still i2c-1 device is not being created in /dev
at91_set_GPIO_periph(AT91_PIN_PB10, 1); /* TWD (SDA) */
at91_set_multi_drive(AT91_PIN_PB10, 1);
at91_set_GPIO_periph(AT91_PIN_PB11, 1); /* TWCK (SCL) */
at91_set_multi_drive(AT91_PIN_PB11, 1);
printk(KERN_INFO "i2c device registered with id 1");
platform_device_register(&at91sam9g45_twi1_device);
Below is o/p of my kernel boot up log
Uncompressing Linux.............................................................................................................................. done, booting the kernel.
Linux version 2.6.30 (root@prolix) (gcc version 4.2.0 20070413 (prerelease) (CodeSourcery Sourcery G++ Lite 2007q1-10)) #7 Sat Aug 6 14:17:57 IST 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9G45-EKES
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Ignoring RAM at 20000000-27ffffff (vmalloc region overlap).
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=ttySAC0,115200 tft=m root=/dev/mtdblock6 mtdparts=atmel_nand:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,1M(logo)ro,2M(linux),-(root) rw rootfstype=yaffs2
NR_IRQS:192
AT91: 160 gpio irqs in 5 banks
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
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: 125724KB available (3164K code, 252K data, 500K init, 0K highmem)
Calibrating delay loop... 198.65 BogoMIPS (lpj=99328)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
NET: Registered protocol family 16
i2c device registered with id 0<6>i2c device registered with id 1<4>atmel_tcb: probe of atmel_tcb.0 failed with error -22
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
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
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
yaffs Jul 25 2011 09:46:42 Installing.
msgmni has been set to 245
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: 750KiB frame buffer at 77900000 (mapped at ffa00000)
Console: switching to colour frame buffer device 100x30
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00500000 (mapped at c8808000), irq 23
atmel_usart.0: ttySAC0 at MMIO 0xfeffee00 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttySAC1 at MMIO 0xfff8c000 (irq = 7) is a ATMEL_SERIAL
atmel_usart.2: ttySAC2 at MMIO 0xfff90000 (irq = 8) is a ATMEL_SERIAL
atmel_usart.3: ttySAC3 at MMIO 0xfff94000 (irq = 9) is a ATMEL_SERIAL
atmel_usart.4: ttySAC4 at MMIO 0xfff98000 (irq = 10) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
Driver 'sd' needs updating - please use bus_type methods
macb macb: invalid hw address, using random
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffbc000 irq 25 (0a:fd:f7:e3:bf:be)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xaa (Micron NAND 256MiB 1,8V 8-bit)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Bad eraseblock 454 at 0x0000038c0000
Bad eraseblock 620 at 0x000004d80000
Bad eraseblock 1725 at 0x00000d7a0000
Bad eraseblock 1952 at 0x00000f400000
Bad eraseblock 1953 at 0x00000f420000
7 cmdlinepart partitions found on MTD device atmel_nand
Creating 7 MTD partitions on "atmel_nand":
0x000000000000-0x000000020000 : "bootstrap"
0x000000020000-0x000000060000 : "uboot"
0x000000060000-0x000000080000 : "env1"
0x000000080000-0x0000000a0000 : "env2"
0x0000000a0000-0x0000001a0000 : "logo"
0x0000001a0000-0x0000003a0000 : "linux"
0x0000003a0000-0x000010000000 : "root"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq 14)
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 0x00800000
atmel-ehci atmel-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 2.6.30 ehci_hcd
usb usb1: SerialNumber: atmel-ehci
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 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 0x00700000
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 2.6.30 ohci_hcd
usb usb2: SerialNumber: at91
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
atmel_usba_udc atmel_usba_udc: MMIO registers at 0xfff78000 mapped at c880c000
atmel_usba_udc atmel_usba_udc: FIFO at 0x00600000 mapped at c8900000
mice: PS/2 mouse device common for all mice
atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz
atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /class/input/input0
i2c /dev entries driver
at24 0-0050: 256 byte 24c02 EEPROM (writable)
i2c-gpio i2c-gpio.0: using pins 52 (SDA) and 53 (SCL)
Registered led device: d9
Registered led device: d6
Registered led device: d7
Registered led device: d8
Registered led device: beep
Registered led device: gprs_reset
Registered led device: gprs_onoff
at_hdmac at_hdmac: Atmel AHB DMA Controller ( cpy slave ), 8 channels
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.20.
usb 1-2: new high speed USB device using atmel-ehci and address 2
usb 1-2: New USB device found, idVendor=0781, idProduct=5539
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: Cruzer Micro
usb 1-2: Manufacturer: SanDisk
usb 1-2: SerialNumber: 1101901638127A91
usb 1-2: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
AC'97 0 does not respond - RESET
AC'97 0 access is not valid [0xffffffff], removing mixer.
atmel_ac97c: probe of atmel_ac97c.0 failed with error -5
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
atmel_mci atmel_mci.0: Atmel MCI controller at 0xfff80000 irq 11, 1 slots
atmel_mci atmel_mci.1: Atmel MCI controller at 0xfffd0000 irq 29, 1 slots
yaffs: dev is 32505862 name is "mtdblock6"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.6, "mtdblock6"
yaffs: restored from checkpoint
yaffs_read_super: isCheckpointed 1
VFS: Mounted root (yaffs2 filesystem) on device 31:6.
Freeing init memory: 500K
Starting network...
SPI-Microchip MCP2515 CAN Driver 3.5.3_SSV_MCP2515 (c) May 13 2010 16:39:03
Atmel AT91 and MCP2515 port by H.J. Oertel (
oe@port.de)
MAX_CHANNELS 2
CAN_MAX_OPEN 2
mount: mounting sysfs on /sys failed: Device or resource busy
Loading PWM driver...
Loading PWM module ...<6>
PWM device installed, with major number 240
Create device node using 'mknod /dev/dbgpwm c 240 0'
Memory allocation <6>
pwm_int calledCreating PWM device file
Loading GPIO driver...
<3>gpio_mod: version magic '2.6.30dbgene mod_unload ARMv5 ' should be '2.6.30 mod_unload ARMv5 '
insmod: can't insert '/dbgene/GPIO/gpio_mod.ko': invalid module format
Creating GPIO driver file
pwm_mod 3096 0 - Live 0xbf018000
canspi 76192 0 - Live 0xbf000000
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttySAC
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
14 sound
29 fb
89 i2c
90 mtd
92 Can
116 alsa
128 ptm
136 pts
180 usb
189 usb_device
240 dbgpwm
253 usb_endpoint
254 rtc
Block devices:
1 ramdisk
259 blkext
7 loop
8 sd
31 mtdblock
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
-/bin/sh: qpe: not found
[root@Mini6045:/]#
[root@Mini6045:/]# eth0: link up (100/Full)
ls /de[root@Mini6045:/]# ls /dev/
can0 ptyp0 tty41
can1 ptyp1 tty42
console ptyp2 tty43
cpu_dma_latency ptyp3 tty44
dbggpio ram0 tty45
dbgpwm ram1 tty46
event0 ram2 tty47
fb0 ram3 tty48
full random tty49
i2c-0 root tty5
kmem rtc tty50
kmsg seq tty51
log timer tty52
loop0 tty tty53
loop1 tty0 tty54
loop2 tty1 tty55
loop3 tty10 tty56
loop4 tty11 tty57
loop5 tty12 tty58
loop6 tty13 tty59
loop7 tty14 tty6
mem tty15 tty60
mice tty16 tty61
mouse0 tty17 tty62
mtd0 tty18 tty63
mtd0ro tty19 tty7
mtd1 tty2 tty8
mtd1ro tty20 tty9
mtd2 tty21 ttySAC0
mtd2ro tty22 ttySAC1
mtd3 tty23 ttySAC2
mtd3ro tty24 ttySAC3
mtd4 tty25 ttySAC4
mtd4ro tty26 ttyp0
mtd5 tty27 ttyp1
mtd5ro tty28 ttyp2
mtd6 tty29 ttyp3
mtd6ro tty3 urandom
mtdblock0 tty30 usbdev1.1_ep00
mtdblock1 tty31 usbdev1.1_ep81
mtdblock2 tty32 usbdev1.2_ep00
mtdblock3 tty33 usbdev1.2_ep02
mtdblock4 tty34 usbdev1.2_ep81
mtdblock5 tty35 usbdev2.1_ep00
mtdblock6 tty36 usbdev2.1_ep81
network_latency tty37 vcs
Please let me know what needs to be done to enable TWI as i2c-1 char device :( ... i am stuck on the project and not able to make any progress....
-Prashanth