Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328885 > unrolled thread

Re: [PATCH v2 14/16] mfd: intel-lpss: Pass SDA hold time to I2C host controller driver

Started byWolfram Sang <wsa@the-dreams.de>
First post2016-02-08 11:20 +0100
Last post2016-02-08 11:50 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 14/16] mfd: intel-lpss: Pass SDA hold time to I2C host  controller driver Wolfram Sang <wsa@the-dreams.de> - 2016-02-08 11:20 +0100
    Re: [PATCH v2 14/16] mfd: intel-lpss: Pass SDA hold time to I2C host  controller driver Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-02-08 11:40 +0100
      Re: [PATCH v2 14/16] mfd: intel-lpss: Pass SDA hold time to I2C host  controller driver Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-02-08 11:50 +0100

#1328885 — Re: [PATCH v2 14/16] mfd: intel-lpss: Pass SDA hold time to I2C host controller driver

FromWolfram Sang <wsa@the-dreams.de>
Date2016-02-08 11:20 +0100
SubjectRe: [PATCH v2 14/16] mfd: intel-lpss: Pass SDA hold time to I2C host controller driver
Message-ID<qZR5g-3R9-17@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Mon, Nov 30, 2015 at 05:11:42PM +0200, Andy Shevchenko wrote:
> From: Mika Westerberg <mika.westerberg@linux.intel.com>
> 
> Intel Skylake the LPSS I2C pad circuit has internal delays that require
> programming non-zero SDA hold time for the I2C host controller. If this is
> not done communication to slave devices may fail with arbitration lost
> errors like the one seen below taken from Lenovo Yoga 900:
> 
>   i2c_hid i2c-SYNA2B29:00: Fetching the HID descriptor
>   i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: cmd=20 00
>   i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration
> 
> To fix this we follow what the Windows driver is doing and pass the default
> SDA hold time of 230 ns to all Intel Skylake host controllers. This still
> allows the platform to override these values by passing special ACPI
> methods SSCN and FMCN.
> 
> Reported-by: Kevin Fenzi <kevin@scrye.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

There has been a request to get this into stable:

https://bugzilla.kernel.org/show_bug.cgi?id=108581

Since we probably don't want to backport the whole device_property
series, is there a simpler fix to backport for stable?

[toc] | [next] | [standalone]


#1328897

FromMika Westerberg <mika.westerberg@linux.intel.com>
Date2016-02-08 11:40 +0100
Message-ID<qZRoB-3Xu-1@gated-at.bofh.it>
In reply to#1328885
On Mon, Feb 08, 2016 at 11:09:43AM +0100, Wolfram Sang wrote:
> On Mon, Nov 30, 2015 at 05:11:42PM +0200, Andy Shevchenko wrote:
> > From: Mika Westerberg <mika.westerberg@linux.intel.com>
> > 
> > Intel Skylake the LPSS I2C pad circuit has internal delays that require
> > programming non-zero SDA hold time for the I2C host controller. If this is
> > not done communication to slave devices may fail with arbitration lost
> > errors like the one seen below taken from Lenovo Yoga 900:
> > 
> >   i2c_hid i2c-SYNA2B29:00: Fetching the HID descriptor
> >   i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: cmd=20 00
> >   i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration
> > 
> > To fix this we follow what the Windows driver is doing and pass the default
> > SDA hold time of 230 ns to all Intel Skylake host controllers. This still
> > allows the platform to override these values by passing special ACPI
> > methods SSCN and FMCN.
> > 
> > Reported-by: Kevin Fenzi <kevin@scrye.com>
> > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> There has been a request to get this into stable:
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=108581
> 
> Since we probably don't want to backport the whole device_property
> series, is there a simpler fix to backport for stable?

Basically all it needs is to have:

	dev->sda_hold_time = 28

in dw_i2c_acpi_configure(). However, we cannot just unconditionally set
it as it will break existing non-SKL systems so there should be some way
to check if this is SKL or not. Perhaps we could look for DMI entries of
the affected machines?

BTW, this is not a regression in a sense as SKL I2C never worked before
this series.

[toc] | [prev] | [next] | [standalone]


#1328912

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2016-02-08 11:50 +0100
Message-ID<qZRyi-41d-25@gated-at.bofh.it>
In reply to#1328897
On Mon, Feb 8, 2016 at 12:29 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Mon, Feb 08, 2016 at 11:09:43AM +0100, Wolfram Sang wrote:
>> On Mon, Nov 30, 2015 at 05:11:42PM +0200, Andy Shevchenko wrote:

>> There has been a request to get this into stable:
>>
>> https://bugzilla.kernel.org/show_bug.cgi?id=108581
>>
>> Since we probably don't want to backport the whole device_property
>> series, is there a simpler fix to backport for stable?
>
> Basically all it needs is to have:
>
>         dev->sda_hold_time = 28
>
> in dw_i2c_acpi_configure(). However, we cannot just unconditionally set
> it as it will break existing non-SKL systems so there should be some way
> to check if this is SKL or not. Perhaps we could look for DMI entries of
> the affected machines?
>
> BTW, this is not a regression in a sense as SKL I2C never worked before
> this series.

I could add that "backporting" something which is drastically
different to the original mainstream may probably prevent a smooth
backporting the fixes come later if any. Thus, I would try to port as
much closer as we can to the existing upstream code.

-- 
With Best Regards,
Andy Shevchenko

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web