devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Chris Brandt <Chris.Brandt@renesas.com>,
	Kumar Gala <kumar.gala@linaro.org>
Cc: Simon Horman <horms@verge.net.au>,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org,
	"open list:MEDIA DRIVERS FOR RENESAS - FCP"
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 2/2] ARM: dts: r7s9210-rza2mevb: Add support for RZ/A2M EVB
Date: Wed, 12 Dec 2018 11:10:24 -0600	[thread overview]
Message-ID: <CAL_Jsq+Ah7Xg0VnEaYyn4giFeQme9r9GyRsFDucq78BP+Cw2=A@mail.gmail.com> (raw)
In-Reply-To: <TYXPR01MB1568DD386FE18BD1F985E5178AA70@TYXPR01MB1568.jpnprd01.prod.outlook.com>

+Kumar who was just asking me about this exact problem.

On Wed, Dec 12, 2018 at 7:59 AM Chris Brandt <Chris.Brandt@renesas.com> wrote:
>
> On Tuesday, December 11, 2018, Rob Herring wrote:
> > > +   /* Cramfs XIP File System in QSPI */
> > > +   qspi@20000000 {
> >
> >
> > > +           compatible = "mtd-rom";
> >
> > This should be the actual Quad-SPI controller and then a flash device
> > underneath it. It may work as-is initially, but eventually won't you
> > need the flash details?
>
> Not really.
> The "QSPI" actually works as a memory mapped SPI (as in, the CPU sees
> the QSPI flash as a linear read-only address range).

Yes, those controllers are becoming pretty standard.

> Basically, u-boot sets up the QSPI to look like a ROM area, and that's
> it. Everything is running directly from that QSPI flash, so you can't
> make any modifications to it while running, otherwise the whole system will
> go down. Therefore, there is no need to know anything about the actually
> Flash that is connected, because you are never allowed to interact with it
> (or even query it on boot).

Okay, but these days u-boot uses DT itself. So how does u-boot know
how to set things up? It's going to need to know what controller and
flash details. Or how does one do a flash update (in the field)?

I think it would be better to have a property to say the flash is
already setup and just use it. Or maybe it can be done with
compatibles:

spi@1234 {
  compatible = "vendor,soc-quadspi", "mmio-spi";
  flash@0 {
    compatible = "some-flash-part", "mtd-rom";
  };
};

Now the problem is how to define the address range as SPI flash
devices are already defined to use SPI chip-select numbers. The
easiest option from a DT standpoint is just look at the parent reg
property and figure out the memory range (typically there are 2 and
you want the big one). Or you could have some simple driver that knows
which reg range to get for specific compatibles.

Rob

  reply	other threads:[~2018-12-12 17:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 13:05 [PATCH 0/2] Add Initial Device Tree for RZ/A2 Chris Brandt
2018-11-29 13:05 ` [PATCH 1/2] ARM: dts: r7s9210: Initial SoC device tree Chris Brandt
2018-11-30 11:55   ` Simon Horman
2018-11-30 12:04     ` Chris Brandt
2018-11-30 12:22       ` Simon Horman
2018-11-30 16:03         ` Geert Uytterhoeven
2018-11-30 16:21           ` Chris Brandt
2018-12-04 15:18   ` Geert Uytterhoeven
2018-11-29 13:05 ` [PATCH 2/2] ARM: dts: r7s9210-rza2mevb: Add support for RZ/A2M EVB Chris Brandt
2018-11-30 11:57   ` Simon Horman
2018-11-30 12:20     ` Chris Brandt
2018-11-30 15:59       ` Geert Uytterhoeven
2018-11-30 16:10         ` Chris Brandt
2018-11-30 16:16           ` Geert Uytterhoeven
2018-12-04 16:01   ` Geert Uytterhoeven
2018-12-04 16:25     ` Chris Brandt
2018-12-04 16:27       ` Geert Uytterhoeven
2018-12-12  2:15   ` Rob Herring
2018-12-12 13:58     ` Chris Brandt
2018-12-12 17:10       ` Rob Herring [this message]
2018-12-12 18:03         ` Chris Brandt
2018-12-17 15:27           ` Rob Herring
2018-12-17 16:22             ` Chris Brandt
2018-12-17 17:00               ` Rob Herring
2018-12-17 17:41                 ` Chris Brandt
2018-12-18  7:42                   ` Geert Uytterhoeven

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='CAL_Jsq+Ah7Xg0VnEaYyn4giFeQme9r9GyRsFDucq78BP+Cw2=A@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=Chris.Brandt@renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=horms@verge.net.au \
    --cc=kumar.gala@linaro.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    /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).