devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jassi Brar <jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	tpiepho-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Ard Biesheuvel
	<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Masami Hiramatsu
	<masami.hiramatsu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Jassi Brar
	<jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCHv2 1/3] dt-bindings: spi: Add DT bindings for Synquacer
Date: Tue, 16 Jan 2018 08:59:39 +0530	[thread overview]
Message-ID: <CABb+yY1f=NwB_UmGAogTj2AgA5stk5zic39HJgTSJcv1rdcQVw@mail.gmail.com> (raw)
In-Reply-To: <CAL_JsqK16GXU0WQ2Ft2-_dHOH_y08inMjF8vHE4mhK0Zo9=JMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, Jan 15, 2018 at 10:47 PM, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Mon, Jan 15, 2018 at 9:53 AM, Jassi Brar <jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On Mon, Jan 15, 2018 at 8:45 PM, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>>> On Mon, Jan 15, 2018 at 7:05 AM,  <jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>> From: Jassi Brar <jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>>>
>>>> This patch adds documentation for Device-Tree bindings for the
>>>> Socionext Synquacer spi driver.
>>>>
>>>> Signed-off-by: Jassi Brar <jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>>> ---
>>>>  .../devicetree/bindings/spi/spi-synquacer.txt      | 24 ++++++++++++++++++++++
>>>>  1 file changed, 24 insertions(+)
>>>>  create mode 100644 Documentation/devicetree/bindings/spi/spi-synquacer.txt
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/spi/spi-synquacer.txt b/Documentation/devicetree/bindings/spi/spi-synquacer.txt
>>>> new file mode 100644
>>>> index 0000000..d013cfd
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/spi/spi-synquacer.txt
>>>> @@ -0,0 +1,24 @@
>>>> +* Socionext Synquacer HS-SPI bindings
>>>> +
>>>> +Required Properties:
>>>> +- compatible: should be "socionext,synquacer-spi"
>>>> +- reg: physical base address of the controller and length of memory mapped
>>>> +       region.
>>>> +- clocks: Must contain an entry for rate source clock(s).
>>>> +- clock-names: Shall be "iHCLK" or "iPCLK". iHCLK is preferred over iPCLK
>>>
>>> Huh? The clock binding should reflect all clocks connected to a block,
>>> not a selection of which one you want to use.
>>>
>> Both the clocks are internal to the block and derived from the same source.
>> Instead of defining a new "use-ipclk" property, the driver uses the
>> clock-names to choose the appropriate divider.
>> I am open to any better option.
>
> If one is preferred, then why not always use it? Or how does one
> decide which clock to use?
>
A slight correction, there is a mux inside the block which selects
clock from two input ports (iPCLK and iHCLK) and send that to the
divider. Depending upon the spi slave speed requirements the platform
may choose to connect either PCLK or HCLK (or maybe both but switching
is said to be not feasible without block reset and DT can't suggest
switch in runtime so we ask DT to provide only the source clock).

Now the idea dawns that DT provide both clocks and the driver select
from the mux looking at speed requirements of the slave at runtime.
However, then, there will be a wide range of speeds that both could
provide. Not to forget the block drives 4 slaves and optimising speed
for one could potentially break other slaves. Practically the h/w
designer would have already thought of speed requirements of the
slaves and made sure that port is populated .... the driver could
simple count upon that good design.

Thanks
--
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:[~2018-01-16  3:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 13:05 [PATCHv2 0/3] spi: support for Socionext Synquacer platform jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <1516021530-19236-1-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-15 13:05   ` [PATCHv2 1/3] dt-bindings: spi: Add DT bindings for Synquacer jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w
     [not found]     ` <1516021559-19327-1-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-15 15:15       ` Rob Herring
     [not found]         ` <CAL_JsqKM2OhdhFZfd_fhBkYiFE9Fdr38Xn7TKorwJo_-+f9xUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-15 15:53           ` Jassi Brar
     [not found]             ` <CABb+yY3HEX6qMWxmirMnbwe3P5NwmUHGcuYypo-UzbUyUOi5UQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-15 17:17               ` Rob Herring
     [not found]                 ` <CAL_JsqK16GXU0WQ2Ft2-_dHOH_y08inMjF8vHE4mhK0Zo9=JMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-16  3:29                   ` Jassi Brar [this message]
     [not found]                     ` <CABb+yY1f=NwB_UmGAogTj2AgA5stk5zic39HJgTSJcv1rdcQVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-16 20:02                       ` Trent Piepho
     [not found]                         ` <1516132926.25398.98.camel-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2018-01-17 11:18                           ` Mark Brown
2018-01-17 10:00                   ` Jassi Brar
2018-01-15 13:06   ` [PATCHv2 2/3] spi: Add spi driver for Socionext Synquacer platform jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w
2018-01-15 13:06   ` [PATCHv2 3/3] MAINTAINERS: Add entry for Synquacer SPI driver jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w

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='CABb+yY1f=NwB_UmGAogTj2AgA5stk5zic39HJgTSJcv1rdcQVw@mail.gmail.com' \
    --to=jassisinghbrar-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=masami.hiramatsu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=tpiepho-cgc2CodaaHDQT0dZR+AlfA@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).