linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Ran Shalit <ranshalit@gmail.com>
Cc: <linuxppc-dev@lists.ozlabs.org>
Subject: Re: GPMC in device tree
Date: Mon, 10 Aug 2015 18:34:33 -0500	[thread overview]
Message-ID: <1439249673.4099.7.camel@freescale.com> (raw)
In-Reply-To: <CAJ2oMhKa3TTmMQ+C_3ZtYTHWKw2vqShnQCQNta-5kJAy-7NqSQ@mail.gmail.com>

On Sun, 2015-08-09 at 22:18 +0300, Ran Shalit wrote:
> On Sun, Aug 9, 2015 at 9:27 AM, Ran Shalit <ranshalit@gmail.com> wrote:
> > 
> > Hi ,
> > 
> > I reboot the board, with the new device tree localbus, but I don't
> > have any new /dev/mtdX entry for the NOR flash.
> > There is no HW issue, becuase we can R/W access the NOR flash from u-boot.
> > Is there any hint what can be the issue here ? I've checked in kernel
> > config and validated that mtd is supported.
> > The NOR flash is S29GL512P , SPANSION.
> > 
> >  localbus@e0005000{
> > #address-cells = <2>;
> > #size-cells = <1>;
> >    compatible = "fsl,mpc8349-localbus", "simple-bus";
> >     reg = <0xe0005000 0x1000>;
> >     interrupts = <77 0x8>;
> >     interrupt-parent = <&ipic>;
> > 
> > 
> > # NOR and NAND Flashes
> >   ranges = <0x0 0x0 0xff800000 0x00800000
> >     0x1 0x0 0xF8000000 0x08000000
> >     0x2 0x0 0xf7e00000 0x00200000>;

You have overlap between cs0 and cs1.

> > nor@0,0 {
> > #address-cells = <1>;
> > #size-cells = <1>;
> > compatible = "cfi-flash";
> > reg = <0x0 0x0 0x00800000>;
> > #bank-width = <1>;
> > device-width = <1>;

It's "bank-width", not "#bank-width".

> > 
> > };
> > };
> > 
> > Best Regards,
> > Ran
> 
> Hello,
> 
> Just to update,
> I eventually solved this issue.
> I don't do any configuration in device tree. All BRx configuration is
> already done in u-boot (as was done from the start), and everything
> seems to work OK: cpld, nvram.
> 
> For NOR FPGA I only added NOR configuration to kernel:
> 
> CONFIG_MTD_PHYSMAP=y
> CONFIG_MTD_PHYSMAP_START=0xf8000000
> CONFIG_MTD_PHYSMAP_LEN=0x7800000
> CONFIG_MTD_PHYSMAP_BANKWIDTH=4

I don't recommend this.  You're bypassing the device tree entirely.

Why did you put bankwidth 4 here, but bankwidth 1 in the device tere?

-Scott

      reply	other threads:[~2015-08-10 23:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 15:29 GPMC in device tree Ran Shalit
2015-08-04 18:54 ` Scott Wood
2015-08-04 20:26   ` Ran Shalit
2015-08-04 20:31     ` Scott Wood
2015-08-04 21:22       ` Ran Shalit
2015-08-04 21:25         ` Scott Wood
2015-08-05  3:56           ` Ran Shalit
2015-08-05  6:11             ` Ran Shalit
2015-08-05 14:27               ` Ran Shalit
2015-08-06  3:07                 ` Scott Wood
2015-08-09  6:27                   ` Ran Shalit
2015-08-09 19:18                     ` Ran Shalit
2015-08-10 23:34                       ` Scott Wood [this message]

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=1439249673.4099.7.camel@freescale.com \
    --to=scottwood@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ranshalit@gmail.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).