AnsweredAssumed Answered

bf561 I2C-GPIO timeout..

Question asked by qian on Oct 27, 2011
Latest reply on Nov 3, 2011 by qian

hi,

     all.

 

cpu:bf561
uclinux-2010-RC5

ezkit.c

#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
#include <linux/i2c-gpio.h>

static struct i2c_gpio_platform_data i2c_gpio_data = {
.sda_pin  = GPIO_PF45,//GPIO_PF1,
.scl_pin  = GPIO_PF26,//GPIO_PF0,
.sda_is_open_drain = 0,
.scl_is_open_drain = 0,
.udelay   = 40,
};

static struct platform_device i2c_gpio_device = {
.name  = "i2c-gpio",
.id  = 0,
.dev  = {
  .platform_data = &i2c_gpio_data,
},
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_TLV320AIC23) || defined(CONFIG_SND_BF5XX_SOC_BF5XX_TLV320AIC23_MODULE) {
  I2C_BOARD_INFO("tlv320aic23", 0x1a),
},
#endif

static int __init stamp_init(void)
{
int ret;

printk(KERN_INFO "%s(): registering device resources\n", __func__);

i2c_register_board_info(0, bfin_i2c_board_info,
    ARRAY_SIZE(bfin_i2c_board_info));
   
    ........
    ........
   
}


kernel to start message:
BusyBox v1.16.2 (2011-10-26 14:56:40 CST) hush - the humble shell

root:/> ls
bin   etc   init  mnt   root  sys   usr
dev   home  lib   proc  sbin  tmp   var
root:/> ls
bin   etc   init  mnt   root  sys   usr
dev   home  lib   proc  sbin  tmp   var
root:/> ls
bin   etc   init  mnt   root  sys   usr
dev   home  lib   proc  sbin  tmp   var
root:/> dmesg
Linux version 2.6.34.7-ADI-2010R1 (qianxin@azure) (gcc version 4.3.5 (ADI-2010R1
-RC4) ) #461 Thu Oct 27 20:55:15 CST 2011
register early platform devices
Limiting kernel memory to 60MB due to anomaly 05000263
Board Memory: 128MB
Kernel Managed Memory: 128MB
Memory map:
  fixedcode = 0x00000400-0x00000490
  text      = 0x00001000-0x0011a2b0
  rodata    = 0x0011a2b0-0x0016e01c
  bss       = 0x0016f000-0x0017f888
  data      = 0x0017f888-0x00190000
    stack   = 0x0018e000-0x00190000
  init      = 0x00190000-0x0040b000
  available = 0x0040b000-0x03c00000
  DMA Zone  = 0x07f00000-0x08000000
Hardware Trace Active and Enabled
Boot Mode: 2
Blackfin support (C) 2004-2010 Analog Devices, Inc.
Compiled for ADSP-BF561 Rev 0.3
Warning: Compiled for Rev 3, but running on Rev 5
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 594 MHz core clock and 118 MHz System Clock
boot memmap: 000000000040b000 - 0000000003c00000 (usable)
On node 0 totalpages: 15360
free_area_init_node: node 0, pgdat 0018ca48, node_mem_map 0040d000
  DMA zone: 120 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 15240 pages, LIFO batch:0
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
  External memory: cacheable in instruction cache
  L2 SRAM        : uncacheable in instruction cache
