All of lore.kernel.org
 help / color / mirror / Atom feed
* Intel lynx point designware issue
@ 2015-01-30 16:36 Alexandre Daoud
       [not found] ` <195CACBC-7E0B-4598-986C-0814289C6ECD-ee4meeAH724@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Daoud @ 2015-01-30 16:36 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA

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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Intel lynx point designware issue
       [not found] ` <195CACBC-7E0B-4598-986C-0814289C6ECD-ee4meeAH724@public.gmane.org>
@ 2015-02-02 10:25   ` Mika Westerberg
  2015-02-02 15:53   ` One Thousand Gnomes
  1 sibling, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2015-02-02 10:25 UTC (permalink / raw)
  To: Alexandre Daoud; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Fri, Jan 30, 2015 at 04:36:27PM +0000, Alexandre Daoud wrote:
> 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.

One thing that comes to mind is that some of the earlier Lynxpoint I2C
host controllers had the functional clock gated. If you check what is
done in drivers/acpi/acpi_lpss.c:

        if (dev_desc->flags & LPSS_CLK_GATE) {
                clk = clk_register_gate(NULL, devname, parent, 0,
                                        prv_base, 0, 0, NULL);
                parent = devname;
        }

You could try the same so that you set bit 0 in the private register
space (starting at 0x800).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Intel lynx point designware issue
       [not found] ` <195CACBC-7E0B-4598-986C-0814289C6ECD-ee4meeAH724@public.gmane.org>
  2015-02-02 10:25   ` Mika Westerberg
@ 2015-02-02 15:53   ` One Thousand Gnomes
  1 sibling, 0 replies; 4+ messages in thread
From: One Thousand Gnomes @ 2015-02-02 15:53 UTC (permalink / raw)
  To: Alexandre Daoud; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Fri, 30 Jan 2015 16:36:27 +0000
Alexandre Daoud <alex.daoud-ee4meeAH724@public.gmane.org> wrote:

> 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.

Last time I looked the Venue 11 Pro touchpad didn't work in Linux either.

Alan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Intel lynx point designware issue
@ 2015-02-02 16:08 Alexandre Daoud
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Daoud @ 2015-02-02 16:08 UTC (permalink / raw)
  To: One Thousand Gnomes; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hi Alan,

You are right that there are issues with the touchpad, I'm referring to the touchscreen however (which works fine with i2c-hid on Linux).

The issue with the touchpad, if I recall correctly, was that the rmi4 drivers were taking priority over the hid-generic ones (which they should), however rmi4 was broken in recent kernel builds. This is what I've heard, I haven't actually installed Linux on the device myself.

AlexOn 2 Feb 2015 15:53, One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> wrote:
>
> On Fri, 30 Jan 2015 16:36:27 +0000 
> Alexandre Daoud <alex.daoud@mac.com> wrote: 
>
> > 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. 
>
> Last time I looked the Venue 11 Pro touchpad didn't work in Linux either. 
>
> Alan 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-02 16:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 16:36 Intel lynx point designware issue Alexandre Daoud
     [not found] ` <195CACBC-7E0B-4598-986C-0814289C6ECD-ee4meeAH724@public.gmane.org>
2015-02-02 10:25   ` Mika Westerberg
2015-02-02 15:53   ` One Thousand Gnomes
2015-02-02 16:08 Alexandre Daoud

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.