Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - GPMI driver for i.mx6s: (6 Items)
   
GPMI driver for i.mx6s  
Hello!

 

I am trying to run QNX6.5 etfs driver for parallel NAND memory on my i.MX6SL based board. I ported BSP for Freescale i.
MX6Q Sabre Lite Board (http://community.qnx.com/sf/wiki/do/viewPage/projects.bsp/wiki/FreescaleImx6QSabreLite) and it 
successfully started on my board. After that I took driver from BSP for NXP MCIMX7 Sabre Board (http://community.qnx.com
/sf/wiki/do/viewPage/projects.bsp/wiki/NxpMcimx7sabre) and ported it for my platform. I added driver initialization in  
QNX startup (added “fs-etfs-imx-micron –e” to .script section in build-file). So drivers stops execution while 
initialization gpmi module on waiting IMX_APBH_IRQ interrupt (45 - Logical OR of APBH DMA channels 0-3 completion and 
error interrupts). What am I doing wrong?

 

So gpmi initialization sequence is follows.

 

1) Clock enable in DCD section:

 

…
DCD_ENTRY(1, 0x020c4068, 0xffffffff)
DCD_ENTRY(2, 0x020c406c, 0xffffffff)
DCD_ENTRY(3, 0x020c4070, 0xffffffff)
DCD_ENTRY(4, 0x020c4074, 0xffffffff)
DCD_ENTRY(5, 0x020c4078, 0xffffffff)
DCD_ENTRY(6, 0x020c407c, 0xffffffff)
DCD_ENTRY(7, 0x020c4080, 0xffffffff)
…

 

 

2) Setup pin muxing in startup:

 

…

            out32(MX6X_CCM_BASE + MX6X_CCM_CCGR4, 0xFFFFF300 );
 
            pinmux_set_swmux(SWMUX_NANDF_CLE, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_CLE, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_ALE, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_ALE, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_WP_B, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_WP_B, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_RB0, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_RB0, PAD_CFG_1);
 
            pinmux_set_swmux(SWMUX_NANDF_CS0, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_CS0, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_CS1, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_CS1, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_CS2, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_CS2, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_CS3, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_CS3, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_SD4_CMD, MUX_CTL_MUX_MODE_ALT1);
            pinmux_set_padcfg(SWPAD_SD4_CMD, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_SD4_CLK, MUX_CTL_MUX_MODE_ALT1);
            pinmux_set_padcfg(SWPAD_SD4_CLK, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_D0, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_D0, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_D1, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_D1, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_D2, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_D2, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_D3, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_D3, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_D4, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_D4, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_D5, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_D5, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_D6, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_D6, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_NANDF_D7, MUX_CTL_MUX_MODE_ALT0);
            pinmux_set_padcfg(SWPAD_NANDF_D7, PAD_CFG_0);
 
            pinmux_set_swmux(SWMUX_SD4_DAT0, MUX_CTL_MUX_MODE_ALT2);
            pinmux_set_padcfg(SWPAD_SD4_DAT0, PAD_CFG_2);

 

…

 

3) GPMI initialization in driver. Briefly:

...
// APBH, BCH and GPMI init
if (nand_init(cio) != 0) {
        dev->log(_SLOG_CRITICAL, "nand_init failed : %s", strerror(errno));
        // We...
View Full Message
Re: GPMI driver for i.mx6s  
Hello Vasilij,
did you verify that the GPMI is compatible between i.MX6-Solo and i.MX7?

We have created a NAND flash driver for i.MX6dq based on Freescale's i.MX6 Platform SDK. It's a slightly different 
approach, though. I also saw that some other i.MX6 BSP did contain a NAND flash driver. It obviously comes from 
Freescale and also incorporates some modified sources from the aforementioned Platform SDK. Maybe that helps.

Regards,
Albrecht
Re: GPMI driver for i.mx6s  
Hello, Albrecht! Thank you for your response!

Yes, I verifyed compatibility for GPMI, BCH and APBH for imx6s and imx7. There is only difference in base address. All 
other registers are the same. And there is differs interrupt numbpers for BCH and APBH DMA. 

Thank you for pointing about NAND flash driver Freescale's i.MX6 Platform SDK, I will take a look. 

In which BSP for imx6 did you see NAND driver? I saw driver only for mtd-flash, but it is not the same as driver for 
parallel NAND flash.

Re: GPMI driver for i.mx6s  
By the way, could you show haw did you bind apbh dma interrupt with qnx kernel?
Re: GPMI driver for i.mx6s  
Hello, Albrecht! Thank you for your response!

Yes, I verifyed compatibility for GPMI, BCH and APBH for imx6s and imx7. There is only difference in base address. All 
other registers are the same. And there is differs interrupt numbpers for BCH and APBH DMA. 

Thank you for pointing about NAND flash driver Freescale's i.MX6 Platform SDK, I will take a look. 

In which BSP for imx6 did you see NAND driver? I saw driver only for mtd-flash, but it is not the same as driver for 
parallel NAND flash.

Re: GPMI driver for i.mx6s  
Hello, Albrecht! Thank you for your response!

Yes, I verifyed compatibility for GPMI, BCH and APBH for imx6s and imx7. There is only difference in base address. All 
other registers are the same. And there is differs interrupt numbpers for BCH and APBH DMA. 

Thank you for pointing about NAND flash driver Freescale's i.MX6 Platform SDK, I will take a look. 

In which BSP for imx6 did you see NAND driver? I saw driver only for mtd-flash, but it is not the same as driver for 
parallel NAND flash.