Hey Linux-i2c,

I have a bit of an unorthodox question for this mailing list but you guys seem 
like the only people who could help me at this point.

I have a Dell Venue 11 Pro tablet with the Lynxpoint I2C busses (INT33C2, 
INT33C3), one of which drives an i2c-hid touchscreen device. I have installed 
OS X on this device and I have been attempting to port the Linux designware i2c 
drivers to OS X. The drivers are pretty much just a carbon copy of the ones in 
the Linux kernel with obvious modifications to integrate with the Darwin 
kernel. The issue that I am facing is that no matter what I do, the I2C bus 
seems to refuse to start an I2C transaction. Here is the sequence of events:

I initiate a transaction on the bus with code exactly equivalent to that in 
i2c_dw_xfer_init. The bus then generates a IC_INTR_TX_EMPTY interrupt and I 
start filling the transaction fifo by writing to the data command register. The 
bus generates a few IC_INTR_TX_EMPTY to avoid overflow (again, this is 
following the structure of the Linux kernel drivers pretty much line by line). 
Once the data has been written (with a restart in the middle for direction 
change and a stop on the last entry), nothing happens. The data to be sent sits 
in the transaction fifo and the bus does not initiate the transaction, no 
matter what I try.

Here is a dump of the registers after I have written the transaction data (the 
point at which the bus does nothing):

DW_IC_CON: 0x65
DW_IC_TAR: 0x2c
DW_IC_SAR: 0x55
DW_IC_SS_SCL_HCNT: 0x1b0
DW_IC_SS_SCL_LCNT: 0x1fb
DW_IC_FS_SCL_HCNT: 0x48
DW_IC_FS_SCL_LCNT: 0xa0
DW_IC_INTR_STAT: 0x0
DW_IC_INTR_MASK: 0xa0
DW_IC_RAW_INTR_STAT: 0x0
DW_IC_RX_TL: 0x0
DW_IC_TX_TL: 0x1f
DW_IC_STATUS: 0x0
DW_IC_TXFLR: 0x20
DW_IC_RXFLR: 0x0
DW_IC_SDA_HOLD: 0x9
DW_IC_TX_ABRT_SOURCE: 0x0
DW_IC_DMA_CR: 0x0
DW_IC_DMA_TDLR: 0x0
DW_IC_DMA_RDLR: 0x0
DW_IC_SDA_SETUP: 0x64
DW_IC_ENABLE_STATUS: 0x1
DW_IC_FS_SPKLEN: 0x5
DW_IC_COMP_PARAM_1: 0x1f1fee
DW_IC_COMP_VERSION: 0x3131352a
DW_IC_COMP_TYPE: 0x44570140

The bus is configured from the ACPI parameters supplied by Dell.

I know that this mailing list is intended for work on Linux i2c drivers but I’m 
seriously at a loss now. I’ve been working on fixing this issue for the past 3 
months, I’ve scoured the internet for any kind of hint as to what’s happening. 
I’ve also read the documentation for the Designware bus to no avail. I feel 
like the only place I can turn to now is this mailing list, you guys wrote the 
drivers for the Linux kernel after all :) I have a feeling the solution is 
going to be ridiculously simple and it’s merely something that I’ve completely 
overlooked but I would appreciate any help from you guys in understanding why 
this is happening.

I also apologise in advance if any terminology I have used is incorrect. 
Although I have worked with drivers in both Linux and OS X before, it’s the 
first time I work with an I2C bus.

I would also appreciate if you could CC me in your reply as majordomo has yet 
to confirm my subscription for some reason.

Many thanks in advance,
Alexandre Daoud--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to