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.

Adding second NAND Flash IC to AM3703 in Linux

Other Parts Discussed in Thread: AM3703

Hi There,

I am new to Sitara Processors and a basic Linux user. I am interested in adding a second NAND Flash IC to an AM3703. The first IC, is a dual package RAM/NAND package and I am using a system on module.

Does anyone have any advice on how to make Linux aware of the second IC?

For starters, I wondered what needs to be done in uboot and in the kernel. I am using a Linux kernel version 3.0 - no device tree.

I do not need an OS on the second IC - the IC will just contain data which the Linux system will need to read (no error correction either).

Many thanks,

James

  • Hi,

    Since you are saying that you are using a SOM, the first important question is whether this module has the GPMC interface exposed?
  • Hi Biser,
    Thanks for your interest in my problem/learning.
    Yes it does.
    It has DOtoD7 (the nand flash IC I want to use is 8bit parallel bus).
    It has several of the Chip Enable lines.
    It has ALE, CLE, WE, RE, R/B. (I'm using nand flash naming, rather than the AM3703 names).
    It also has WAIT3 and WAIT0.
  • Sounds OK. I will hand this over to the software team.
  • Biser Gatchev-XID said:
    Sounds OK. I will hand this over to the software team.

    Thanks that would be great.

    I just want the ability to read raw bytes from another NAND flash memory IC. The first one, is used, by the OS filesystem.

    Thanks,

  • They will reply directly here shortly.
  • Hi James,

    You will need to mux the GPMC pins & init the nand IC in the board file. That should do it.

    The closest kernel to yours, which TI offers is from SDK6 (kernel 3.2). I am attaching the board_am335xevm.c file: 8863.board-am335xevm.c

    Search for nand to see how pinmux & IC init are done and modify your sources accordingly. You may need to change gpmc CS to match your hardware. Basically you need to adopt pinmux_config nand_pin_mux []mtd_partition am335x_nand_partitions[] (if needed for booting), gpmc_timings am335x_nand_timingsevm_nand_init(int evm_id, int profile) and add the corresponding {evm_nand_init, DEV_ON_DGHTR_BRD, (PROFILE_ALL & ~PROFILE_2 & ~PROFILE_3)} line in evm_dev_cfg gen_purp_evm_dev_cfg[] structure.  

    Similarly for u-boot initialization you need to add the pinmux settigns:   

    static struct module_pin_mux nand_pin_mux[] = {
    {OFFSET(gpmc_ad0), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD0 */
    {OFFSET(gpmc_ad1), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD1 */
    {OFFSET(gpmc_ad2), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD2 */
    {OFFSET(gpmc_ad3), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD3 */
    {OFFSET(gpmc_ad4), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD4 */
    {OFFSET(gpmc_ad5), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD5 */
    {OFFSET(gpmc_ad6), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD6 */
    {OFFSET(gpmc_ad7), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD7 */
    {OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* NAND WAIT */
    {OFFSET(gpmc_wpn), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* NAND_WPN */
    {OFFSET(gpmc_csn0), (MODE(0) | PULLUDEN)}, /* NAND_CS0 */                                                //Change the CS to match your hardware
    {OFFSET(gpmc_advn_ale), (MODE(0) | PULLUDEN)}, /* NAND_ADV_ALE */
    {OFFSET(gpmc_oen_ren), (MODE(0) | PULLUDEN)}, /* NAND_OE */
    {OFFSET(gpmc_wen), (MODE(0) | PULLUDEN)}, /* NAND_WEN */
    {OFFSET(gpmc_be0n_cle), (MODE(0) | PULLUDEN)}, /* NAND_BE_CLE */
    {-1},
    };

    And call the configure_module_pin_mux(nand_pin_mux); in board/ti/<board_name>/mux.c file. 

    Best Regards, 
    Yordan