From: Tony Lindgren <tony@atomide.com>
To: Roger Quadros <rogerq@ti.com>
Cc: Pekon Gupta <pekon@ti.com>,
linux-omap <linux-omap@vger.kernel.org>,
Javier Martinez Canillas <javier@dowhile0.org>,
Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Subject: Re: [PATCH v6 2/4] ARM: dts: am437x-gp-evm: add support for parallel NAND flash
Date: Fri, 16 May 2014 09:20:50 -0700 [thread overview]
Message-ID: <20140516162049.GF22031@atomide.com> (raw)
In-Reply-To: <537602FE.4020108@ti.com>
* Roger Quadros <rogerq@ti.com> [140516 05:23]:
> On 05/16/2014 02:03 PM, Pekon Gupta wrote:
> > +&gpmc {
> > + status = "okay";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&nand_flash_x8>;
> > + ranges = <0 0 0 0x01000000>; /* minimum GPMC partition = 16MB */
> > + nand@0,0 {
> > + reg = <0 0 0x37c>; /* device IO registers */
>
> This register space is used by the parent GPMC node as well as the NAND controller. So doing a request_and_ioremap() on this space will fail as it is already taken by the GPMC driver.
>
> Further, the GPMC register space doesn't map to the GPMC memory map created by this Chip select but it is mapped to L3_IO space. i.e. (physical address 0x6e00 0000)
>
> We could have split the GPMC register space into GPMC part and NAND part but to add to the complexity, the register spaces for GPMC vs NAND are interleaved so it can't be easily split up. The way the NAND driver is currently written is that it expects the register addresses to come via platform data, primarily to get around this address interleaving issue.
>
> Apart from the GPMC register space, the NAND controller uses 4 bytes of GPMC memory map for I/O, and that is something that could be reflected here.
>
> e.g.
> reg = <0 0 4>; /* NAND I/O space */
Guys, the reg size here is size of the IO region for the
NAND driver, it should not have anything to do with the GPMC
registers for the GPMC functions that the NAND driver may call.
So it sounds like 0x37c is wrong, and 4 is the right value if
the NAND chip has only one IO register.
> But still, the start address can't be 0 and has to be assigned when this CS region is mapped. It is still unclear to me how that can be done.
If the offset for the NAND driver needs to be different from 0,
it can be in the offset. For example, the smsc,lan91c94 driver
wants the IO address space to be at offset 0x300 to avoid some
extra warnings during the boot. So for that, the reg entry is:
reg = <1 0x300 0xf>;
Where we have:
1 = chip select
0x300 = offset of smsc device register IO space from the start of
16MB minimum GPMC partition
0xf = size of smsc device register IO space that the Ethernet
driver ioremaps
Regards,
Tony
next prev parent reply other threads:[~2014-05-16 16:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 11:03 [PATCH v6 0/4] add parallel NAND support for TI's new OMAPx and AMxx platforms (Part-2) Pekon Gupta
2014-05-16 11:03 ` [PATCH v6 1/4] ARM: dts: am335x-bone: add support for beaglebone NAND cape Pekon Gupta
2014-05-16 11:57 ` Ezequiel Garcia
2014-05-16 14:06 ` Gupta, Pekon
2014-05-16 17:34 ` Javier Martinez Canillas
2014-05-16 11:03 ` [PATCH v6 2/4] ARM: dts: am437x-gp-evm: add support for parallel NAND flash Pekon Gupta
2014-05-16 12:22 ` Roger Quadros
2014-05-16 13:58 ` Gupta, Pekon
2014-05-16 14:26 ` Roger Quadros
2014-05-16 16:20 ` Tony Lindgren [this message]
2014-05-16 18:52 ` Gupta, Pekon
2014-05-16 20:29 ` Roger Quadros
2014-05-16 21:01 ` Tony Lindgren
2014-05-16 11:03 ` [PATCH v6 3/4] ARM: dts: dra7: " Pekon Gupta
2014-05-16 11:03 ` [PATCH v6 4/4] ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition Pekon Gupta
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=20140516162049.GF22031@atomide.com \
--to=tony@atomide.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=javier@dowhile0.org \
--cc=linux-omap@vger.kernel.org \
--cc=pekon@ti.com \
--cc=rogerq@ti.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