高通添加nand
  Qgw4UHkx7saV 2023年11月02日 66 0

7 NAND

7.1 Add MCP (NAND) support on MDM9x07 platform

If NAND part is ONFI-compliant, it is automatically detected during ONFI probe. There is

no need to add this part to the code.

Make the following changes to add the non-ONFI NAND part:

Add NAND flash part in "supported_nand_devices[]" in

boot_images/core/storage/flash/src/dal/flash_nand_config.c

Add supported_nand_devices[]" in

modem_proc/core/storage/flash/src/dal/flash_nand_config.c

Add supported_flash[] in bootable/bootloader/lk/platform/msm_shared/qpic_nand.c

Add manufacture id define in Apps_proc\include\linux\mtd\nand.h

Add in nand_flash_ids[] in the file Apps_proc\drivers\mtd\nand\nand_ids.c

Add in nand_manuf_ids[] in the file Apps_proc\drivers\mtd\nand\nand_ids.c if the

memory vendor is not there in list.

7.2 ECC length supported on MDM9x07

MDM9x07 can support 4-bit ECC and 8-bit ECC NAND parts. BCH algorithm is used for

both 4-bit and 8-bit ECC.

7.3 Required application processor build changes for a 2k

page NAND part

The application processor build requires the following changes for a 2000-page NAND

part:

Set the PAGE_SIZE to 2048 in oe-core/meta-msm/conf/machine/mdm9607.conf file

Change MKUBIFS_ARGS and UBINIZE_ARGS to specify 2048 for -m and -s

options.

Example changes to support 2 KB-page boot and system UBI image support:

File – apps_proc/oe-core/meta-msm/conf/machine/mdm9607.conf

For the kernel image:

PAGE_SIZE = '2048'

For a system/usr UBI image:

#UBINIZE Args

UBINIZE_ARGS = "-m 2048 -p 128KiB -s 2048"

#MKUBIFS Args

MKUBIFS_ARGS = "-m 2048 -e 126976 -c 567 -F"

Change MKUBIFS_ARGS to specify 2048 for the -m option in the following file:

File – apps_proc/oe-core/meta-msm/recipes/images/mdm9607-recovery-image.inc

For example:

MKUBIFS_ARGS = "-m 2048 -e 126976 -c 74 -F"

NOTE:

 -c is number of blocks in the system partition. The value depends on the rest of

the partition size, see the partition.xml file in the build for the partition size.

 The changes are made in file poky\meta-qti-

bsp\conf\machine\include\mdm9607.inc instead of apps_proc/oe-core/meta-

msm/conf/machine/mdm9607.conf from LE.2.0 PL onwards. There is no change

required for 2K page as PAGE_SIZE_2K and UBINIZE_ARGS_2K are already

defined in mdm9607.inc file.

7.4 Use SCRUB partition

SCRUB partition is used to Flash Scrub feature.

The Flash Scrub feature is intended to enable the NAND Flash and the data stored in

the NAND Flash in MDM targets to survive 15 years of use. This feature is intended only

for MDM customers who have products with a 15 year life expectancy and are using

NAND Flash with extra space for Flash Scrub.

Flash Scrub Feature (80-NK633-1) provides more information on how Flash Scrub

works, what are Flash Scrub security risks, how to enable Flash Scrub, Flash Scrub

configurable items, runtime APIs and QMI commands as well as Flash Scrub debug tips

and limitations.

7.5 Detect the bad block information of NAND flash

Detect the bad block information of NAND flash on MDM9x07 as follows:

1. On application processor Cortex A7 TRACE32 window, change directory to the boot

build directory:

<Boot Build>\boot_images\core\storage\flash\tools\src\nand

2. Perform either of the following:

Run “do nand_diagnose.cmm” and select option 6 – Block Utilities

 Run “do nand_block_util.cmm

7.6 Configure the NAND flash partition

The file common\build\partition_nand.xml specifies all the partitions. You can modify this

file to add or delete a partition. KB Solution 00026274 provides partition specification in

this XML file.

Each partition is described with following fields.

 <name> field specify the name of the partition.

 <size_kb> is the size of the partition in KB.

 <pad_kb> is the extra space to accommodate bad blocks in this partition.

 <which_flash> is the device_id of that partition. Multiple clients can access the same

partition and each client gets separate device_id for this partition. These IDs are

given dynamically and are "0" in XML.

Each partition has four attribute fields, and each attribute field is a byte size value

(0 to 0xFF):

 Type of flash. Must be set to 0xFF.

 Type of ECC to be used for the partition.

 Use driver default – 0xFF

 ECC on main only – 0x0

 ECC on main and spare – 0x1

 Image upgrade through QPST

 Set to 0 – If the partition is an image partition and the image must be downloaded

via QPST.

 Default to 0xFF – Required if QPST is not used for image upgrades.

7.7 NAND flash driver page layouts on MDM9x07

See NAND HAL Flash Driver Page Layouts on MDM9x35, MDM9x45, and MDM9x55

Chipsets (80-NH740-71), the flash page layout is the same for M


【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

上一篇: ddr 下一篇: 粮油生产加工MES系统源码
  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  lh6O4DgR0ZQ8   2023年11月22日   26   0   0 Memory字段sed
Qgw4UHkx7saV
作者其他文章 更多

2023-11-02

2023-11-02

ddr

2023-11-02