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.

TI81XX PSP NOR Driver User Guide

From Texas Instruments Wiki
Jump to: navigation, search
TIBanner.png
TI81XX PSP NOR Driver User Guide
Linux PSP
IMPORTANT

TI81XX refers to TI816X, TI814X and TI813X.
NOTE

*The TI8168 and TI8148 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[[1]] 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 TI8168 and TI8148 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]

NOTE

* This section uses TI8168 for reference, but same information is also applicable for TI8148 and TI813X.
  • For TI8148, the partition layout is defined in the file arch/arm/mach-omap2/board-ti8148evm.c
  • For TI813X, the partition layout is defined in the file arch/arm/mach-omap2/board-dm385evm.c
  • Also, the partition structure variable would be ti814x_evm_norflash_partitions instead of ti816x_evm_norflash_partitions in case of TI8148
  • To modify partition layout on NOR flash following structure has to be modified in arch/arm/mach-omap2/board-ti8168evm.c
static struct mtd_partition ti816x_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-ti8168evm.c should register a NOR device by passing partition table to this API (as shown below).
board_nor_init(ti816x_evm_norflash_partitions,
                ARRAY_SIZE(ti816x_evm_norflash_partitions), 0);
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TI81XX PSP NOR Driver User Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TI81XX PSP NOR Driver User Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article TI81XX PSP NOR Driver User Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article TI81XX PSP NOR Driver User Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article TI81XX PSP NOR Driver User Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TI81XX PSP NOR Driver User Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TI81XX PSP NOR Driver User Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article TI81XX PSP NOR Driver User Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article TI81XX PSP NOR Driver User Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity