Changes between Version 35 and Version 36 of linux/ubi


Ignore:
Timestamp:
10/28/2021 05:24:23 PM (3 years ago)
Author:
Tim Harvey
Comment:

fixed mistakes in cypress 2048MiB flash geometry explanation and added Micron 256MiB flash geometry explanation

Legend:

Unmodified
Added
Removed
Modified
  • linux/ubi

    v35 v36  
    2020The geometry data can be found in the datasheet for the specific flash device used. Gateworks uses a variety of NAND Flash devices that fall within two different unique geometries we refer to as 'normal' and 'large' which references the erase block size:
    2121||= NAND Part =||= NAND Size =||= Page Size (Bytes) =||= Block Size =||= Logical Erase Block Size =||= Blocks =||= READ_ID Bytes =||= Gateworks Geometry Name =||
    22 || Cypress S34ML16G202 || 2GiB || 2048 || 128KiB || 124KiB || 16384 || 0x01 0xd5 0xd2 0x95 || normal ||
     22|| Cypress S34ML16G2 || 2GiB || 2048 || 128KiB || 124KiB || 16384 || 0x01 0xd5 0xd2 0x95 || normal ||
    2323|| Micron MT29F2G08  || 256MiB || 2048 || 128KiB || 124KiB || 2048 || 0x2c 0x90 0x95 0x06 || normal ||
    2424|| Micron MT29F16G08 || 2GiB || 4096 || 256KiB || 248KiB || 8192 || 0x2c 0xd5 0xd1 0xa6 || large ||
     
    2727
    2828The geometry can also be determined at runtime in U-Boot using {{{nand info}}} and Linux using {{{sysfs}}}:
    29  * Cypress S34ML16G202 2GiB FLASH:
     29 * Cypress S34ML16G202 2048MiB FLASH:
     30  - U-Boot:
     31{{{#!bash
     32Ventana > nand info
     33
     34Device 0: nand0, sector size 128 KiB
     35  Page size       2048 b
     36  OOB size         128 b
     37  Erase size    131072 b
     38  subpagesize     2048 b
     39  options     0x40000200
     40  bbt options 0x    8000
     41}}}
     42   * U-Boot above shows a 2048 byte page size and a 128KiB erase block size which dictates a 124KiB logical erase block size
     43  - Linux (once device is attached via 'ubiattach /dev/ubi_ctrl -m 2' or via 'root=ubi  ubi=2' kernel cmdline params:
     44{{{#!bash
     45# cat /sys/devices/virtual/ubi/ubi0/min_io_size
     462048
     47# cat /sys/devices/virtual/ubi/ubi0/eraseblock_size
     48126976
     49# cat /sys/devices/virtual/ubi/ubi0/total_eraseblocks
     5016248
     51}}}
     52   * above shows a 2048 byte page size, a 124KiB logical erase block size (which dictates a 128KiB physical erase block size) and a max of 16248 total erase blocks available in this ubi for a total usable space of 16248*124KiB still available for use by ubi volumes
     53 * Micron MT29F16G08 2048MiB FLASH:
    3054  - U-Boot:
    3155{{{#!bash
     
    4064  bbt options 0x       0
    4165}}}
    42    * U-Boot above shows a 4096 byte page size and a 256KiB erase block size which dictates a 248KiB logical erase block size
     66   * Note the 4096 byte page size and 256KiB erase block size which dictates a 248KiB logical erase block size
    4367  - Linux (once device is attached via 'ubiattach /dev/ubi_ctrl -m 2' or via 'root=ubi  ubi=2' kernel cmdline params:
    4468{{{#!bash
     
    50748124
    5175}}}
    52    * above shows a 4096 byte page size, a 248KiB logical erase block size (which dictates a 256KiB physical erase block size) and a max of 8124 total erase blocks available in this ubi for a total usable space of 8124*248KiB still available for use by ubi volumes
     76   * above shows a 4096 byte page size, a 248KiB logical erase block size (which dictates a 256KiB physical erase block size) and a max of 8124 total erase blocks available in this ubi for a total usable space of 253952*248KiB still available for use by ubi volumes
    5377 * Micron MT29F2G08 256MiB FLASH:
    5478  - U-Boot:
     
    5882Device 0: nand0, sector size 128 KiB
    5983  Page size       2048 b
    60   OOB size         128 b
     84  OOB size          64 b
    6185  Erase size    131072 b
    6286  subpagesize     2048 b
     
    7296126976
    7397# cat /sys/devices/virtual/ubi/ubi0/total_eraseblocks
    74 16248
     981912
    7599}}}
    76100   * above shows a 2048 byte page size, a 124KiB logical erase block size (which dictates a 128KiB physical erase block size) and a max of 126976 total erase blocks available in this ubi for a total usable space of 126976*124KiB still available for use by ubi volumes