linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	chin.yew.tan@intel.com, mika.westerberg@linux.intel.com,
	wsa@the-dreams.de,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	linux-i2c@vger.kernel.org, ken.xue@amd.com, jeff.wu@amd.com
Subject: Re: Regression: bd698d24b1b57: i2c: designware: Get selected speed mode sda-hold-time via ACPI
Date: Thu, 18 May 2017 16:05:00 +0300	[thread overview]
Message-ID: <25ff2580-d461-87f2-f61d-2ede10ea4c01@linux.intel.com> (raw)
In-Reply-To: <CAKv+Gu-DPNUy=ODRqqVrvO-b04FxkEg8bz=dHzwspU5FqBRnNg@mail.gmail.com>

On 05/18/2017 03:24 PM, Ard Biesheuvel wrote:
> On 10 May 2017 at 14:55, Jarkko Nikula <jarkko.nikula@linux.intel.com> wrote:
>> On 05/10/2017 12:24 PM, Lorenzo Pieralisi wrote:
>>>
>>> On Tue, May 09, 2017 at 07:20:48PM +0300, Andy Shevchenko wrote:
>>>>>>
>>>>>> It means either ID is not added to drivers/acpi/acpi_apd.c or
>>>>
>>>>
>>>> Just one question, did you look at all into above driver?
>>>> I suppose it missed ID and properties for the device.
>>>
>>>
>>> I looked into it yes. I have also looked at ACPI tables and they
>>> contain the SSCN and FMCN methods and AFAIK the set-up was working
>>> fine before the commit in $SUBJECT - AMD guys - please correct me
>>> if I am wrong, I found this thread which explains things a bit:
>>>
>>>
>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/395983.html
>>>
>>> If we have to patch drivers/acpi/acpi_apd.c to restore the previous
>>> behaviour that's fine by me but this is a regression nonetheless unless
>>> someone explains to me why the current firmware set-up (with SSCN and
>>> FMCN) is unreliable/deprecated, it is not clear to me at all and it
>>> may affect other platforms too.
>>>
>> I guess best would be to fix the i2c_dw_init(). Maybe by moving timing
>> parameters settings out to another function, do setting only for selected
>> speed and calculate only once in case parameters are not set.
>>
>> I don't think timing parameters for standard or fast speeds are not needed
>> unless operating at those speeds but have to check that first. At least
>> that's what we are doing for high speed.
>>
>
> Commit bd698d24b1b57 is broken and should be reverted: the splat on
> AMD Seattle is the most visible symptom, but the logic change results
> in DW_IC_SS_SCL_HCNT/DW_IC_SS_SCL_LCNT possibly being set to different
> values than specified by the ACPI methods. The missing clock splat is
> only a symptom of this: the driver tries to calculate values from the
> clock frequency that should have been read from the DSDT.
>
> For reference, this is the description we have on the platform in question:
>
>             Method (SSCN, 0, NotSerialized)
>             {
>                 Return (Package (0x03)
>                 {
>                     0x0430,
>                     0x04E1,
>                     0x00
>                 })
>             }
>
>             Method (FMCN, 0, NotSerialized)
>             {
>                 Return (Package (0x03)
>                 {
>                     0x00DE,
>                     0x018F,
>                     0x00
>                 })
>             }
>
> Whether it hurts to program different standard mode values here is
> irrelevant. It is simply wrong.
>
I have a fix for this. Could you try does it fix the issue for you?

http://www.spinics.net/lists/linux-i2c/msg29509.html

-- 
Jarkko

  reply	other threads:[~2017-05-18 13:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09 14:07 Regression: bd698d24b1b57: i2c: designware: Get selected speed mode sda-hold-time via ACPI Lorenzo Pieralisi
2017-05-09 14:54 ` Andy Shevchenko
2017-05-09 15:52   ` Lorenzo Pieralisi
2017-05-09 16:20     ` Andy Shevchenko
2017-05-10  9:24       ` Lorenzo Pieralisi
2017-05-10 13:55         ` Jarkko Nikula
2017-05-18 12:24           ` Ard Biesheuvel
2017-05-18 13:05             ` Jarkko Nikula [this message]
2017-05-18 13:44               ` Ard Biesheuvel
2017-05-19  7:11                 ` Jarkko Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25ff2580-d461-87f2-f61d-2ede10ea4c01@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=chin.yew.tan@intel.com \
    --cc=jeff.wu@amd.com \
    --cc=ken.xue@amd.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).