From: Andrey Pronin <apronin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Christophe Ricard
<christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Subject: Re: [PATCH v2 1/2] tpm: devicetree: document properties for cr50
Date: Wed, 27 Jul 2016 14:00:47 -0700 [thread overview]
Message-ID: <20160727210047.GA119121@apronin> (raw)
In-Reply-To: <20160721210312.GA10605@rob-hp-laptop>
On Thu, Jul 21, 2016 at 04:03:12PM -0500, Rob Herring wrote:
> On Wed, Jul 20, 2016 at 12:49:12PM -0700, Andrey Pronin wrote:
> > On Wed, Jul 20, 2016 at 02:03:03PM -0500, Rob Herring wrote:
> > > On Tue, Jul 19, 2016 at 08:41:24PM -0700, Andrey Pronin wrote:
> >
> > Hi Rob,
> >
> > > As I mentioned, there may be common properties. It doesn't seem you
> > > looked, so I did:
> > >
> > > - spi-rx-delay-us - (optional) Microsecond delay after a read transfer.
> > > - spi-tx-delay-us - (optional) Microsecond delay after a write transfer.
> > >
> > > Seems to me setting one or both of these should work for you.
> > >
> >
> > Yes, good catch, my fault I didn't see those.
> > But they are not exactly what I mean and need. I don't need delay after
> > each read or write transfer. What is needed is a guaranteed time
> > between transfers.
> >
> > So, if the next transaction doesn't come withing the next X ms (or us),
> > we don't waste time on inserting a delays after this transaction at all.
> > Following the description and always inserting a delay must work well
> > for short microseconds-long delays. For longer milliseconds-long delays
> > a different strategy of checking the time when the previous transaction
> > was and only delaying if it was not too long ago is better.
>
> I'd guess that the intent is the same for all. A simple delay is
> just much easier to implement. I would think implementing the more
> sophisticated algorithm would work for all users. Perhaps with some
> threshold for a simple delay.
>
> > Thus, I won't be able to re-use these properties anyways based on their
> > current description in bindings/spi/spi-bus.txt.
> >
> > > > +- sleep-delay-ms: Time after the last SPI activity, after which the chip
> > > > + may go to sleep.
> > > > +- wake-start-delay-ms: Time after initiating wake up before the chip is
> > > > + ready to accept commands over SPI.
> > >
> > > I also asked why these 2 can't be hard-coded in the driver?
> > >
> >
> > Sorry, I just updated this patch description in v2 to indicate why they are not
> > hard-coded, but didn't answer explicitly. As the firmware changes, a different
> > revision of it can have a different time before it sleeps in its configuration,
> > or the time it takes it to startup may be different. Thus, there's a way to
> > set it here w/o changing the driver.
>
> The firmware and DT may not be updated in sync especially if you are
> loading the firmware from the rootfs. Are you doing DT and firmware
> updates without changing the kernel?
>
> Rob
Hi Rob,
Thanks for the feedback. I will hard-code those parameters in the
driver instead of reading from DT.
Thanks,
Andrey
------------------------------------------------------------------------------
WARNING: multiple messages have this Message-ID (diff)
From: Andrey Pronin <apronin@chromium.org>
To: Rob Herring <robh@kernel.org>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
Peter Huewe <peterhuewe@gmx.de>,
Marcel Selhorst <tpmdd@selhorst.net>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
Christophe Ricard <christophe.ricard@gmail.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/2] tpm: devicetree: document properties for cr50
Date: Wed, 27 Jul 2016 14:00:47 -0700 [thread overview]
Message-ID: <20160727210047.GA119121@apronin> (raw)
In-Reply-To: <20160721210312.GA10605@rob-hp-laptop>
On Thu, Jul 21, 2016 at 04:03:12PM -0500, Rob Herring wrote:
> On Wed, Jul 20, 2016 at 12:49:12PM -0700, Andrey Pronin wrote:
> > On Wed, Jul 20, 2016 at 02:03:03PM -0500, Rob Herring wrote:
> > > On Tue, Jul 19, 2016 at 08:41:24PM -0700, Andrey Pronin wrote:
> >
> > Hi Rob,
> >
> > > As I mentioned, there may be common properties. It doesn't seem you
> > > looked, so I did:
> > >
> > > - spi-rx-delay-us - (optional) Microsecond delay after a read transfer.
> > > - spi-tx-delay-us - (optional) Microsecond delay after a write transfer.
> > >
> > > Seems to me setting one or both of these should work for you.
> > >
> >
> > Yes, good catch, my fault I didn't see those.
> > But they are not exactly what I mean and need. I don't need delay after
> > each read or write transfer. What is needed is a guaranteed time
> > between transfers.
> >
> > So, if the next transaction doesn't come withing the next X ms (or us),
> > we don't waste time on inserting a delays after this transaction at all.
> > Following the description and always inserting a delay must work well
> > for short microseconds-long delays. For longer milliseconds-long delays
> > a different strategy of checking the time when the previous transaction
> > was and only delaying if it was not too long ago is better.
>
> I'd guess that the intent is the same for all. A simple delay is
> just much easier to implement. I would think implementing the more
> sophisticated algorithm would work for all users. Perhaps with some
> threshold for a simple delay.
>
> > Thus, I won't be able to re-use these properties anyways based on their
> > current description in bindings/spi/spi-bus.txt.
> >
> > > > +- sleep-delay-ms: Time after the last SPI activity, after which the chip
> > > > + may go to sleep.
> > > > +- wake-start-delay-ms: Time after initiating wake up before the chip is
> > > > + ready to accept commands over SPI.
> > >
> > > I also asked why these 2 can't be hard-coded in the driver?
> > >
> >
> > Sorry, I just updated this patch description in v2 to indicate why they are not
> > hard-coded, but didn't answer explicitly. As the firmware changes, a different
> > revision of it can have a different time before it sleeps in its configuration,
> > or the time it takes it to startup may be different. Thus, there's a way to
> > set it here w/o changing the driver.
>
> The firmware and DT may not be updated in sync especially if you are
> loading the firmware from the rootfs. Are you doing DT and firmware
> updates without changing the kernel?
>
> Rob
Hi Rob,
Thanks for the feedback. I will hard-code those parameters in the
driver instead of reading from DT.
Thanks,
Andrey
next prev parent reply other threads:[~2016-07-27 21:00 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 2:20 [PATCH 0/2] tpm: add driver for cr50 on SPI Andrey Pronin
2016-07-19 12:56 ` Jarkko Sakkinen
[not found] ` <1468549218-19215-1-git-send-email-apronin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-07-15 2:20 ` [PATCH 1/2] tpm: devicetree: document properties for cr50 Andrey Pronin
2016-07-15 2:20 ` Andrey Pronin
2016-07-15 4:05 ` Guenter Roeck
[not found] ` <CABXOdTcVcZ10c6uShN2AXUZfOuK=FESeo73Assi0sziMZJ_+Fw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-15 17:31 ` Andrey Pronin
2016-07-15 17:31 ` Andrey Pronin
2016-07-15 18:28 ` Guenter Roeck
2016-07-15 18:28 ` Guenter Roeck
[not found] ` <1468549218-19215-2-git-send-email-apronin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-07-17 13:28 ` Rob Herring
2016-07-17 13:28 ` Rob Herring
2016-07-15 2:20 ` [PATCH 2/2] tpm: add driver for cr50 on SPI Andrey Pronin
2016-07-15 2:20 ` Andrey Pronin
[not found] ` <1468549218-19215-3-git-send-email-apronin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-07-15 3:32 ` Jason Gunthorpe
2016-07-15 3:32 ` Jason Gunthorpe
[not found] ` <20160715033236.GH9347-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-15 3:44 ` Andrey Pronin
2016-07-15 3:44 ` Andrey Pronin
2016-07-19 12:55 ` Jarkko Sakkinen
2016-07-19 12:55 ` Jarkko Sakkinen
[not found] ` <20160719125527.GB5047-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-20 0:24 ` Andrey Pronin
2016-07-20 0:24 ` Andrey Pronin
2016-07-20 17:03 ` Jason Gunthorpe
2016-07-20 17:03 ` Jason Gunthorpe
[not found] ` <20160720170336.GC21460-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-21 18:10 ` Andrey Pronin
2016-07-21 18:10 ` Andrey Pronin
2016-07-21 21:00 ` Jason Gunthorpe
2016-07-21 21:00 ` Jason Gunthorpe
2016-07-15 2:28 ` [PATCH 0/2] " Peter Huewe
2016-07-15 2:28 ` Peter Huewe
2016-07-15 2:50 ` Andrey Pronin
2016-07-15 3:28 ` Jason Gunthorpe
2016-07-15 3:28 ` Jason Gunthorpe
[not found] ` <20160715032814.GG9347-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-15 17:15 ` Andrey Pronin
2016-07-15 17:15 ` Andrey Pronin
2016-07-20 3:41 ` [PATCH v2 " Andrey Pronin
2016-07-20 3:41 ` Andrey Pronin
[not found] ` <cover.1468985673.git.apronin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-07-20 3:41 ` [PATCH v2 1/2] tpm: devicetree: document properties for cr50 Andrey Pronin
2016-07-20 3:41 ` Andrey Pronin
2016-07-20 19:03 ` Rob Herring
2016-07-20 19:49 ` Andrey Pronin
2016-07-20 19:49 ` Andrey Pronin
2016-07-20 19:54 ` Jason Gunthorpe
2016-07-20 19:54 ` Jason Gunthorpe
[not found] ` <20160720195422.GA30947-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-27 21:02 ` Andrey Pronin
2016-07-27 21:02 ` Andrey Pronin
2016-07-21 21:03 ` Rob Herring
2016-07-21 21:03 ` Rob Herring
2016-07-27 21:00 ` Andrey Pronin [this message]
2016-07-27 21:00 ` Andrey Pronin
2016-07-20 3:41 ` [PATCH v2 2/2] tpm: add driver for cr50 on SPI Andrey Pronin
2016-07-20 3:41 ` Andrey Pronin
2016-07-25 17:09 ` [PATCH v2 0/2] " Peter Huewe
2016-07-25 17:09 ` Aw: " Peter Huewe
2016-07-27 21:12 ` Andrey Pronin
2016-07-28 4:25 ` [PATCH v3 " Andrey Pronin
2016-07-28 4:25 ` Andrey Pronin
2016-07-28 4:25 ` [PATCH v3 1/2] tpm: devicetree: document properties for cr50 Andrey Pronin
2016-07-28 4:25 ` Andrey Pronin
2016-07-28 4:25 ` [PATCH v3 2/2] tpm: add driver for cr50 on SPI Andrey Pronin
2016-07-28 4:25 ` Andrey Pronin
2016-07-28 23:01 ` Dmitry Torokhov
2016-07-28 23:17 ` Jason Gunthorpe
2016-07-28 23:17 ` Jason Gunthorpe
[not found] ` <20160728231706.GA22087-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-29 3:01 ` Andrey Pronin
2016-07-29 3:01 ` Andrey Pronin
2016-07-29 1:55 ` [PATCH v4 0/2] " Andrey Pronin
2016-07-29 1:55 ` Andrey Pronin
2016-07-29 1:55 ` [PATCH v4 1/2] tpm: devicetree: document properties for cr50 Andrey Pronin
2016-07-29 1:55 ` Andrey Pronin
[not found] ` <1469757314-116169-2-git-send-email-apronin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-07-29 17:27 ` Jason Gunthorpe
2016-07-29 17:27 ` Jason Gunthorpe
[not found] ` <20160729172752.GA7458-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-29 21:42 ` Rob Herring
2016-07-29 21:42 ` Rob Herring
2016-08-09 10:08 ` Jarkko Sakkinen
2016-08-09 10:08 ` Jarkko Sakkinen
2016-07-29 1:55 ` [PATCH v4 2/2] tpm: add driver for cr50 on SPI Andrey Pronin
2016-07-29 1:55 ` Andrey Pronin
2016-08-09 10:20 ` Jarkko Sakkinen
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=20160727210047.GA119121@apronin \
--to=apronin-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
--cc=christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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.