devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rob Herring <robh@kernel.org>, Mark Brown <broonie@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-spi <linux-spi@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] dt-bindings: spi: Provide bindings for fsl dspi working in slave mode
Date: Wed, 26 Sep 2018 23:33:59 +0200	[thread overview]
Message-ID: <20180926233359.2ca0d344@jawa> (raw)
In-Reply-To: <CAMuHMdWWYvhGX+SmG+WuLJZAX6PdCSd0hzNqiNB1r_A+B6tbSA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2939 bytes --]

Hi Geert,

> Hi Lukasz,
> 
> On Wed, Sep 26, 2018 at 4:33 PM Lukasz Majewski <lukma@denx.de> wrote:
> > > On Tue, Sep 18, 2018 at 11:34:35AM +0200, Lukasz Majewski wrote:  
> > > > This commit provides the description of new property:
> > > > "fsl,spi-slave-mode" which enables support for DSPI driver
> > > > working in slave mode.
> > > >
> > > > As the new compatible shall be used with SPI bus equipped with
> > > > master device a new "spidev" based node has been introduced to
> > > > avoid confusion.
> > > >
> > > > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > > > ---
> > > >  Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | 8
> > > > ++++++++ 1 file changed, 8 insertions(+)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> > > > b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt index
> > > > 18eeafe359d8..b30af19a2bc5 100644 ---
> > > > a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt +++
> > > > b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt @@
> > > > -26,6 +26,7 @@ Optional SPI properties for slave nodes:
> > > >  - fsl,spi-sck-cs-delay: a delay in nanoseconds between stopping
> > > > the clock signal and deactivating chip select, at the end of a
> > > > transfer.
> > > >  - bus-num : the slave chip chipselect signal number.
> > > > +- fsl,spi-slave-mode: if present, controller runs in slave
> > > > mode.  
> > >
> > > There's a standard property for this.  
> >
> > I've just realised that there is "spi-slave" property in the
> > Documentation/devicetree/bindings/spi/spi-bus.txt
> >
> > I will convert the code to use it.
> >  
> > >  
> > > >
> > > >  Example:
> > > >
> > > > @@ -56,6 +57,13 @@ dspi0@4002c000 {
> > > >             fsl,spi-cs-sck-delay = <100>;
> > > >             fsl,spi-sck-cs-delay = <50>;
> > > >     };
> > > > +
> > > > +   spidev3@1 {
> > > > +           compatible = "fsl,vf610-dspi";
> > > > +           spi-max-frequency = <30000000>;
> > > > +           reg = <1>;
> > > > +           fsl,spi-slave-mode;  
> > >
> > > This doesn't look right for how slave mode is described.  
> >
> > You mean that I shall replace fsl,spi-slave-mode; with "spi-slave" ?
> >
> > Or is there any other issue with this code?  
> 
> According to Documentation/devicetree/bindings/spi/spi-bus.txt:
>   1. "spi-slave" should be a property of the controller node, not of
> the slave node,
>   2. the slave node should be called "slave", without unit address,
> and without "reg" property.

Thanks for clarification.

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-09-26 21:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  9:34 [PATCH 0/3] ARM: dspi: Provide slave mode support for Vybryd vf610 Lukasz Majewski
2018-09-18  9:34 ` [PATCH 1/3] dt-bindings: spi: Provide bindings for fsl dspi working in slave mode Lukasz Majewski
2018-09-24 21:25   ` Rob Herring
2018-09-26 14:32     ` Lukasz Majewski
2018-09-26 15:37       ` Geert Uytterhoeven
2018-09-26 21:33         ` Lukasz Majewski [this message]
2018-09-18  9:34 ` [PATCH 2/3] ARM: dspi: Provide per DSPI instance of the MCR register (SLAVE mode) Lukasz Majewski
2018-09-18  9:34 ` [PATCH 3/3] ARM: dspi: Provide support for DSPI slave more operation (Vybryd vf610) Lukasz Majewski
2018-09-18  9:42 ` [PATCH 0/3] ARM: dspi: Provide slave mode support for Vybryd vf610 Lukasz Majewski

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=20180926233359.2ca0d344@jawa \
    --to=lukma@denx.de \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh@kernel.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).