From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Ken Xue <ken.xue@amd.com>
Cc: wsa@the-dreams.de,
Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
Loc Ho <lho@apm.com>,
rjw@rjwysocki.net, lenb@kernel.org, linux-i2c@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
jcm@redhat.com, patches@apm.com, "Hurwitz,
Sherry" <sherry.hurwitz@amd.com>,
"Duran, Leo" <leo.duran@amd.com>,
Hanjun Guo <hanjun.guo@linaro.org>,
Al Stone <al.stone@linaro.org>,
Ivan.Zheng@amd.com, Xiangliang.Yu@amd.com
Subject: Re: [PATCH v2 0/2] i2c:dw: Add APM X-Gene ACPI I2C device support
Date: Wed, 23 Dec 2015 12:17:28 +0200 [thread overview]
Message-ID: <20151223101728.GL1758@lahna.fi.intel.com> (raw)
In-Reply-To: <1450864789.7740.35.camel@kxue-X58A-UD3R>
On Wed, Dec 23, 2015 at 05:59:49PM +0800, Ken Xue wrote:
> On Wed, 2015-12-23 at 11:52 +0200, Mika Westerberg wrote:
> > On Wed, Dec 23, 2015 at 05:34:01PM +0800, Ken Xue wrote:
> > > 1) Regarding
> > > https://msdn.microsoft.com/en-us/library/windows/hardware/dn919852(v=vs.85).aspx
> > > , Window I2C driver should pass MITT test. There are 5 I2C devices
> > > connect to one I2C bus for test. And those devices defined different
> > > "ConnectionSpeed" over the I2C bus by ACPI resource "I2CSerialBus".
> > >
> > > During test, I2C bus should run in different "ConnectionSpeed" of
> > > device.
> > >
> > > That means windows driver can modify I2C bus speed to match the
> > > "ConnectionSpeed" of device on-the-fly. Static value from SSCN and FMCN
> > > can not work for WITT test cases.
> >
> > That is why there are *CNT methods for all supported I2C modes:
> >
> > - SSCN() - returns for standard mode (100kHz)
> > - FMCN() - returns for fast mode (400kHz)
> > - FPCN() - returns for fast mode+ (1MHz)
> >
> > for High-speed mode I'm not sure what the method name is ;-)
> >
> > Then the Windows driver switches between those based on what the
> > ConnectionSpeed is in the ACPI I2C connector.
>
> Window driver can set Bus speed based on "ConnectionSpeed". But Current
> Linux driver only sets Bus speed during probe. How can Linux diver
> determine which Bus speed should be applied, if all *CNT methods return
> non-zero?
By default Linux driver uses 400kHz so it picks values returned from
FMCN(). You can hack clk_freq in the driver to use 100kHz which then
picks SSCN().
There is no support for reading ConnectionSpeed in Linux yet.
WARNING: multiple messages have this Message-ID (diff)
From: mika.westerberg@linux.intel.com (Mika Westerberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/2] i2c:dw: Add APM X-Gene ACPI I2C device support
Date: Wed, 23 Dec 2015 12:17:28 +0200 [thread overview]
Message-ID: <20151223101728.GL1758@lahna.fi.intel.com> (raw)
In-Reply-To: <1450864789.7740.35.camel@kxue-X58A-UD3R>
On Wed, Dec 23, 2015 at 05:59:49PM +0800, Ken Xue wrote:
> On Wed, 2015-12-23 at 11:52 +0200, Mika Westerberg wrote:
> > On Wed, Dec 23, 2015 at 05:34:01PM +0800, Ken Xue wrote:
> > > 1) Regarding
> > > https://msdn.microsoft.com/en-us/library/windows/hardware/dn919852(v=vs.85).aspx
> > > , Window I2C driver should pass MITT test. There are 5 I2C devices
> > > connect to one I2C bus for test. And those devices defined different
> > > "ConnectionSpeed" over the I2C bus by ACPI resource "I2CSerialBus".
> > >
> > > During test, I2C bus should run in different "ConnectionSpeed" of
> > > device.
> > >
> > > That means windows driver can modify I2C bus speed to match the
> > > "ConnectionSpeed" of device on-the-fly. Static value from SSCN and FMCN
> > > can not work for WITT test cases.
> >
> > That is why there are *CNT methods for all supported I2C modes:
> >
> > - SSCN() - returns for standard mode (100kHz)
> > - FMCN() - returns for fast mode (400kHz)
> > - FPCN() - returns for fast mode+ (1MHz)
> >
> > for High-speed mode I'm not sure what the method name is ;-)
> >
> > Then the Windows driver switches between those based on what the
> > ConnectionSpeed is in the ACPI I2C connector.
>
> Window driver can set Bus speed based on "ConnectionSpeed". But Current
> Linux driver only sets Bus speed during probe. How can Linux diver
> determine which Bus speed should be applied, if all *CNT methods return
> non-zero?
By default Linux driver uses 400kHz so it picks values returned from
FMCN(). You can hack clk_freq in the driver to use 100kHz which then
picks SSCN().
There is no support for reading ConnectionSpeed in Linux yet.
next prev parent reply other threads:[~2015-12-23 10:17 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 21:19 [PATCH v2 0/2] i2c:dw: Add APM X-Gene ACPI I2C device support Loc Ho
2015-12-10 21:19 ` Loc Ho
2015-12-10 21:19 ` [PATCH v2 1/2] acpi:apd: " Loc Ho
2015-12-10 21:19 ` Loc Ho
2015-12-11 1:13 ` Ken Xue
2015-12-11 1:13 ` Ken Xue
2015-12-10 21:19 ` [PATCH v2 2/2] i2c:dw: " Loc Ho
2015-12-10 21:19 ` Loc Ho
2015-12-15 0:53 ` [PATCH v2 0/2] " Suravee Suthikulanit
2015-12-15 0:53 ` Suravee Suthikulanit
2015-12-15 13:27 ` Mika Westerberg
2015-12-15 13:27 ` Mika Westerberg
2015-12-15 14:52 ` Suravee Suthikulpanit
2015-12-15 14:52 ` Suravee Suthikulpanit
2015-12-15 14:59 ` Mika Westerberg
2015-12-15 14:59 ` Mika Westerberg
2015-12-15 19:20 ` Loc Ho
2015-12-15 19:20 ` Loc Ho
2015-12-16 9:04 ` Mika Westerberg
2015-12-16 9:04 ` Mika Westerberg
2015-12-16 12:53 ` Jarkko Nikula
2015-12-16 12:53 ` Jarkko Nikula
2015-12-23 9:34 ` Ken Xue
2015-12-23 9:34 ` Ken Xue
2015-12-23 9:52 ` Mika Westerberg
2015-12-23 9:52 ` Mika Westerberg
2015-12-23 9:59 ` Ken Xue
2015-12-23 9:59 ` Ken Xue
2015-12-23 10:17 ` Mika Westerberg [this message]
2015-12-23 10:17 ` Mika Westerberg
2015-12-23 10:02 ` Zheng, Ivan
2015-12-23 10:02 ` Zheng, Ivan
2015-12-23 10:09 ` Mika Westerberg
2015-12-23 10:09 ` Mika Westerberg
2015-12-23 11:24 ` Zheng, Ivan
2015-12-23 11:24 ` Zheng, Ivan
2015-12-23 11:40 ` Mika Westerberg
2015-12-23 11:40 ` Mika Westerberg
2016-01-04 9:09 ` Ben Dooks
2016-01-04 9:09 ` Ben Dooks
2016-01-03 0:54 ` Rafael J. Wysocki
2016-01-03 0:54 ` Rafael J. Wysocki
2016-01-04 6:23 ` Loc Ho
2016-01-04 6:23 ` Loc Ho
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=20151223101728.GL1758@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=Ivan.Zheng@amd.com \
--cc=Suravee.Suthikulpanit@amd.com \
--cc=Xiangliang.Yu@amd.com \
--cc=al.stone@linaro.org \
--cc=hanjun.guo@linaro.org \
--cc=jcm@redhat.com \
--cc=ken.xue@amd.com \
--cc=lenb@kernel.org \
--cc=leo.duran@amd.com \
--cc=lho@apm.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=patches@apm.com \
--cc=rjw@rjwysocki.net \
--cc=sherry.hurwitz@amd.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 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.