From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from hugovil.com ([192.210.230.32] helo=git.hugovil.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wi4mM-0001aD-84 for linux-mtd@lists.infradead.org; Wed, 07 May 2014 16:33:10 +0000 Message-ID: <536A5FEE.9090705@hugovil.com> Date: Wed, 07 May 2014 12:31:42 -0400 From: Hugo Villeneuve MIME-Version: 1.0 To: linux-mtd@lists.infradead.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: imx6 NAND chip selects Cc: b32955@freescale.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, I am trying to connect a NAND flash device (Micron MT29F8G08) to a Wandboard Dual. Here is the pin mapping: i.MX6 NAND flash ---------------------------- NANDF_CS0 --> CE# NANDF_RB0 --> R/B# NANDF_WP_B --> WP# NANDF_CLE --> CLE NANDF_ALE --> ALE NANDF_WE --> WE# NANDF_RE --> RE# NANDF_D[0-7] --> I/O[0-7] This NAND flash has a single chip-select. I'm testing it using Linux kernel 3.15.0-rc3. In the wandboard device tree file, I have added all the above gpmi pins as GPMI pins. I am still booting from the SD card, so at this point I am only trying to detect the NAND device. Unfortunately, when the kernel boots, the GPMI driver fails to register (error -19). If I monitor the NANDF_CS0 line, I can see that it is pulsed low, but I am not seing any activity on the NANDF_WE line. However, If I monitor the NANDF_CS1 line, I can see that it is pulsed low, and during the time it is low the NANDF_WE line is also going low. I then made sure to reconfigure the unused pins NANDF_CS[1-3] as GPIOs (ALT5 function) in my device tree file. I have confirmed with kernel debug traces that the iomux register for NANDF_CS1 have the value 0x05, which means ALT5 function (GPIO). But I am still seeing the same behavior as before on the oscilloscope. So how can I configure the GPMI driver to only use NANDF_CS0 and not NANDF_CS1? And is it normal that NANDF_CS1 is still used by the GPMI driver when configured as GPIO? Hugo.