public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] CFI driver and P33 64M flash
@ 2008-09-25 13:50 Felix Radensky
  2008-09-25 14:53 ` Stefan Roese
  2009-08-04 20:48 ` psdof
  0 siblings, 2 replies; 6+ messages in thread
From: Felix Radensky @ 2008-09-25 13:50 UTC (permalink / raw)
  To: u-boot

Hi,

I'm running U-Boot 1.3.4 on custom 460EX based board,
equipped with 64M P33 flash (similar to Intel P30). See
http://www.numonyx.com/Documents/Datasheets/314749_P33_Discrete_DS.pdf

This flash is comprised internally of two 32M flashes.
I have the following declarations in configuration file:

#define CFG_FLASH_CFI            /* The flash is CFI compatible    */
#define CFG_FLASH_CFI_DRIVER        /* Use common CFI driver    */

#define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
#define CFG_MAX_FLASH_BANKS    1    /* max number of memory banks        */
#define CFG_MAX_FLASH_SECT    518    /* max number of sectors on one 
chip    */

#define CFG_FLASH_USE_BUFFER_WRITE 1    /* use buffered writes (20x 
faster)    */
#define CFG_FLASH_PROTECTION       1    /* use hardware flash 
protection        */
#define CFG_FLASH_EMPTY_INFO        /* print 'E' for empty sector on 
flinfo */

U-Boot identifies this flash as 32M flash. Below is debug output from 
CFI driver:

FLASH: flash detect cfi
fwc addr fc000000 cmd f0 f0 8bit x 8 bit
fwc addr fc000000 cmd ff ff 8bit x 8 bit
fwc addr fc000055 cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr fc000010 is= 0 51
fwc addr fc000555 cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr fc000010 is= 0 51
fwc addr fc000000 cmd f0 f0f0 16bit x 8 bit
fwc addr fc000000 cmd ff ffff 16bit x 8 bit
fwc addr fc0000aa cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr fc000020 is= 0051 5151
fwc addr fc000aaa cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr fc000020 is= 0051 5151
fwc addr fc000000 cmd f0 00f0 16bit x 16 bit
fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
fwc addr fc0000aa cmd 98 0098 16bit x 16 bit
is= cmd 51(Q) addr fc000020 is= 0051 0051
is= cmd 52(R) addr fc000022 is= 0052 0052
is= cmd 59(Y) addr fc000024 is= 0059 0059
device interface is 1
found port 2 chip 2 port 16 bits chip 16 bits
00 : 51 52 59 01 00 0a 01 00 00 00 00 23 36 85 95 08  QRY........#6...
10 : 09 0a 00 01 01 02 00 19 01 00 06 00 02 03 00 80  ................
20 : 00 fe 00 00 02 00 00 00 00 ff ff ff ff fc 36 a4  ..............6.
fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
fwc addr fc000000 cmd 90 0090 16bit x 16 bit
fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
fwc addr fc0000aa cmd 98 0098 16bit x 16 bit
manufacturer is 1
manufacturer id is 0x89
device id is 0x22
device id2 is 0x0
cfi version is 0x3135
size_ratio 1 port 16 bits chip 16 bits
found 2 erase regions
erase region 0: 0x00800003
erase_region_count = 4 erase_region_size = 32768
erase region 1: 0x020000fe
erase_region_count = 255 erase_region_size = 131072
fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
32 MB

What should I change in configuration/driver to get
all 64M of flash detected ?

Thanks a lot.

Felix.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] CFI driver and P33 64M flash
  2008-09-25 13:50 [U-Boot] CFI driver and P33 64M flash Felix Radensky
@ 2008-09-25 14:53 ` Stefan Roese
  2008-09-25 15:52   ` Wolfgang Denk
  2008-09-25 16:08   ` Felix Radensky
  2009-08-04 20:48 ` psdof
  1 sibling, 2 replies; 6+ messages in thread
From: Stefan Roese @ 2008-09-25 14:53 UTC (permalink / raw)
  To: u-boot

On Thursday 25 September 2008, Felix Radensky wrote:
> I'm running U-Boot 1.3.4 on custom 460EX based board,
> equipped with 64M P33 flash (similar to Intel P30). See
> http://www.numonyx.com/Documents/Datasheets/314749_P33_Discrete_DS.pdf
>
> This flash is comprised internally of two 32M flashes.

Then you have to define 2 physical chips in your U-Boot configuration.

> I have the following declarations in configuration file:
>
> #define CFG_FLASH_CFI            /* The flash is CFI compatible    */
> #define CFG_FLASH_CFI_DRIVER        /* Use common CFI driver    */
>
> #define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
> #define CFG_MAX_FLASH_BANKS    1    /* max number of memory banks        */

