linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org>
To: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: linux-spi <linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2] spi: orion: support armada extended baud rates
Date: Fri, 05 Sep 2014 10:36:10 +1000	[thread overview]
Message-ID: <5409057A.6090900@uclinux.org> (raw)
In-Reply-To: <CAMuHMdWDOaPnmCzThqCo2848eDj6jmi-eaXM1YAXQLi41da34A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Geert,

On 04/09/14 23:17, Geert Uytterhoeven wrote:
> On Thu, Sep 4, 2014 at 2:54 PM,  <gerg-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org> wrote:
>> The Armada SoC family implementation of this SPI hardware module has
>> extended the configuration register to allow for a wider range of SPI
>> clock rates. Specifically the Serial Baud Rate Pre-selection bits in the
>> SPI Interface Configuration Register now also use bits 6 and 7 as well.
>>
>> Modify the baud rate calculation to handle these differences for the
>> Armada case. Potentially a baud rate can be setup using a number of
>> different pre-scalar and scalar combinations. This code tries all
>> possible pre-scalar divisors (8 in total) to try and find the most
>> accuate set.
> 
> Are the Orion rates and register bits a subset of the Armada ones?
> I.e. does the Armada work with the Orion setup?

The bits used by the orion are a subset (bits 0-4 of the SPI
configuration register) of those used by the armada (bits 0-4 and
6-7).

In practice the defined prescalar values for the orion do give
the same divisor for the same bits set on armada. The extra bits
on the armada let you get to lower SPI baudrates (which is more of
a problem on the armada with its higher core clocks).


>> This change introduces a new device tree compatible device name
>> "armada-spi". This is used in place of "orion-spi" on the Armada SoC
>> parts.
> 
>> -                               compatible = "marvell,orion-spi";
>> +                               compatible = "marvell,armada-spi";
> 
> If the answer to my above question is yes, you want to keep
> "marvell,orion-spi" as a fallback.

Do you mean like this?

  compatible = "marvell,orion-spi", "marvell,armada-spi";

Regards
Greg

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-09-05  0:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04 12:54 [PATCH v2] spi: orion: support armada extended baud rates gerg-JBU5SbJe1FlAfugRpC6u6w
     [not found] ` <1409835268-29555-1-git-send-email-gerg-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org>
2014-09-04 13:17   ` Geert Uytterhoeven
     [not found]     ` <CAMuHMdWDOaPnmCzThqCo2848eDj6jmi-eaXM1YAXQLi41da34A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-05  0:36       ` Greg Ungerer [this message]
     [not found]         ` <5409057A.6090900-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org>
2014-09-05  7:36           ` Geert Uytterhoeven
     [not found]             ` <CAMuHMdWf6_yBhpNgK=wJcQqzLNJvTnC95SrqrcZyRH+jGL93vA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-05 13:11               ` Greg Ungerer
     [not found]                 ` <5409B68A.7010604-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org>
2014-09-06 12:06                   ` Ezequiel Garcia
     [not found]                     ` <20140906120600.GA11500-nAQHv47ARr+vIlHkl8J1cg@public.gmane.org>
2014-09-06 13:16                       ` Thomas Petazzoni
     [not found]                         ` <20140906151654.49584b70-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-09-07 12:18                           ` Greg Ungerer
2014-09-07 12:14                       ` Greg Ungerer
     [not found]                         ` <540C4C18.5030903-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org>
2014-09-07 15:12                           ` Ezequiel Garcia
     [not found]                             ` <20140907151250.GA692-nAQHv47ARr+vIlHkl8J1cg@public.gmane.org>
2014-09-08  1:52                               ` Greg Ungerer

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=5409057A.6090900@uclinux.org \
    --to=gerg-jbu5sbje1flafugrpc6u6w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@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;
as well as URLs for NNTP newsgroup(s).