This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Kernel Reporting Error - DaVinci I2C WARNING: i2c: NACK detected

I just powered up my board and the Linux kernel is detecting a hardware problem with the MSP430 (I2C controller) chip on my board.

The error that the kernel is reporting is:

 "DaVinci I2C WARNING: i2c: NACK detected."

I assume that this must be a hardware failure of the MSP430, since this was all working fine, last night.

Has this happenend to anyone?

  • I am assuming you are using the DM6446 DVEVM in this case?

    I believe those sorts of I2C messages will print out if anything on the I2C bus is holding it in a bad state, so it may not necessarily be the MSP430 as you can see them in a variety of circumstances. Do you have anything connected to any of the daughterboard interfaces on the EVM that might not be treating the I2C bus properly? What version of the DVSDK software are you using on it and have you made any modifications to the kernel/drivers?

    If it really was a problem with the MSP430 itself you could probably recover it by reflashing the MSP430 firmware from Spectrum Digital, though this would require a MSP430 compliant JTAG adapter, but I would suspect something else as I do not recall seeing any MSP430 failures like this.

  • Yes, this is the DM6446.

    Nope on any changes to the kernel.

    I will check further...thanks

  • If anyone can point me to the driver that I can disable to prevent this message from appearing, it would be much appreciated.  I'm running the kernel on a custom board and thought I'd disabled drivers for everything I don't have/don't intend to use, but I guess I missed one or two.  The message appears so many times that when I try to recover boot time output using dmesg, the record is incomplete.

  • Disable RTC driver.  That might be source of your I2C NAK issues.

  • Thanks Swami for that suggestion.  I don't know how to disable drivers in the kernel and neither does my customer.

    Can you send me a brief procedure to help them disable the RTC Driver?  Bernie, can you help?

    He will be sending me a boot sequence file, but he definitely sees the error on the MSP430 I2C

    Thanks

  • When you do "make menuconfig" or " make xconfig" pl. choose "Device Drivers " and under that you will find "RTC driver".  Unselect this driver from ther and save the config.

    RTC driver will be removed from your kernel when you build it.

     

    swami

  • Swami is right, you have to rebuild the kernel with the RTC driver removed. For some detail and steps on rebuilding the kernel you probably want to look at section 4.5 of the getting started guide. If you run into trouble rebuilding the kernel just let us know.

  • Thanks guys, I will take it from here

  • FYI - Attached is the dmesg file 

    Linux version 2.6.10_mvl401-davinci_evm (xlibrary@scarletoak.sanb.design.ti.com) (gcc version 3.4.3 (MontaVista 3.4.3-25.0.30.0501131 2005-07-23)) #2 Mon Aug 7 14:58:21 PDT 2006

    CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)

    CPU0: D VIVT write-back cache

    CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets

    CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets

    Machine: DaVinci EVM

    Memory policy: ECC disabled, Data cache writeback

    On node 0 totalpages: 30720  DMA zone: 30720 pages, LIFO batch:7  Normal zone: 0 pages, LIFO batch:1  HighMem zone: 0 pages, LIFO batch:1Built 1 zonelistsKernel command line: console=ttyS0,115200n8=noinitrd rw ip=10.0.1.61 root=/dev/nfs nfsroot=10.0.1.60:/home/darwin/projects/LightSpeed/targetfs,nolock mem=120M

    PID hash table entries: 512 (order: 9, 8192 bytes)

    Console: colour dummy device 80x30

    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

    Memory: 120MB = 120MB total

    Memory: 118784KB available (2271K code, 480K data, 136K init)

    Calibrating delay loop... 148.27 BogoMIPS (lpj=741376)

    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

    CPU: Testing write buffer coherency: ok

    spawn_desched_task(00000000)

    desched cpu_callback 3/00000000

    ksoftirqd started up.

    desched cpu_callback 2/00000000

    desched thread 0 started up.

    NET: Registered protocol family 16

    Registering platform device 'musb_hdrc'. Parent at platform

    DaVinci I2C DEBUG: 12:15:02 Aug  1 2006

    Registering platform device 'i2c'. Parent at platform

    usbcore: registered new driver usbfs

    usbcore: registered new driver hub

    JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.yaffs Aug  1 2006 12:14:38 Installing. Registering platform device 'davincifb.0'. Parent at platformSetting Up Clocks for DM420 OSDConsole: switching to colour frame buffer device 90x30fb0: dm_osd0_fb frame buffer devicefb1: dm_vid0_fb frame buffer devicefb2: dm_osd1_fb frame buffer devicefb3: dm_vid1_fb frame buffer device

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled

    Registering platform device 'serial8250'. Parent at platform

    ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A

    io scheduler noop registered

    io scheduler anticipatory registered

    RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize

    Registering platform device 'ti_davinci_emac'. Parent at platform

    TI DaVinci EMAC: MAC address is deadbeaf

    TI DaVinci EMAC Linux version updated 4.0

    TI DaVinci EMAC: Installed 1 instances.

    netconsole: not configured, aborting

    i2c /dev entries driver

    Linux video capture interface: v1.00

    Registering platform device 'vpfe.1'. Parent at platform

    DaVinci v4l2 capture driver V1.0 loaded

    Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

    ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

    DaVinci I2C WARNING: i2c: NACK detected

     

  • Check your u-boot bootargs as well; you may have enabled CCD image sensor video input; if so, and no daughter card is connected, you will likely see I2C errors as well.

  • You would also see I2C error due to IDE driver.  Video will interact with the codec over I2C if I am not wrong.

     

    swami

  • Here are the bootargs:

    bootargs=console=ttyS0,115200n8=noinitrd rw ip=10.0.1.61 root=/dev/nfs nfsroot=10.0.1.60:/home/darwin/projects/LightSpeed/targetfs,nolock mem=120M

    Looks good to me?


     

  • Your bootargs are not activating anything in particular that could bring out these I2C errors (I believe a video=<something> in the bootargs could activate alternative video drivers), it must be something that is built into your kernel that is either not present or damaged on your hardware.

  • If you have IDE, Video drivers inbuild in the kernel then whether you configure them or not they will access I2C for default configuration of the respective peripherals.

    Pl. remove the above drivers from your config (through menuconfig) and recompile the kernel.

    swami

  • Taking this forward, the best way is to look into the arch/arm/mach-davinci/i2c-client.c file, where there are additional calls made to the expander device on the DVEVM. You would have to comment out this portion of code if you dont have this device on your HW. and make sure to check existing active drivers to find out any mismatch in the I2C drivers and the adresses on  your HW.