All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
To: "jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"mark.rutland-5wv7dgnIgG8@public.gmane.org"
	<mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"masami.hiramatsu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<masami.hiramatsu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<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 20:02:06 +0000	[thread overview]
Message-ID: <1516132926.25398.98.camel@impinj.com> (raw)
In-Reply-To: <CABb+yY1f=NwB_UmGAogTj2AgA5stk5zic39HJgTSJcv1rdcQVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2390 bytes --]

On Tue, 2018-01-16 at 08:59 +0530, Jassi Brar wrote:
> On Mon, Jan 15, 2018 at 10:47 PM, Rob Herring <robh+dt@kernel.org> wrote:
> > On Mon, Jan 15, 2018 at 9:53 AM, Jassi Brar <jassisinghbrar@gmail.com> wrote:
> > > On Mon, Jan 15, 2018 at 8:45 PM, Rob Herring <robh+dt@kernel.org> wrote:
> > > > On Mon, Jan 15, 2018 at 7:05 AM,  <jassisinghbrar@gmail.com> wrote:
> > > > > 
> > > > > +- 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

It seems like the DT is a reasonable description of how the hardware is
designed.  It's possible to choose different clocks with different
rates to be wired to PCLK and/or HCLK, via some internal clock tree in
the SoC?  That's what the DT would indicate.

You could maybe allow one or both to be connected, and if both are
connected, have the driver prefer one based on some driver logic. 
Which would allow one to then...

> 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.

add this feature at some point.  It might be simpler to just prefer
HCLK if both are there.  The idea being that the DT should describe the
hardware rather than tell the driver what to do.

Speed can be changed on a xfer by xfer basis on a single message to a
single slave.  Trying to switch clocks during a message, if it requires
resetting the whole block, sounds rather difficult.

N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·zøœzÚÞz)í…æèw*\x1fjg¬±¨\x1e¶‰šŽŠÝ¢j.ïÛ°\½½MŽúgjÌæa×\x02››–' ™©Þ¢¸\f¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾\a«‘êçzZ+ƒùšŽŠÝ¢j"ú!¶i

  parent reply	other threads:[~2018-01-16 20:02 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
     [not found]                     ` <CABb+yY1f=NwB_UmGAogTj2AgA5stk5zic39HJgTSJcv1rdcQVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-16 20:02                       ` Trent Piepho [this message]
     [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=1516132926.25398.98.camel@impinj.com \
    --to=tpiepho-cgc2codaahdqt0dzr+alfa@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=jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@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 \
    /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.