cafe_ccic smbus issues

Andres Salomon dilinger at laptop.org
Thu Apr 26 03:50:48 EDT 2007


Hi,

I'm having issues with the cafe_ccic/ov7670 (linux) drivers on our
pre-b3.  When I open the camera app, nothing comes up, and I get the
following error:

[  657.280787] cafe1000-ccic 0000:00:0c.2: SMBUS write (42/12/80) timed out

I logged all the cafe smbus writes:

[  527.184582] Marvell M88ALP01 'CAFE' Camera Controller version 2
[  527.221428] PM: Adding info for No Bus:i2c-1
[  527.222976] i2c_adapter i2c-1: SMBus Quick command not supported,
can't probe for chips
[  527.256045] PM: Adding info for No Bus:i2c-1
[  527.275404] OmniVision ov7670 sensor driver, at your service
[  527.320031] rval from SMBUS write: 0x120080
[  527.372247] rval from SMBUS write: 0x110001
[  527.421553] rval from SMBUS write: 0x3a0004
[  527.471822] rval from SMBUS write: 0x120000
[  527.521625] rval from SMBUS write: 0x170013
[  527.569957] rval from SMBUS write: 0x180001
[  527.611431] rval from SMBUS write: 0x3200b6
[  527.661762] rval from SMBUS write: 0x190002
[  527.712015] rval from SMBUS write: 0x1a007a
[  527.764783] rval from SMBUS write: 0x3000a
[  527.811561] rval from SMBUS write: 0xc0000
[...]
[  532.253896] rval from SMBUS write: 0xc800c0
[  532.277733] rval from SMBUS write: 0x790003
[  532.313453] rval from SMBUS write: 0xc80040
[  532.343718] rval from SMBUS write: 0x790005
[  532.367553] rval from SMBUS write: 0xc80030
[  532.403762] rval from SMBUS write: 0x790026
[  536.412091] PM: Adding info for i2c:1-0042
[  536.432582] rval from SMBUS write: 0x120080

This is all the driver load.  At this point, I open the camera app, and
I get the following:

[  657.267614] rval from SMBUS write: 0xa120080
[  657.280787] cafe1000-ccic 0000:00:0c.2: SMBUS write (42/12/80) timed out
[  657.297385] cafe1000-ccic 0000:00:0c.2: SMBUS write (42/12/80) error
[  658.349869] rval from SMBUS write: 0x120080
[  658.370291] rval from SMBUS write: 0x110001
[  658.407383] rval from SMBUS write: 0x3a0004
[  658.440171] rval from SMBUS write: 0x120000
[  658.478746] rval from SMBUS write: 0x170013
[  658.507454] rval from SMBUS write: 0x180001
[  658.536255] rval from SMBUS write: 0x3200b6
[  658.565056] rval from SMBUS write: 0x190002
[  658.599801] rval from SMBUS write: 0x1a007a

So, the reset for some reason is failing.  It goes on for a while, and
none of the other SMBUS writes fail.  Note that in OFW, the camera
selftest works (though the image quality is pretty bad).  However,
looking at the forth code, it would appear that it actually ignores the
result from REG_TWSIC1 (0xbc):

: ov!  ( data reg -- )
   clr-smb-intr
   ov-sid 8.7fc01 or b8 cl!     \ TWSI control 0: id, 8-bit, clk
   bc cl@ drop                  \ Force write
   d# 16 << or bc cl!           \ TWSI control 1: read, reg
   2 ms
   smbus-wait
   bc cl@ drop
;

So, I'm not sure if OFW is getting the same error but somehow managing
to succeed in grabbing frames, or what.  I tried commenting out the
return EIO bits from cafe_smbus_write_data(), which is what you see above.

Anyone have any ideas what's going on here?  Mitch, could you tell me
how to patch ov! to check the  result of that 'bc cl@' to see if either
 bits of 0xa000000 are set?



More information about the Devel mailing list