This will not work. Take a look at the lwmon5 configuration. It has a similar 
Intel FLASH which has two chips inside:

#define CFG_FLASH0              0xFC000000
#define CFG_FLASH1              0xF8000000
#define CFG_FLASH_BANKS_LIST    { CFG_FLASH1, CFG_FLASH0 }

#define CFG_MAX_FLASH_BANKS     2

...

You need to change the addresses for your 32MB version though.

Hope this helps.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] CFI driver and P33 64M flash
  2008-09-25 14:53 ` Stefan Roese
@ 2008-09-25 15:52   ` Wolfgang Denk
  2008-09-25 16:08   ` Felix Radensky
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2008-09-25 15:52 UTC (permalink / raw)
  To: u-boot

Dear Stefan Roese,

In message <200809251653.30832.sr@denx.de> you wrote:
>
> This will not work. Take a look at the lwmon5 configuration. It has a similar 
> Intel FLASH which has two chips inside:
> 
> #define CFG_FLASH0              0xFC000000
> #define CFG_FLASH1              0xF8000000
> #define CFG_FLASH_BANKS_LIST    { CFG_FLASH1, CFG_FLASH0 }
> 
> #define CFG_MAX_FLASH_BANKS     2
> 
> ...
> 
> You need to change the addresses for your 32MB version though.

Please note that I really dislike such static configurations which
will break as soon as the size of the flash banks changes.

Right from the begining U-Boot  was  always  designed  to  allow  for
dynamic  adjustment  to  the actual memory sizes found on the boards,
and we should just use this capability.

Assuming a 32 bit configuration, above should rather be written as:

#define CFG_FLASH0	(0 - flash_info[0].size)
#define CFG_FLASH1	(CFG_FLASH0 - flash_info[1].size)
#define CFG_FLASH_BANKS_LIST    { CFG_FLASH1, CFG_FLASH0 }
...

This may require a preliminary mapping of the  flash  banks  that  is
then  fixed  after  the  CFI driver determined the real size; see for
example how this was done for the  TQM8xx*  boards  (of  course  this
needs to be adapted for 4xx, but you get the idea).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We don't care.  We don't have to.  We're the Phone Company."

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] CFI driver and P33 64M flash
  2008-09-25 14:53 ` Stefan Roese
  2008-09-25 15:52   ` Wolfgang Denk
@ 2008-09-25 16:08   ` Felix Radensky
  1 sibling, 0 replies; 6+ messages in thread
From: Felix Radensky @ 2008-09-25 16:08 UTC (permalink / raw)
  To: u-boot

Hi, Stefan

Stefan Roese wrote:
> On Thursday 25 September 2008, Felix Radensky wrote:
>   
>> I'm running U-Boot 1.3.4 on custom 460EX based board,
>> equipped with 64M P33 flash (similar to Intel P30). See
>> http://www.numonyx.com/Documents/Datasheets/314749_P33_Discrete_DS.pdf
>>
>> This flash is comprised internally of two 32M flashes.
>>     
>
> Then you have to define 2 physical chips in your U-Boot configuration.
>
>   
>> I have the following declarations in configuration file:
>>
>> #define CFG_FLASH_CFI            /* The flash is CFI compatible    */
>> #define CFG_FLASH_CFI_DRIVER        /* Use common CFI driver    */
>>
>> #define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
>> #define CFG_MAX_FLASH_BANKS    1    /* max number of memory banks        */
>>     
>
> This will not work. Take a look at the lwmon5 configuration. It has a similar 
> Intel FLASH which has two chips inside:
>
> #define CFG_FLASH0              0xFC000000
> #define CFG_FLASH1              0xF8000000
> #define CFG_FLASH_BANKS_LIST    { CFG_FLASH1, CFG_FLASH0 }
>
> #define CFG_MAX_FLASH_BANKS     2
>
> ...
>
> You need to change the addresses for your 32MB version though.
>   
Using 2 flash banks works fine. Thanks a lot for a prompt reply.

Felix.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] CFI driver and P33 64M flash
@ 2008-09-26  7:00 yusuf khan
  0 siblings, 0 replies; 6+ messages in thread
From: yusuf khan @ 2008-09-26  7:00 UTC (permalink / raw)
  To: u-boot

>Message: 2
>Date: Thu, 25 Sep 2008 16:50:27 +0300
>From: Felix Radensky <felix@embedded-sol.com>
>Subject: [U-Boot] CFI driver and P33 64M flash
>To: u-boot at lists.denx.de
>Message-ID: <48DB9723.2060708@embedded-sol.com>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed

