All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Marek Vasut <marek.vasut@gmail.com>
Cc: Mason Yang <masonccyang@mxic.com.tw>,
	broonie@kernel.org, tpiepho@impinj.com,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org,
	Simon Horman <horms@verge.net.au>,
	juliensu@mxic.com.tw,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	zhengxunli@mxic.com.tw
Subject: Re: [PATCH 2/2] dt-binding: spi: Document Renesas R-Car RPC controller bindings
Date: Mon, 19 Nov 2018 16:21:27 +0100	[thread overview]
Message-ID: <20181119162127.71d0665d@bbrezillon> (raw)
In-Reply-To: <4c0683d3-fe9d-5a10-6f5c-4774024cb12a@gmail.com>

On Mon, 19 Nov 2018 16:12:41 +0100
Marek Vasut <marek.vasut@gmail.com> wrote:

> On 11/19/2018 03:43 PM, Boris Brezillon wrote:
> > On Mon, 19 Nov 2018 15:14:07 +0100
> > Marek Vasut <marek.vasut@gmail.com> wrote:
> >   
> >> On 11/19/2018 03:10 PM, Boris Brezillon wrote:  
> >>> On Mon, 19 Nov 2018 14:49:31 +0100
> >>> Marek Vasut <marek.vasut@gmail.com> wrote:
> >>>     
> >>>> On 11/19/2018 11:01 AM, Mason Yang wrote:    
> >>>>> Document the bindings used by the Renesas R-Car D3 RPC controller.
> >>>>>
> >>>>> Signed-off-by: Mason Yang <masonccyang@mxic.com.tw>
> >>>>> ---
> >>>>>  .../devicetree/bindings/spi/spi-renesas-rpc.txt    | 33 ++++++++++++++++++++++
> >>>>>  1 file changed, 33 insertions(+)
> >>>>>  create mode 100644 Documentation/devicetree/bindings/spi/spi-renesas-rpc.txt
> >>>>>
> >>>>> diff --git a/Documentation/devicetree/bindings/spi/spi-renesas-rpc.txt b/Documentation/devicetree/bindings/spi/spi-renesas-rpc.txt
> >>>>> new file mode 100644
> >>>>> index 0000000..8286cc8
> >>>>> --- /dev/null
> >>>>> +++ b/Documentation/devicetree/bindings/spi/spi-renesas-rpc.txt
> >>>>> @@ -0,0 +1,33 @@
> >>>>> +Renesas R-Car D3 RPC controller Device Tree Bindings
> >>>>> +----------------------------------------------------
> >>>>> +
> >>>>> +Required properties:
> >>>>> +- compatible: should be "renesas,rpc-r8a77995"
> >>>>> +- #address-cells: should be 1
> >>>>> +- #size-cells: should be 0
> >>>>> +- reg: should contain 2 entries, one for the registers and one for the direct
> >>>>> +       mapping area
> >>>>> +- reg-names: should contain "rpc_regs" and "dirmap"
> >>>>> +- interrupts: interrupt line connected to the RPC SPI controller      
> >>>>
> >>>> Do you also plan to support the RPC HF mode ? And if so, how would that
> >>>> look in the bindings ?    
> >>>
> >>> Not sure this approach is still accepted, but that's how we solved the
> >>> problem for the flexcom block [1].
> >>>
> >>> [1]https://elixir.bootlin.com/linux/v4.20-rc3/source/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt    
> >>
> >> That looks pretty horrible.
> >>
> >> In U-Boot we check whether the device hanging under the controller node
> >> is JEDEC SPI flash or CFI flash and based on that decide what the config
> >> of the controller should be (SPI or HF). Not sure that's much better,but
> >> at least it doesn't need extra nodes which do not really represent any
> >> kind of real hardware.
> >>  
> > 
> > The subnodes are not needed, you can just have a property that tells in
> > which mode the controller is supposed to operate, and the MFD would
> > create a sub-device that points to the same device_node.  
> 
> Do you even need a dedicated property ? I think you can decide purely on
> what node is hanging under the controller (jedec spi nor or cfi nor).

Yes, that could work if they have well-known compatibles. As soon as
people start using flash-specific compats (like some people do for
their SPI NORs) it becomes a maintenance burden.

> 
> > Or we can have
> > a single driver that decides what to declare (a spi_controller or flash
> > controller), but you'd still have to decide where to place this
> > driver...  
> 
> I'd definitely prefer a single driver.
> 

Where would you put this driver? I really don't like the idea of having
MTD drivers spread over the tree. Don't know what's Mark's opinion on
this matter.

  reply	other threads:[~2018-11-20  1:45 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 10:01 [PATCH 0/2] spi: Add Renesas R-Car D3 RPC SPI driver Mason Yang
2018-11-19 10:01 ` [PATCH 1/2] spi: Add Renesas R-Car RPC SPI controller driver Mason Yang
2018-11-19 14:12   ` Marek Vasut
2018-11-19 15:27     ` Mark Brown
2018-11-19 22:10       ` Marek Vasut
2018-11-20 13:26         ` Mark Brown
2018-11-20 13:33           ` Marek Vasut
2018-11-20  7:23     ` masonccyang
2018-11-20 13:09       ` Marek Vasut
2018-11-20 13:32         ` Boris Brezillon
2018-11-20 13:35           ` Marek Vasut
2018-11-23  0:45     ` masonccyang
2018-11-23 13:34       ` Marek Vasut
2018-11-23 13:34         ` Marek Vasut
2018-11-20  2:04   ` kbuild test robot
2018-11-20  5:49   ` kbuild test robot
2018-11-20  8:01   ` Geert Uytterhoeven
2018-11-20  8:10     ` Boris Brezillon
2018-11-20  9:27       ` masonccyang
2018-11-20  9:23     ` masonccyang
2018-11-19 10:01 ` [PATCH 2/2] dt-binding: spi: Document Renesas R-Car RPC controller bindings Mason Yang
2018-11-19 13:49   ` Marek Vasut
2018-11-19 14:10     ` Boris Brezillon
2018-11-19 14:14       ` Marek Vasut
2018-11-19 14:43         ` Boris Brezillon
2018-11-19 15:12           ` Marek Vasut
2018-11-19 15:21             ` Boris Brezillon [this message]
2018-11-19 22:11               ` Marek Vasut
2018-11-19 22:19                 ` Boris Brezillon
2018-11-19 22:22                   ` Marek Vasut
2018-11-19 22:25                     ` Boris Brezillon
2018-11-19 22:29                       ` Marek Vasut
2018-11-19 22:31                         ` Boris Brezillon
2018-11-20  5:42     ` masonccyang
2018-11-20 12:57       ` Marek Vasut
2018-11-21  0:53         ` masonccyang
2018-11-21  1:51           ` Marek Vasut
2018-11-20  8:07   ` Geert Uytterhoeven
2018-11-20 13:56   ` kbuild test robot

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=20181119162127.71d0665d@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=juliensu@mxic.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=masonccyang@mxic.com.tw \
    --cc=tpiepho@impinj.com \
    --cc=zhengxunli@mxic.com.tw \
    /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.