GD flash for imx6ull

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GD flash for imx6ull

1,855 Views
frank_chiang
Contributor II

I would like use GD flash(GD25q32CSIGR) on IMX6ULL(MCIMX6Y2CVM08AB) and base on yocto-L4.1.15_2.0.0.

Because IMX6ULL does not support GD flash now. Does anyone have an idea how to do it? 

Labels (2)
0 Kudos
7 Replies

1,448 Views
frank_chiang
Contributor II

hi igor

Now I downloaded the new yocto version (yocto-L4.1.15_2.1.0.)

Then I use bellow steps to modify some code in mfgtool floders including mfgtool-linux-imx and u-boot-imx-mfgtool.

My target is to program image to  GD flash(GD25q32CSIGR) by modified mfgtool tool.

  1. $repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-4.1-krogoth -m imx-4.1.15-2.1.0.xml

  2. $ repo sync
  3. $ bitbake fsl-image-mfgtool-initramfs
  4. modify spi.c at tmp/work/imx6ull14x14evklevk-poky-linux-gnueabi/mfgtool-linux-imx/4.1.15-r0/git/drivers/mtd/spi-nor

    /* GigaDevice */
         
       { "gd25q32", INFO(0xc84016, 0, 64 * 1024,  64, SECT_4K) },

  5. modify sf_params.c in tmp/work/imx6ull14x14evk-poky-linux-gnueabi/u-boot-imx-mfgtool/2016.03-r0/git/drivers/mtd/spi

    #ifdef CONFIG_SPI_FLASH_GIGADEVICE      /* GIGADEVICE */
            {"GD25Q32",       0xc84016, 0x0,       64 * 1024,   64, RD_NORM,                  SECT_4K},
     

  6. modify mx6ullevk.h in tmp/work/imx6ull14x14evk-poky-linux-gnueabi/u-boot-imx-mfgtool/2016.03-r0/git/include/configs
  7. #define CONFIG_CMD_SF
    #define CONFIG_SPI_FLASH
    #define CONFIG_SPI_FLASH_BAR
    #define CONFIG_SF_DEFAULT_BUS           0
    #define CONFIG_SF_DEFAULT_CS            0
    #define CONFIG_SF_DEFAULT_SPEED 40000000
    #define CONFIG_SF_DEFAULT_MODE          SPI_MODE_0
    #define CONFIG_SPI_FLASH_GIGADEVICE 
  8. bitbake -c compile -f mfgtool-linux-imx

  9. bitbake -c compile -f u-boot-imx-mfgtool
  10. bitbake fsl-image-mfgtool-initramfs

  11. copy below files and rename into mfgtools\Profiles\Linux\OS Firmware\firmware

    u-boot-mfgtool-2016.03-r0.imx -> u-boot-imx6ull14x14evk_qspi1.imx

    zImage

    zImage-mfgtool--4.1.15-r0-imx6ull-14x14-evk-20180626023413.dtb -> zImage-imx6ull-14x14-evk.dtb

    zImage-mfgtool--4.1.15-r0-imx6ull-14x14-evk-btwifi-20180626023413.dtb -> zImage-imx6ull-14x14-evk-btwifi.dtb

    zImage-mfgtool--4.1.15-r0-imx6ull-14x14-evk-emmc-20180626023413.dtb -> zImage-imx6ull-14x14-evk-emmc.dtb

    zImage-mfgtool--4.1.15-r0-imx6ull-14x14-evk-gpmi-weim-20180626023413.dtb -> zImage-imx6ull-14x14-evk-gpmi-weim.dtb

    zImage-mfgtool--4.1.15-r0-imx6ull-14x14-evk-usb-certi-20180626023413.dtb -> zImage-imx6ull-14x14-evk-usb-certi.dtb 

  12. follow 5.2 Using Manufacturing Tool (MFGTool)  in Getting Started with MCUXpresso SDK for i.MX 6UltraLite Derivatives.pdf to program image to GD flash.
  13. restart board.

But it is doesn't work. Attached is log file.

Do you have any idea how to solve this issue and make image programmed into GD flash? 

0 Kudos

1,448 Views
igorpadykov
NXP Employee
NXP Employee

Hi frank

in attached log there are no any error messages, is this flash working fine in uboot ?

Best regards
igor

0 Kudos

1,448 Views
frank_chiang
Contributor II

hi igor

How can I check flash is working fine on u-boot?

After freertos hello world project was compiled, I just used mfgtool to program bin file to GD flash.

It didn't output anything from uart.

If I program bin file on micron and use original mfgtool , it can output "hello world" from uart.

Attached, GD0626.txt, is created by mfgtool during program bin file.

0 Kudos

1,448 Views
igorpadykov
NXP Employee
NXP Employee

>How can I check flash is working fine on u-boot?

boot uboot from sd/emmc or other media. Check spi-nor with

uboot commads:

sf probe

sf erase

sf write

check uboot documentation for spi-nor commands.

~igor

0 Kudos

1,448 Views
igorpadykov
NXP Employee
NXP Employee

Hi frank

chip specific parameters should be added to

uboot/drivers/mtd/spi/sf_params.c
linux/drivers/mtd/devices/

please also check below patch and attached Porting Guide

mtd: chips: Add support for GigaDevice GD25Q32/GD25Q64 SPI Flash in m25p80.c - Patchwork 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,448 Views
frank_chiang
Contributor II

hi, Igorpadykov

Because of our image created by freertos project like "hello world", and we would like to use mfgtool to program into GD flash(GD25q32CSIGR).

Following is my step to recompile mfgtool.

  1.  Using below command to get mfgtool package

       bitbake fsl-image-mfgtool-initramfs

  2. Modify  spi-nor.c located in  tmp/work/imx6ull14x14evklevk-poky-linux-gnueabi/mfgtool-linux-imx/4.1.15-r0/git/drivers/mtd/spi-no as below/* GigaDevice */
            { "gd25q32", INFO(0xc84016, 0, 64 * 1024,  64, SECT_4K) },
  3. Modify sf_params.c located in tmp/work/imx6ull14x14evk-poky-linux-gnueabi/u-boot-imx-mfgtool/2016.03-r0/git/drivers/mtd/spi as below.

        #ifdef CONFIG_SPI_FLASH_GIGADEVICE      /* GIGADEVICE */
        {"GD25Q32",       0xc84016, 0x0,       64 * 1024,   64, RD_NORM,                  SECT_4K}

  1. Modify mx6ullevk.h located in tmp/work/imx6ull14x14evk-poky-linux-gnueabi/u-boot-imx-mfgtool/2016.03-r0/git/include/configs as below.                                                                    #define CONFIG_SPI_FLASH_STMICRO  ==> #define CONFIG_SPI_FLASH_GIGADEVICE
  2. $ bitbake -c compile -f linux-mfgtool

  3. $ bitbake fsl-image-mfgtool-initramfs

After finishing all steps, it doesn't create any new deploy files in deploy-u-boot-imx-mfgtool and deploy-meftool-linux.

Did I do something wrong?  So it can't create new deploy files.          

I try to update these deploy files to mfgtool folder as below to support program image into  GD flash(GD25q32CSIGR).

mfgtools_sdcard\Profiles\Linux\OS Firmware\firmware 

0 Kudos

1,448 Views
igorpadykov
NXP Employee
NXP Employee

Hi frank

basic steps for bulding mfg tools firmware are described in Yocto Guide

sect.6.2 Manufacturing Tool, MFGTool included in Linux documentation on

https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-6ser...

linux-imx - i.MX Linux kernel 

Best regards
igor

0 Kudos