>Hi,

>'m running U-Boot 1.3.4 on custom 460EX based board,
>equipped with 64M P33 flash (similar to Intel P30). See
>http://www.numonyx.com/Documents/Datasheets/314749_P33_Discrete_DS.pdf<http://www.numonyx.com/Documents/Datasheets/314749_P33_Discrete_DS.pdf>

>This flash is comprised internally of two 32M flashes.
>I have the following declarations in configuration file:

>#define CFG_FLASH_CFI            /* The flash is CFI compatible    */
>#define CFG_FLASH_CFI_DRIVER        /* Use common CFI driver    */

>#define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
>#define CFG_MAX_FLASH_BANKS    1    /* max number of memory banks        */
>#define CFG_MAX_FLASH_SECT    518    /* max number of sectors on one
>chip    */

>#define CFG_FLASH_USE_BUFFER_WRITE 1    /* use buffered writes (20x
>faster)    */
>#define CFG_FLASH_PROTECTION       1    /* use hardware flash
>protection        */
>#define CFG_FLASH_EMPTY_INFO        /* print 'E' for empty sector on
>flinfo */

>U-Boot identifies this flash as 32M flash. Below is debug output from
>CFI driver:

>FLASH: flash detect cfi
>fwc addr fc000000 cmd f0 f0 8bit x 8 bit
>fwc addr fc000000 cmd ff ff 8bit x 8 bit
>fwc addr fc000055 cmd 98 98 8bit x 8 bit
>is= cmd 51(Q) addr fc000010 is= 0 51
>fwc addr fc000555 cmd 98 98 8bit x 8 bit
>is= cmd 51(Q) addr fc000010 is= 0 51
>fwc addr fc000000 cmd f0 f0f0 16bit x 8 bit
>fwc addr fc000000 cmd ff ffff 16bit x 8 bit
>fwc addr fc0000aa cmd 98 9898 16bit x 8 bit
>is= cmd 51(Q) addr fc000020 is= 0051 5151
>fwc addr fc000aaa cmd 98 9898 16bit x 8 bit
>is= cmd 51(Q) addr fc000020 is= 0051 5151
>fwc addr fc000000 cmd f0 00f0 16bit x 16 bit
>fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
>fwc addr fc0000aa cmd 98 0098 16bit x 16 bit
>is= cmd 51(Q) addr fc000020 is= 0051 0051
>is= cmd 52(R) addr fc000022 is= 0052 0052
>is= cmd 59(Y) addr fc000024 is= 0059 0059
>device interface is 1
>found port 2 chip 2 port 16 bits chip 16 bits
>00 : 51 52 59 01 00 0a 01 00 00 00 00 23 36 85 95 08  QRY........#6...
>10 : 09 0a 00 01 01 02 00 19 01 00 06 00 02 03 00 80  ................
>20 : 00 fe 00 00 02 00 00 00 00 ff ff ff ff fc 36 a4  ..............6.
>fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
>fwc addr fc000000 cmd 90 0090 16bit x 16 bit
>fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
>fwc addr fc0000aa cmd 98 0098 16bit x 16 bit
>manufacturer is 1
>manufacturer id is 0x89
>device id is 0x22
>device id2 is 0x0
>cfi version is 0x3135
>size_ratio 1 port 16 bits chip 16 bits
>found 2 erase regions
>erase region 0: 0x00800003
>erase_region_count = 4 erase_region_size = 32768
>erase region 1: 0x020000fe
>erase_region_count = 255 erase_region_size = 131072
>fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
>32 MB

>What should I change in configuration/driver to get
>all 64M of flash detected ?

>Thanks a lot.

>Felix.

Hi

Set the  CFG_MAX_FLASH_SECT  to 259 and adjust the sector size to 256K
I think it should work than.

-- 
Thanks & Regards

Yusuf A Khan
Multitech Software Systems
Koramangala,Bangalore

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] CFI driver and P33 64M flash
  2008-09-25 13:50 [U-Boot] CFI driver and P33 64M flash Felix Radensky
  2008-09-25 14:53 ` Stefan Roese
@ 2009-08-04 20:48 ` psdof
  1 sibling, 0 replies; 6+ messages in thread
From: psdof @ 2009-08-04 20:48 UTC (permalink / raw)
  To: u-boot


Hi,