Data Cache Enabled for CPU0
  External memory: cacheable (write-through) in data cache
  L2 SRAM        : uncacheable in data cache
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 15240
Kernel command line: root=/dev/mtdblock0 rw clkin_hz=33000000 earlyprintk=serial
,uart0,57600 console=ttyBF0,57600
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)
Kernel managed physical pages: 15360
Memory available: 56732k/131072k RAM, (2540k init code, 1124k kernel code, 472k
data, 1024k dma, 69180k reserved)
Hierarchical RCU implementation.
NR_IRQS:153
Configuring Blackfin Priority Driven Interrupts
Calibrating delay loop... 1183.74 BogoMIPS (lpj=2367488)
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 16 KB (4 KB free)
Blackfin L2 SRAM: 128 KB (128 KB free)
NET: Registered protocol family 16
i2c-core: driver [dummy] registered
Blackfin DMA Controller
ezkit_init(): registering device resources
bio: create slab <bio-0> at 0
Advanced Linux Sound Architecture Driver Version 1.0.22.1.
Switching to clocksource bfin_cs_cycles
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
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
msgmni has been set to 110
io scheduler noop registered (default)
brd: module loaded
net2272: PLX NET2272 USB Peripheral Controller
net2272: irq 103, mapped mem 28000000, chip rev 0011
net2272: running in 16-bit, no byte swap local bus mode
net2272: version: 2005 Sept 8
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC fa:3d:cf:3a:92:df
usb0: HOST MAC ea:10:1a:22:33:b9
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
i2c /dev entries driver
i2c-core: driver [dev_driver] registered
i2c i2c-0: adapter [i2c-gpio0] registered
i2c 0-001a: uevent
i2c i2c-0: client [tlv320aic23] registered with bus id 0-001a
i2c-dev: adapter [i2c-gpio0] registered as minor 0
i2c-gpio i2c-gpio.0: using pins 45 (SDA) and 26 (SCL)
qian: tlv320aic23_modinit.
qian:No device for DAI tlv320aic23
dma rx:12 tx:13, err irq:13, regs:ffc00800
qianxin:bf5xx_i2s_probe!
qian:soc_probe!
AIC23 Audio Codec 0.1
tlv320aic23 0-001a: probe
qian:tlv320aic23_code_probe
Q-tlv320aic23: start Reset codec!
i2c i2c-0: master_xfer[0] W, addr=0x1a, len=2
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
g_ether gadget: high speed config #2: RNDIS
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: Used 4 tries to write to client at 0x1a: failed, timeout?
i2c i2c-0: NAK from device addr 0x1a msg #0
tlv320aic23_write cannot write 000 to register R15
dma_alloc_init: dma_page @ 0x022ce000 - 256 pages at 0x07f00000
asoc: tlv320aic23 <-> bf5xx-i2s mapping ok
i2c i2c-0: master_xfer[0] W, addr=0x1a, len=2
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: Used 4 tries to write to client at 0x1a: failed, timeout?
i2c i2c-0: NAK from device addr 0x1a msg #0
tlv320aic23_write cannot write 047 to register R6
i2c i2c-0: master_xfer[0] W, addr=0x1a, len=2
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: Used 4 tries to write to client at 0x1a: failed, timeout?
i2c i2c-0: NAK from device addr 0x1a msg #0
tlv320aic23_write cannot write 004 to register R5
i2c i2c-0: master_xfer[0] W, addr=0x1a, len=2
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: Used 4 tries to write to client at 0x1a: failed, timeout?
i2c i2c-0: NAK from device addr 0x1a msg #0
tlv320aic23_write cannot write 117 to register R0
i2c i2c-0: master_xfer[0] W, addr=0x1a, len=2
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: Used 4 tries to write to client at 0x1a: failed, timeout?
i2c i2c-0: NAK from device addr 0x1a msg #0
tlv320aic23_write cannot write 117 to register R1
i2c i2c-0: master_xfer[0] W, addr=0x1a, len=2
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: Used 4 tries to write to client at 0x1a: failed, timeout?
i2c i2c-0: NAK from device addr 0x1a msg #0
tlv320aic23_write cannot write 010 to register R4
i2c i2c-0: master_xfer[0] W, addr=0x1a, len=2
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: Used 4 tries to write to client at 0x1a: failed, timeout?
i2c i2c-0: NAK from device addr 0x1a msg #0
tlv320aic23_write cannot write 070 to register R2
i2c i2c-0: master_xfer[0] W, addr=0x1a, len=2
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: Used 4 tries to write to client at 0x1a: failed, timeout?
i2c i2c-0: NAK from device addr 0x1a msg #0
tlv320aic23_write cannot write 070 to register R3
i2c i2c-0: master_xfer[0] W, addr=0x1a, len=2
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: i2c_outb: 0x34, Q-udevlay: 20, timeout at bit #7
i2c i2c-0: Used 4 tries to write to client at 0x1a: failed, timeout?
i2c i2c-0: NAK from device addr 0x1a msg #0
tlv320aic23_write cannot write 001 to register R9
i2c-core: driver [tlv320aic23] registered
ALSA device list:
  #0: bf5xx_tlv320aic23 (tlv320aic23)
TCP cubic registered
NET: Registered protocol family 17
Warning: unable to open an initial console.
Freeing unused kernel memory: 2540k freed
root:/>
root:/>
root:/>
root:/>


In VDSP the GPIO-I2C and tlv320aic23 are OK to.
However, uclinux in gpio-i2c can not be written.

 

 

thank you....

Outcomes