NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
TI811X PSP NOR Driver User Guide
TI811X PSP NOR Driver User Guide
Linux PSP
NOTE
*The TI811x base board does not have NOR flash, it is present only in the application specific daughter card. Hence for validating NOR support you need to have respective application daughter card.
*The TI811x base board does not have NOR flash, it is present only in the application specific daughter card. Hence for validating NOR support you need to have respective application daughter card.
- Refer "EVM Switch Settings" section in u-boot user guide for the base_board and daughter card (if any) switching settings.
Linux NOR flash support[edit]
- As the same GPMC chip select (CS0) is used for NAND and NOR flash in DM8168 and DM8148 EVM, their support is mutually exclusive. Hence, disable NAND support in kernel configuration to get NOR working.. During 'make menuconfig' NAND could be disabled by deselecting "NAND Device Support" from the following location
Device Drivers ---> <*> Memory Technology Device (MTD) support ---> < > NAND Device Support --->
- NOR support is not added by default to EVM defconfig. Hence please add NOR support from the following location during make menuconfig. De-selecting the menu item should disable NOR support and selecting it should enable NOR support.
Device Drivers ---> <*> Memory Technology Device (MTD) support ---> <*> MTD concatenating support [*] MTD partitioning support [*] Command line partition table parsing RAM/ROM/Flash chip drivers ---> <*> Detect flash chips by Common Flash Interface (CFI) probe <*> Detect non-CFI AMD/JEDEC-compatible flash chips <*> Support for AMD/Fujitsu/Spansion flash chips Mapping drivers for chip access ---> <*> Flash device in physical memory map
Linux NOR Loadable Module support[edit]
- Skip this section if NOR support is built with the kernel
- To build NOR as module select [M] while enabling (as shown below)
Device Drivers ---> <*> Memory Technology Device (MTD) support ---> <*> MTD concatenating support [*] MTD partitioning support [*] Command line partition table parsing RAM/ROM/Flash chip drivers ---> <M> Detect flash chips by Common Flash Interface (CFI) probe <M> Detect non-CFI AMD/JEDEC-compatible flash chips <M> Support for AMD/Fujitsu/Spansion flash chips Mapping drivers for chip access ---> <M> Flash device in physical memory map
- Do 'make modules' from Linux shell prompt and check if following .ko modules are generated
drivers/mtd/chips/cfi_cmdset_0002.ko drivers/mtd/chips/cfi_probe.ko drivers/mtd/chips/cfi_util.ko drivers/mtd/chips/gen_probe.ko drivers/mtd/chips/jedec_probe.ko drivers/mtd/maps/physmap.ko
- Copy all .ko file to the target file system.
- Load these modules using 'insmod <module_name.ko>' from the target's shell prompt
Module insertion Sequence
insmod cfi_util.ko insmod cfi_cmdset_0002.ko insmod gen_probe.ko insmod cfi_probe.ko insmod jedec_probe.ko insmod physmap.ko
Module removal Sequence
rmmod physmap.ko rmmod jedec_probe.ko rmmod cfi_probe.ko rmmod gen_probe.ko rmmod cfi_cmdset_0002.ko rmmod cfi_util.ko
NOR Device Information[edit]
- To modify partition layout on NOR flash following structure has to be modified in arch/arm/mach-omap2/board-ti811xevm.c
static struct mtd_partition ti811x_evm_norflash_partitions[] = { /* bootloader (U-Boot, etc) in first 5 sectors */ { .name = "bootloader", .offset = 0, .size = 2 * SZ_128K, .mask_flags = MTD_WRITEABLE, /* force read-only */ }, /* bootloader params in the next 1 sectors */ { .name = "params", .offset = MTDPART_OFS_APPEND, .size = SZ_128K, .mask_flags = 0, }, /* kernel */ { .name = "kernel", .offset = MTDPART_OFS_APPEND, .size = 2 * SZ_2M, .mask_flags = 0 }, /* file system */ { .name = "filesystem", .offset = MTDPART_OFS_APPEND, .size = 25 * SZ_2M, .mask_flags = 0 } /* file system */ { .name = "reserved", .offset = MTDPART_OFS_APPEND, .size = MTDPART_SIZ_FULL, .mask_flags = 0 } };
- board_nor_init(): The mach-omap2 folder provides this API to register a NOR device. It is available in file arch/arm/mach-omap2/board-flash.c
- This API takes care of reserving a memory region in GPMC and also registering NOR platform device.
- The board file arch/arm/mach-omap2/board-ti811xevm.c should register a NOR device by passing partition table to this API (as shown below).
board_nor_init(ti811x_evm_norflash_partitions, ARRAY_SIZE(ti811x_evm_norflash_partitions), 0);