I have a similar p30 intel 64M flash.When I try to initialize both banks at
0x20000000 and 0x22000000, u-boot crashes while initializing second bank at
0x22000000, i debugged and found out that u-boot couldn't sucessfully write
to second bank. But when i plug in the debugger to my board i can see and
use the second bank starting at 0x22000000.
Though if i initialize only first bank everything runs normal but i am left
with 32Mb of space.

I am going bonkers over this, please help .


Felix Radensky wrote:
> 
> Hi,
> 
> I'm running U-Boot 1.3.4 on custom 460EX based board,
> equipped with 64M P33 flash (similar to Intel P30). See
> http://www.numonyx.com/Documents/Datasheets/314749_P33_Discrete_DS.pdf
> 
> This flash is comprised internally of two 32M flashes.
> I have the following declarations in configuration file:
> 
> #define CFG_FLASH_CFI            /* The flash is CFI compatible    */
> #define CFG_FLASH_CFI_DRIVER        /* Use common CFI driver    */
> 
> #define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
> #define CFG_MAX_FLASH_BANKS    1    /* max number of memory banks       
> */
> #define CFG_MAX_FLASH_SECT    518    /* max number of sectors on one 
> chip    */
> 
> #define CFG_FLASH_USE_BUFFER_WRITE 1    /* use buffered writes (20x 
> faster)    */
> #define CFG_FLASH_PROTECTION       1    /* use hardware flash 
> protection        */
> #define CFG_FLASH_EMPTY_INFO        /* print 'E' for empty sector on 
> flinfo */
> 
> U-Boot identifies this flash as 32M flash. Below is debug output from 
> CFI driver:
> 
> FLASH: flash detect cfi
> fwc addr fc000000 cmd f0 f0 8bit x 8 bit
> fwc addr fc000000 cmd ff ff 8bit x 8 bit
> fwc addr fc000055 cmd 98 98 8bit x 8 bit
> is= cmd 51(Q) addr fc000010 is= 0 51
> fwc addr fc000555 cmd 98 98 8bit x 8 bit
> is= cmd 51(Q) addr fc000010 is= 0 51
> fwc addr fc000000 cmd f0 f0f0 16bit x 8 bit
> fwc addr fc000000 cmd ff ffff 16bit x 8 bit
> fwc addr fc0000aa cmd 98 9898 16bit x 8 bit
> is= cmd 51(Q) addr fc000020 is= 0051 5151
> fwc addr fc000aaa cmd 98 9898 16bit x 8 bit
> is= cmd 51(Q) addr fc000020 is= 0051 5151
> fwc addr fc000000 cmd f0 00f0 16bit x 16 bit
> fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
> fwc addr fc0000aa cmd 98 0098 16bit x 16 bit
> is= cmd 51(Q) addr fc000020 is= 0051 0051
> is= cmd 52(R) addr fc000022 is= 0052 0052
> is= cmd 59(Y) addr fc000024 is= 0059 0059
> device interface is 1
> found port 2 chip 2 port 16 bits chip 16 bits
> 00 : 51 52 59 01 00 0a 01 00 00 00 00 23 36 85 95 08  QRY........#6...
> 10 : 09 0a 00 01 01 02 00 19 01 00 06 00 02 03 00 80  ................
> 20 : 00 fe 00 00 02 00 00 00 00 ff ff ff ff fc 36 a4  ..............6.
> fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
> fwc addr fc000000 cmd 90 0090 16bit x 16 bit
> fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
> fwc addr fc0000aa cmd 98 0098 16bit x 16 bit
> manufacturer is 1
> manufacturer id is 0x89
> device id is 0x22
> device id2 is 0x0
> cfi version is 0x3135
> size_ratio 1 port 16 bits chip 16 bits
> found 2 erase regions
> erase region 0: 0x00800003
> erase_region_count = 4 erase_region_size = 32768
> erase region 1: 0x020000fe
> erase_region_count = 255 erase_region_size = 131072
> fwc addr fc000000 cmd ff 00ff 16bit x 16 bit
> 32 MB
> 
> What should I change in configuration/driver to get
> all 64M of flash detected ?
> 
> Thanks a lot.
> 
> Felix.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 
> 

-- 
View this message in context: http://www.nabble.com/-U-Boot--CFI-driver-and-P33-64M-flash-tp19669949p24815971.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-08-04 20:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-25 13:50 [U-Boot] CFI driver and P33 64M flash Felix Radensky
2008-09-25 14:53 ` Stefan Roese
2008-09-25 15:52   ` Wolfgang Denk
2008-09-25 16:08   ` Felix Radensky
2009-08-04 20:48 ` psdof
  -- strict thread matches above, loose matches on Subject: below --
2008-09-26  7:00 yusuf khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox