From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Daniel Mack <zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Afzal Mohammed <afzal-l0cyMroinI0@public.gmane.org>,
"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
Mark Brown
<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
"Nori, Sekhar" <nsekhar-l0cyMroinI0@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: Representation of external memory-mapped devices in DT (gpmc)
Date: Mon, 29 Oct 2012 10:09:54 -0500 [thread overview]
Message-ID: <508E9C42.10907@gmail.com> (raw)
In-Reply-To: <508E9513.7050106-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 10/29/2012 09:39 AM, Daniel Mack wrote:
> Hi,
>
> we're currently working on a DT binding for the GPMC bus that is found
> on SoCs by TI. The implementation is based on CS lines and an 8, 16 or
> 32 bit parallel interface. That IP is quite flexible, and it can for
> example be used for physmap flash, external peripherals or even NAND.
>
> Depending on which CS is used to control the device, different memory
> regions are reserved, and there's code to calculate the location and
> size of them, given a CS number (see arch/arm/mach-omap2/gpmc.c).
I don't know the details of the h/w, but I would think the DT core code
should be able work out the addresses. This can be done using ranges
property which defines the mapping of a child bus into the parent bus
addresses.
> The binding will use one top-level node to describe the GPMC controller
> itself and register the actual devices as sub-nodes to it. The NAND type
> is the only one that is currently supported. This is how it currently looks:
>
> gpmc: gpmc@50000000 {
> compatible = "ti,gpmc";
> ti,hwmods = "gpmc";
> reg = <0x50000000 0x2000>;
> interrupt-parent = <&intc>;
> interrupts = <100>;
> #address-cells = <1>;
> #size-cells = <0>;
>
> nand@0 {
You may want a CS0 node with nand as a child node of that.
Rob
> reg = <0>; /* CS0 */
> nand-bus-width = <16>;
> nand-ecc-mode = "soft";
>
> gpmc,sync-clk = <0>;
> gpmc,cs-on = <0>;
> gpmc,cs-rd-off = <44>;
> gpmc,cs-wr-off = <44>;
> gpmc,adv-on = <6>;
> gpmc,adv-rd-off = <34>;
> gpmc,adv-wr-off = <44>;
> gpmc,we-off = <40>;
> gpmc,oe-off = <54>;
> gpmc,access = <64>;
> gpmc,rd-cycle = <82>;
> gpmc,wr-cycle = <82>;
> gpmc,wr-access = <40>;
> gpmc,wr-data-mux-bus = <0>;
>
> #address-cells = <1>;
> #size-cells = <1>;
>
> partition@0 {
> label = "1st";
> reg = <0x0 0x20000>;
> };
> /* more partitions ... */
> };
> };
>
> The question is where the resource location and sizes should be
> described so that the code that does the magic run-time calculations can
> be removed eventually. I would clearly prefer not to have them in the
> child, as the only thing these nodes really care about is the chip
> select index the hardware is wired to.
>
> Should the "reg" property in the parent be augmented to hold such details?
>
> Once we got that sorted out, I'll do a re-spin of the series and copy
> devicetree-discuss on the patch that adds the bindings.
>
>
> Thanks,
> Daniel
>
next prev parent reply other threads:[~2012-10-29 15:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 14:39 Representation of external memory-mapped devices in DT (gpmc) Daniel Mack
[not found] ` <508E9513.7050106-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-29 15:09 ` Rob Herring [this message]
[not found] ` <508E9C42.10907-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-29 17:22 ` Daniel Mack
[not found] ` <508EBB47.8070405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-29 21:49 ` Rob Herring
[not found] ` <508EF9E3.5090507-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-29 22:37 ` Daniel Mack
2012-10-30 10:50 ` Afzal Mohammed
[not found] ` <508FB10D.9030906-l0cyMroinI0@public.gmane.org>
2012-11-01 0:08 ` Daniel Mack
[not found] ` <5091BD7C.7040105-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-01 0:21 ` Rob Herring
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=508E9C42.10907@gmail.com \
--to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=afzal-l0cyMroinI0@public.gmane.org \
--cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=nsekhar-l0cyMroinI0@public.gmane.org \
--cc=zonque-Re5JQEeQqe8AvxtiuMwx3w@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).