This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3351: NAND optimization on custom board

Part Number: AM3351

Hi ,

Customer designed own board with NAND attached to AM3351 and is looking to ensure the GPMC configuration is optimal for the geometry and timing of the NAND part they picked. Will appreciate your guidance 

thank you

Michael

  • Hello Michael,
    Let's first run a quick test on the customer board.
    Can we share the serial dump when running cmds @u-boot?
    => nand info
    => mtdparts
    => time nand read ${loadaddr} NAND.kernel
    Best,
    -Hong

  • U-Boot 2023.04-gd74d0993e2 (Oct 18 2023 - 17:49:46 +0000)

     

    CPU  : AM335X-GP rev 2.1

    DRAM:  128 MiB

    Core:  150 devices, 12 uclasses, devicetree: separate

    WDT:   Started wdt@44e35000 with servicing every 1000ms (60s timeout)

    NAND:  256 MiB

    Loading Environment from NAND... OK

    Loading Environment from nowhere... OK

    <ethaddr> not set. Validating first E-fuse MAC

    Net:   eth2: usb_ether

    Hit any key to stop autoboot:  0

    =>

    => nand info

     

    Device 0: nand0, sector size 128 KiB

      Page size         2048 b

      OOB size           128 b

      Erase size      131072 b

      ecc strength        16 bits

      ecc step size      512 b

      subpagesize        512 b

      options       0x4000400c

      bbt options   0x00008000

    => mtdparts

     

    device nand0 <nand.0>, # parts = 14

    #: name                size            offset          mask_flags

    0: SPL                 0x00020000      0x00000000      0

    1: SPL.backup1         0x00020000      0x00020000      0

    2: SPL.backup2         0x00020000      0x00040000      0

    3: SPL.backup3         0x00020000      0x00060000      0

    4: u-boot-spl-os       0x00040000      0x00080000      0

    5: u-boot              0x00100000      0x000c0000      0

    6: u-boot-env          0x00020000      0x001c0000      0

    7: u-boot-env.backup1  0x00020000      0x001e0000      0

    8: reserved1           0x00200000      0x00200000      0

    9: kernel_a            0x00c00000      0x00400000      0

    10: rootfs_a            0x04a00000      0x01000000      0

    11: kernel_b            0x00c00000      0x05a00000      0

    12: rootfs_b            0x04a00000      0x06600000      0

    13: userdata            0x05000000      0x0b000000      0

     

    active partition: nand0,0 - (SPL) 0x00020000 @ 0x00000000

     

    defaults:

    mtdids  : nand0=nand.0

    mtdparts: mtdparts=nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),256k(u-boot-spl-os),1m(u-boot),128k(u-boot-env),128k(u-boot-env.backup1),2m(reserved1),12m(kernel_a),74m(rootfs_a),12m(kernel_b),74m(rootfs_b),-(userdata)

    => time nand read ${loadaddr} kernel_a

     

    NAND read: device 0 offset 0x400000, size 0xc00000

    12582912 bytes read: OK

     

    time: 6.678 seconds

    =>

  • Hello Michael,
    Thanks for running the test on the customer board.
    Let's apply the attached u-boot "testing patch", and share the result from running the same cmds @u-boot.
    Best,
    -Hong

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_GPMC_2D00_NAND_2D00_register_2D00_timing_2D00_in_2D00_SPL_2D00_for_2D00_the_2D00_NAND_2D00_on_2D00_AM3.patch

  • Hi Hong, 

    Here is the new time measurement. 

     

    => nand info

     

    Device 0: nand0, sector size 128 KiB

      Page size         2048 b

      OOB size           128 b

      Erase size      131072 b

      ecc strength        16 bits

      ecc step size      512 b

      subpagesize        512 b

      options       0x4000400c

      bbt options   0x00008000

     

    => time nand read ${loadaddr} kernel_a

     

    NAND read: device 0 offset 0x400000, size 0xc00000

    12582912 bytes read: OK

     

    time: 2.577 seconds

    =>

     thanks

    Michael

  • Hello Michael,
    It looks like NAND read performance is improved x2.5.

    For your reference, I'm attaching NAND read performance test @u-boot on AM335x EVM (1GHz Part)
    - am3_9.1.0.1_gpmc_rd.log: with the current GPMC timing parameter configuration
    - am3_9.1.0.1_patch_gpmc_rd.log: with the updated GPMC timing parameter configuration
    => NAND read time is improved x4 on reading 8Mbytes @u-boot with the updated GPMC timing parameter
    1.85Mbyte/s with the current GPMC parameter timing parameter
    7.7Mbyte/s with the updated GPMC parameter timing parameter

    Best,
    -Hong

    U-Boot 2023.04-gd74d0993e2 (Oct 18 2023 - 17:49:46 +0000)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x EVM
    DRAM:  1 GiB
    Core:  156 devices, 17 uclasses, devicetree: separate
    WDT:   Started wdt@44e35000 with servicing every 1000ms (60s timeout)
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0
    Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... 
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth2: ethernet@4a100000, eth3: usb_ether
    Hit any key to stop autoboot:  2  0 
    => nand info
    
    Device 0: nand0, sector size 128 KiB
      Page size         2048 b
      OOB size            64 b
      Erase size      131072 b
      ecc strength         8 bits
      ecc step size      512 b
      subpagesize        512 b
      options       0x0000400c
      bbt options   0x00008000
      
    => mtdparts
    
    device nand0 <nand.0>, # parts = 10
     #: name		size		offset		mask_flags
     0: NAND.SPL            0x00020000	0x00000000	0
     1: NAND.SPL.backup1    0x00020000	0x00020000	0
     2: NAND.SPL.backup2    0x00020000	0x00040000	0
     3: NAND.SPL.backup3    0x00020000	0x00060000	0
     4: NAND.u-boot-spl-os  0x00040000	0x00080000	0
     5: NAND.u-boot         0x00100000	0x000c0000	0
     6: NAND.u-boot-env     0x00020000	0x001c0000	0
     7: NAND.u-boot-env.backup10x00020000	0x001e0000	0
     8: NAND.kernel         0x00800000	0x00200000	0
     9: NAND.file-system    0x0f600000	0x00a00000	0
    
    active partition: nand0,0 - (NAND.SPL) 0x00020000 @ 0x00000000
    
    defaults:
    mtdids  : nand0=nand.0
    mtdparts: mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)
    
    => md.l 0x50000060 0x7
    50000060: 00000800 001e1e00 001e1e00 16051807  ................
    50000070: 00151e1e 16000f80 00000f48           ........H...
    
    => time nand read ${loadaddr} NAND.kernel
    
    NAND read: device 0 offset 0x200000, size 0x800000
     8388608 bytes read: OK
    
    time: 4.332 seconds
    
    =>

    U-Boot 2023.04-00001-ga6b09c3a4c-dirty (Feb 07 2024 - 10:30:04 -0600)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x EVM
    DRAM:  1 GiB
    Core:  156 devices, 17 uclasses, devicetree: separate
    WDT:   Started wdt@44e35000 with servicing every 1000ms (60s timeout)
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0
    Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... 
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth2: ethernet@4a100000, eth3: usb_ether
    Hit any key to stop autoboot:  2  0 
    => nand info
    
    Device 0: nand0, sector size 128 KiB
      Page size         2048 b
      OOB size            64 b
      Erase size      131072 b
      ecc strength         8 bits
      ecc step size      512 b
      subpagesize        512 b
      options       0x0000400c
      bbt options   0x00008000
    => mtdparts
    
    device nand0 <nand.0>, # parts = 10
     #: name		size		offset		mask_flags
     0: NAND.SPL            0x00020000	0x00000000	0
     1: NAND.SPL.backup1    0x00020000	0x00020000	0
     2: NAND.SPL.backup2    0x00020000	0x00040000	0
     3: NAND.SPL.backup3    0x00020000	0x00060000	0
     4: NAND.u-boot-spl-os  0x00040000	0x00080000	0
     5: NAND.u-boot         0x00100000	0x000c0000	0
     6: NAND.u-boot-env     0x00020000	0x001c0000	0
     7: NAND.u-boot-env.backup10x00020000	0x001e0000	0
     8: NAND.kernel         0x00800000	0x00200000	0
     9: NAND.file-system    0x0f600000	0x00a00000	0
    
    active partition: nand0,0 - (NAND.SPL) 0x00020000 @ 0x00000000
    
    defaults:
    mtdids  : nand0=nand.0
    mtdparts: mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)
    => md.l 0x50000060 0x7
    50000060: 00000800 00050500 00050401 04000600  ................
    50000070: 00070909 84000000 00000f48           ........H...
    => time nand read ${loadaddr} NAND.kernel
    
    NAND read: device 0 offset 0x200000, size 0x800000
     8388608 bytes read: OK
    
    time: 1.038 seconds
    =>