From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: Vaibhav Hiremath
<vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
robert.jarzmik-GANU6spQydw@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH-v5 RESEND 4/5] Documentation: binding: add sclk adjustment properties to i2c-pxa
Date: Sun, 25 Oct 2015 09:37:48 +0100 [thread overview]
Message-ID: <20151025083748.GC2159@katana> (raw)
In-Reply-To: <1440395978-9065-5-git-send-email-vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]
On Mon, Aug 24, 2015 at 11:29:37AM +0530, Vaibhav Hiremath wrote:
> With addition of PXA910 family of devices, the TWSI module supports
> new feature which allows us to adjust SCLK. i2c-pxa driver takes input
> configuration in nsec and converts it to respective bit-fields,
>
> - i2c-sclk-low-time-ns : SCLK low time (tlow)
> This property is used along with mode selection.
> - i2c-sclk-high-time-ns : SCLK high time (thigh)
> - i2c-start-hold-time-ns : Used in case of high speed mode for start bit
> hold/setup wait counter.
> - i2c-stop-hold-time-ns : Used in case of high speed mode for stop bit
> hold/setup wait counter.
> - i2c-sda-hold-time-ns : Used to calculate hold/setup wait counter for
> standard and fast mode.
>
> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Ooookay, after checking some datasheets, I finally stumbled over the
fact that this driver is not using "clock-frequency" to determine the
bus speed. However, this is the standard way of defining that in DT, so
this driver should adhere to that, too, and not invent something new.
Previously, I was under the impression that the above parameters were
needed for fine-tuning and couldn't fully grasp why. But this is for
defining the bus speed which is a no-go.
It looks to me that older PXA only have a bit to select between 100 and
400kHz while this newer one can have arbitrary frequencies. Correct?
So, what the driver should do:
- Keep support for the old "mrvl,i2c-fast-mode" binding which should be
marked as deprecated
- get the value of the standard property "clock-frequency"
- for old PXAs, complain if not 100 or 400kHz, otherwise set the bit
accordingly
- for new PXAs, calculate the ilcr and iwcr values from
"clock-frequency"
Makes sense?
Regards,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH-v5 RESEND 4/5] Documentation: binding: add sclk adjustment properties to i2c-pxa
Date: Sun, 25 Oct 2015 09:37:48 +0100 [thread overview]
Message-ID: <20151025083748.GC2159@katana> (raw)
In-Reply-To: <1440395978-9065-5-git-send-email-vaibhav.hiremath@linaro.org>
On Mon, Aug 24, 2015 at 11:29:37AM +0530, Vaibhav Hiremath wrote:
> With addition of PXA910 family of devices, the TWSI module supports
> new feature which allows us to adjust SCLK. i2c-pxa driver takes input
> configuration in nsec and converts it to respective bit-fields,
>
> - i2c-sclk-low-time-ns : SCLK low time (tlow)
> This property is used along with mode selection.
> - i2c-sclk-high-time-ns : SCLK high time (thigh)
> - i2c-start-hold-time-ns : Used in case of high speed mode for start bit
> hold/setup wait counter.
> - i2c-stop-hold-time-ns : Used in case of high speed mode for stop bit
> hold/setup wait counter.
> - i2c-sda-hold-time-ns : Used to calculate hold/setup wait counter for
> standard and fast mode.
>
> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Ooookay, after checking some datasheets, I finally stumbled over the
fact that this driver is not using "clock-frequency" to determine the
bus speed. However, this is the standard way of defining that in DT, so
this driver should adhere to that, too, and not invent something new.
Previously, I was under the impression that the above parameters were
needed for fine-tuning and couldn't fully grasp why. But this is for
defining the bus speed which is a no-go.
It looks to me that older PXA only have a bit to select between 100 and
400kHz while this newer one can have arbitrary frequencies. Correct?
So, what the driver should do:
- Keep support for the old "mrvl,i2c-fast-mode" binding which should be
marked as deprecated
- get the value of the standard property "clock-frequency"
- for old PXAs, complain if not 100 or 400kHz, otherwise set the bit
accordingly
- for new PXAs, calculate the ilcr and iwcr values from
"clock-frequency"
Makes sense?
Regards,
Wolfram
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151025/634e4f47/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org,
robert.jarzmik@free.fr, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH-v5 RESEND 4/5] Documentation: binding: add sclk adjustment properties to i2c-pxa
Date: Sun, 25 Oct 2015 09:37:48 +0100 [thread overview]
Message-ID: <20151025083748.GC2159@katana> (raw)
In-Reply-To: <1440395978-9065-5-git-send-email-vaibhav.hiremath@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1850 bytes --]
On Mon, Aug 24, 2015 at 11:29:37AM +0530, Vaibhav Hiremath wrote:
> With addition of PXA910 family of devices, the TWSI module supports
> new feature which allows us to adjust SCLK. i2c-pxa driver takes input
> configuration in nsec and converts it to respective bit-fields,
>
> - i2c-sclk-low-time-ns : SCLK low time (tlow)
> This property is used along with mode selection.
> - i2c-sclk-high-time-ns : SCLK high time (thigh)
> - i2c-start-hold-time-ns : Used in case of high speed mode for start bit
> hold/setup wait counter.
> - i2c-stop-hold-time-ns : Used in case of high speed mode for stop bit
> hold/setup wait counter.
> - i2c-sda-hold-time-ns : Used to calculate hold/setup wait counter for
> standard and fast mode.
>
> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Ooookay, after checking some datasheets, I finally stumbled over the
fact that this driver is not using "clock-frequency" to determine the
bus speed. However, this is the standard way of defining that in DT, so
this driver should adhere to that, too, and not invent something new.
Previously, I was under the impression that the above parameters were
needed for fine-tuning and couldn't fully grasp why. But this is for
defining the bus speed which is a no-go.
It looks to me that older PXA only have a bit to select between 100 and
400kHz while this newer one can have arbitrary frequencies. Correct?
So, what the driver should do:
- Keep support for the old "mrvl,i2c-fast-mode" binding which should be
marked as deprecated
- get the value of the standard property "clock-frequency"
- for old PXAs, complain if not 100 or 400kHz, otherwise set the bit
accordingly
- for new PXAs, calculate the ilcr and iwcr values from
"clock-frequency"
Makes sense?
Regards,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-10-25 8:37 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 5:59 [PATCH-v5 RESEND 0/5] i2c: pxa: Add support for PXA910 family of device Vaibhav Hiremath
2015-08-24 5:59 ` Vaibhav Hiremath
2015-08-24 5:59 ` Vaibhav Hiremath
2015-08-24 5:59 ` [PATCH-v5 RESEND 1/5] Documentation: binding: add new property 'disable_after_xfer' to i2c-pxa Vaibhav Hiremath
2015-08-24 5:59 ` Vaibhav Hiremath
2015-08-24 5:59 ` [PATCH-v5 RESEND 2/5] i2c: pxa: enable/disable i2c module across msg xfer Vaibhav Hiremath
2015-08-24 5:59 ` Vaibhav Hiremath
[not found] ` <1440395978-9065-3-git-send-email-vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-09-11 18:53 ` Wolfram Sang
2015-09-11 18:53 ` Wolfram Sang
2015-09-11 18:53 ` Wolfram Sang
2015-09-14 5:07 ` Vaibhav Hiremath
2015-09-14 5:07 ` Vaibhav Hiremath
2015-10-25 8:21 ` Wolfram Sang
2015-10-25 8:21 ` Wolfram Sang
2015-08-24 5:59 ` [PATCH-v5 RESEND 3/5] i2c: pxa: Add support for pxa910/988 & new configuration features Vaibhav Hiremath
2015-08-24 5:59 ` Vaibhav Hiremath
[not found] ` <1440395978-9065-4-git-send-email-vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-09-11 19:06 ` Wolfram Sang
2015-09-11 19:06 ` Wolfram Sang
2015-09-11 19:06 ` Wolfram Sang
2015-09-14 5:28 ` Vaibhav Hiremath
2015-09-14 5:28 ` Vaibhav Hiremath
2015-09-14 5:28 ` Vaibhav Hiremath
2015-10-25 8:40 ` Wolfram Sang
2015-10-25 8:40 ` Wolfram Sang
2015-10-25 8:25 ` Wolfram Sang
2015-10-25 8:25 ` Wolfram Sang
2015-08-24 5:59 ` [PATCH-v5 RESEND 4/5] Documentation: binding: add sclk adjustment properties to i2c-pxa Vaibhav Hiremath
2015-08-24 5:59 ` Vaibhav Hiremath
[not found] ` <1440395978-9065-5-git-send-email-vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-10-25 8:37 ` Wolfram Sang [this message]
2015-10-25 8:37 ` Wolfram Sang
2015-10-25 8:37 ` Wolfram Sang
2015-08-24 5:59 ` [PATCH-v5 RESEND 5/5] i2c: pxa: Add ILCR (tLow & tHigh) configuration support Vaibhav Hiremath
2015-08-24 5:59 ` Vaibhav Hiremath
[not found] ` <1440395978-9065-1-git-send-email-vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-09-02 6:47 ` [PATCH-v5 RESEND 0/5] i2c: pxa: Add support for PXA910 family of device Vaibhav Hiremath
2015-09-02 6:47 ` Vaibhav Hiremath
2015-09-02 6:47 ` Vaibhav Hiremath
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=20151025083748.GC2159@katana \
--to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robert.jarzmik-GANU6spQydw@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/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.