From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>
Cc: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
marcel-mitwqZ+T+m9Wk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH 2/2] ARM: tegra: initial add of Colibri T30
Date: Thu, 15 May 2014 12:13:55 -0600 [thread overview]
Message-ID: <537503E3.6050108@wwwdotorg.org> (raw)
In-Reply-To: <107aeb48982529858267cb85c792b35e-XLVq0VzYD2Y@public.gmane.org>
On 05/14/2014 10:16 AM, Stefan Agner wrote:
> Am 2014-05-13 21:49, schrieb Stephen Warren:
>> On 05/13/2014 11:27 AM, stefan-XLVq0VzYD2Y@public.gmane.org wrote:
>>> + /* SPI1: Colibri SSP */
>>> + spi@7000d400 {
>>> + status = "okay";
>>> + spi-max-frequency = <25000000>;
>>> + can0: can@0 {
>>> + compatible = "microchip,mcp2515";
>>> + reg = <0>;
>>> + clocks = <&clk16m>;
>>> + interrupt-parent = <&gpio>;
>>> + interrupts = <TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>;
>>> + spi-max-frequency = <10000000>;
>>
>> So this chip doesn't get confused by a faster clock frequency when its
>> chip-select line isn't asserted? I would have expected spi-max-frequency
>> for the bus to be the minimum value that any device on the bus would
>> tolerate.
>
> And from the other mail:
>> I'm not convinced about this. The clock signal still reaches all the
>> chips, and hence still reaches some logic inside those chips. If the
>> setup/hold timings aren't met (for internal parts of the chip's SPI
>> state machine), then presumably all bets are off re: performance of the
>> chip, irrespective of whether the CS line happens to gate how much of
>> the chip actually does anything.
>
> SPI is by default not a multi-master Bus, hence the slaves only have to
> listen when the CS is asserted.
That's got nothing to do with multi-master; it's got to do with the fact
that an out-of-band /CS signal is what selects devices rather than
in-band data on the bus.
> I talked with our hardware expert, and
> he told me that he would expect that the whole input stage (input
> driver) is in reset/off logic when the CS line is not asserted. IMHO,
> this makes sense, this would also save power. At least he would expect
> that the communication state machine is resetted on CS assertion, so
> that it doesn't matter what happend before.
>
> Wikipedia also states something similar.
I find it much more likely that /CS would be a synchronous input to the
SPI state machine in the HW. That way, the chip designers don't have to
worry about issues with asynchronous resets.
Anyway, both our arguments are pure conjecture. The only way to tell for
sure is for you to go read the datasheets for the individual devices and
find out if they document any requirements for the clock signal when /CS
isn't active. It'd be good if you could check that.
> But, since SPI is no real standard, devices which work differently and
> claim to communicate through SPI could exist :-)
>
> I have had not seen issues with this device when using faster clocks for
> other devices on the same bus.
... but I suppose that since in practice you're not seeing any issues,
the DT is fine for now. It's not like this can't be changed later if we
find out there is an issue.
next prev parent reply other threads:[~2014-05-15 18:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 16:16 [PATCH 2/2] ARM: tegra: initial add of Colibri T30 Stefan Agner
[not found] ` <107aeb48982529858267cb85c792b35e-XLVq0VzYD2Y@public.gmane.org>
2014-05-15 18:13 ` Stephen Warren [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-05-13 17:27 [PATCH 0/2] ARM: tegra: initial support for " stefan
2014-05-13 17:27 ` [PATCH 2/2] ARM: tegra: initial add of " stefan
[not found] ` <d45ec5351ce8ef03256061bdc4b0ba673bd40c66.1400001937.git.stefan-XLVq0VzYD2Y@public.gmane.org>
2014-05-13 19:49 ` Stephen Warren
[not found] ` <53727738.4080901-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-05-14 7:22 ` Marcel Ziswiler
2014-05-14 14:32 ` Thierry Reding
2014-05-14 15:38 ` Stephen Warren
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=537503E3.6050108@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marcel-mitwqZ+T+m9Wk0Htik3J/w@public.gmane.org \
--cc=stefan-XLVq0VzYD2Y@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox