public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Marcus Mikolaiczyk <m.mikolaiczyk@rac.de>
To: m.mikolaiczyk@rac.de
Cc: linux-mtd@lists.infradead.org
Subject: Re: Nand Flash not found.
Date: Fri, 06 May 2005 11:52:19 +0200	[thread overview]
Message-ID: <427B3E53.3090803@rac.de> (raw)
In-Reply-To: <425E4576.7030603@rac.de>

Hi,

I'm still on the way getting the Samsung NAND discovered, but a small
step has been made.
I've got now a simple testapplication which can read out the NAND IDs
with the readid cmd 0x90 . So I can definitely discover this NAND chip
with this Linux app, but not with the 'derived' linux NAND driver.
Samsung K9F2G08UOM:
Page Size: 2k (+64) Bytes
Block Size: 128k (+4k) Bytes
Organisation: 8 Bit


Code example for external READID cmd:
#define NANDF_DATA            (*((unsigned int volatile *) 0xAE000000))
#define NANDF_COMM            (*((unsigned int volatile *) 0xAE000004))
#define NANDF_ADDR            (*((unsigned int volatile *) 0xAE000008))
...
  value=0x90;
  NANDF_COMM=value;
  value=0x00; // not necessary
  NANDF_ADDR=value;
  va[0]=NANDF_DATA;
  va[1]=NANDF_DATA;
  va[2]=NANDF_DATA;
  va[3]=NANDF_DATA;
  printf("Maker Code: %x     Device Type: %x    DontCare: %x
Organisation: %x\n\r", va[0], va[1], va[2], v
a[3]);
...

Results:
Maker Code: ec     Device Type: da    DontCare: 80    Organisation: 15
SAMSUNG		   3.3V				      See Above Values for Pages Size...

I changed the hardwarespecific part to this values but with no success.
The module does not find the NAND.

static int BTU_NAND_BASE = 0xAE000000;
static int BTU_NAND_VIRT_BASE ;
static int BTU_NAND_RB = 0xF0000C00;
static int BTU_NAND_RB_RDY = (1<<5);
...
static void btutc1130_hwcontrol(struct mtd_info *mtd, int cmd)
{
       struct nand_chip *this = (struct nand_chip *) mtd->priv;
       switch(cmd){
       //Command Latch Enable Settings
       case NAND_CTL_SETCLE: this->IO_ADDR_W = BTU_NAND_BASE + 4; break;
       case NAND_CTL_CLRCLE: this->IO_ADDR_W = BTU_NAND_BASE; break;
       //Address Latch Enable Settings
       case NAND_CTL_SETALE: this->IO_ADDR_W = BTU_NAND_BASE + 8; break;
       case NAND_CTL_CLRALE: this->IO_ADDR_W = BTU_NAND_BASE; break;
       }
}
...
       /* map physical adress */
        BTU_NAND_VIRT_BASE=(unsigned long)ioremap(BTU_NAND_BASE,SZ_4K);
...
        /* Set address of NAND IO lines */
        this->IO_ADDR_R = BTU_NAND_BASE;
        this->IO_ADDR_W = BTU_NAND_BASE;
        this->hwcontrol = btutc1130_hwcontrol;
        this->dev_ready = btutc1130_device_ready;
        /* 20 us command delay time */
        this->chip_delay = 20;
        this->eccmode = NAND_ECC_SOFT;
...

What does the nand_scan function check ?
What else should be adapted (Chip ID list in nand_ids.c)?
Someone any ideas.

Cheers Marcus

  reply	other threads:[~2005-05-06 10:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14  9:29 Nand Flash not found Marcus Mikolaiczyk
2005-04-14 10:11 ` William J Beksi
2005-04-14 10:27   ` Marcus Mikolaiczyk
2005-05-06  9:52     ` Marcus Mikolaiczyk [this message]
2005-05-06 12:10       ` Thomas Gleixner
2005-05-06 13:35         ` Marcus Mikolaiczyk

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=427B3E53.3090803@rac.de \
    --to=m.mikolaiczyk@rac.de \
    --cc=linux-mtd@lists.infradead.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