Skip to contentSkip to conversation

i.MX31: Add NAND support and new PDK board.

PATCH Superseded Magnus Lilja 5 participants 29 messages Aug 29, 2008 – Feb 10, 2009

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

v3 cover i.MX31: Add NAND support and new PDK board.

Hi again

This series of patches adds support for the NAND flash controller in the i.MX31 device and also introduces the Freescale i.MX31 PDK board.

Changes since v2:

- Added doc/README.mx31 (contains MC13783 SPI config documentation)
- Split the PDK patch into two patches, the first introduces the board without NAND support, the second adds NAND support.
- Re-ordered the series so the NAND patches are placed last
- mx31_nand.c has been updated w.r.t. coding style.
- There are still issues with the NAND driver (i.e. not all comments from Scott Wood have been taken care of yet). Therefore I suspect that the NAND driver is not ready for inclusion yet, the other patches should be OK.

The patches are based on the current main U-boot git repo (as of Friday morning).

Changes since v1:

- Moved PDK board to boards/freescale/mx31pdk
- Moved mxc_nd.c to driver/mtd/nand/mx31_nand.c
- Moved contents of mxc_nd.h to mx31-regs.h
- Cleaned up the mx31pdk.h config file after comments from this list
- CONFIG_CMD_IMLS is still #undef'd but a comment is added in the config file about that.
- A new patch has been inserted into the series, it makes the MC13783 SPI bus and chip select configurable.

The patches are based on the current main U-boot git repo.

Original intro for this series of patches:

At the moment, the patch series does not add support for booting from NAND. This means that the PDK board support assumes that some other entity configures the SDRAM and loads U-boot into RAM (e.g. another bootloader or a JTAG debugger). Support for NAND boot is in progress and will be submitted later.

The NAND driver is based on Freescale's Linux driver from their BSP. I've cleaned it up a bit and made the (minor) modifications necessary for U-boot. Perhaps the driver should be cleaned up even more, there are some CONFIG_MTD_MXC_* leftovers in the driver.

I have tested the driver on the Litekit (small page NAND) and on the PDK (large page NAND) by having the U-boot environment placed in NAND.

Regards, Magnus

#1 lore raw

PATCH v3 1/6 i.MX31: Add reset_timer() and modify get_timer_masked().

This patch adds the reset_timer() function (needed by nand_base.c) and modifies the get_timer_masked() to work in the same way as the omap24xx function.

---
 cpu/arm1136/mx31/interrupts.c |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)
cpu/arm1136/mx31/interrupts.c +20 -4
index 21b77a5..6e08c71 100644
@@ -38,6 +38,9 @@
 #define GPTCR_CLKSOURCE_32 (4<<6)  /* Clock source */
 #define GPTCR_TEN       (1)     /* Timer enable */
 
+static ulong timestamp;
+static ulong lastinc;
+
 /* nothing really to do with interrupts, just starts up a counter. */
 int interrupt_init (void)
 {
@@ -54,14 +57,27 @@ int interrupt_init (void)
 
 void reset_timer_masked (void)
 {
-	GPTCR = 0;
-	GPTCR = GPTCR_CLKSOURCE_32 | GPTCR_TEN; /* Freerun Mode, PERCLK1 input */
+	/* reset time */
+	lastinc = GPTCNT; /* capture current incrementer value time */
+	timestamp = 0; /* start "advancing" time stamp from 0 */
+}
+
+void reset_timer(void)
+{
+	reset_timer_masked();
 }
 
 ulong get_timer_masked (void)
 {
-	ulong val = GPTCNT;
-	return val;
+	ulong now = GPTCNT; /* current tick value */
+
+	if (now >= lastinc)	/* normal mode (non roll) */
+		/* move stamp forward with absolut diff ticks */
+		timestamp += (now - lastinc);
+	else			/* we have rollover of incrementer */
+		timestamp += (0xFFFFFFFF - lastinc) + now;
+	lastinc = now;
+	return timestamp;
 }
 
 ulong get_timer (ulong base)
Signature · 1 line
1.5.2.4
#2 lore raw

PATCH v3 2/6 i.MX31: Make the SPI bus and chip select configurable for MC13783

The i.MX31 has three SPI buses and each bus has several chip selects and the MC13783 chip can be connected to any of these. The current RTC driver for MC13783 is hardcoded for CSPI2/SS2.

This patch makes make MC13783 SPI bus and chip select configurable via CONFIG_MC13783_SPI_BUS and CONFIG_MC13783_SPI_CS.

---
 doc/README.mx31                 |   19 +++++++++++++++++++
 drivers/rtc/mc13783-rtc.c       |    6 ++++--
 include/configs/imx31_litekit.h |    3 +++
 include/configs/mx31ads.h       |    3 +++
 4 files changed, 29 insertions(+), 2 deletions(-)
doc/README.mx31 new file +19 -0
new file mode 100644
index 0000000..f912b66
@@ -0,0 +1,19 @@
+
+U-Boot for Freescale i.MX31
+
+This file contains information for the port of U-Boot to the Freescale
+i.MX31 SoC.
+
+1. CONFIGURATION OPTIONS/SETTINGS
+---------------------------------
+
+1.1 Configuration of MC13783 SPI bus
+------------------------------------
+The power management companion chip MC13783 is connected to the
+i.MX31 via an SPI bus. Use the following configuration options
+to setup the bus and chip select used for a particular board.
+
+CONFIG_MC13783_SPI_BUS	-- defines the SPI bus the MC13783 is connected to.
+			   Note that 0 is CSPI1, 1 is CSPI2 and 2 is CSPI3.
+CONFIG_MC13783_SPI_CS	-- define the chip select the MC13783 s connected to.
+
drivers/rtc/mc13783-rtc.c +4 -2
index b6e1501..38ef3aa 100644
@@ -34,7 +34,8 @@ int rtc_get(struct rtc_time *rtc)
 
 	if (!slave) {
 		/* FIXME: Verify the max SCK rate */
-		slave = spi_setup_slave(1, 0, 1000000,
+		slave = spi_setup_slave(CONFIG_MC13783_SPI_BUS,
+				CONFIG_MC13783_SPI_CS, 1000000,
 				SPI_MODE_2 | SPI_CS_HIGH);
 		if (!slave)
 			return -1;
@@ -83,7 +84,8 @@ void rtc_set(struct rtc_time *rtc)
 
 	if (!slave) {
 		/* FIXME: Verify the max SCK rate */
-		slave = spi_setup_slave(1, 0, 1000000,
+		slave = spi_setup_slave(CONFIG_MC13783_SPI_BUS,
+				CONFIG_MC13783_SPI_CS, 1000000,
 				SPI_MODE_2 | SPI_CS_HIGH);
 		if (!slave)
 			return;
include/configs/imx31_litekit.h +3 -0
index c476333..62a03fa 100644
@@ -69,6 +69,9 @@
 #define CONFIG_DEFAULT_SPI_MODE	(SPI_MODE_2 | SPI_CS_HIGH)
 
 #define CONFIG_RTC_MC13783	1
+/* MC13783 connected to CSPI2 and SS0 */
+#define CONFIG_MC13783_SPI_BUS	1
+#define CONFIG_MC13783_SPI_CS	0
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
include/configs/mx31ads.h +3 -0
index 9ede764..b9ad3e4 100644
@@ -66,6 +66,9 @@
 #define CONFIG_DEFAULT_SPI_MODE	(SPI_MODE_2 | SPI_CS_HIGH)
 
 #define CONFIG_RTC_MC13783	1
+/* MC13783 connected to CSPI2 and SS0 */
+#define CONFIG_MC13783_SPI_BUS	1
+#define CONFIG_MC13783_SPI_CS	0
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
Signature · 1 line
1.5.2.4
#3 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Add support for the Freescale i.MX31 PDK (a.k.a 3DS) board. Ethernet and MC13873 RTC support is enabled by this patch.

Booting from NAND is not supported yet so U-boot relies on some other initial boot loader to set up SDRAM and clocks and copying U-boot to SDRAM.

---
 MAKEALL                                 |    1 +
 Makefile                                |    3 +
 board/freescale/mx31pdk/Makefile        |   53 ++++++++++
 board/freescale/mx31pdk/config.mk       |    1 +
 board/freescale/mx31pdk/lowlevel_init.S |   30 ++++++
 board/freescale/mx31pdk/mx31pdk.c       |   76 +++++++++++++++
 board/freescale/mx31pdk/u-boot.lds      |   59 ++++++++++++
 include/configs/mx31pdk.h               |  159 +++++++++++++++++++++++++++++++
 8 files changed, 382 insertions(+), 0 deletions(-)
MAKEALL +1 -0
index e382947..c47cd09 100755
@@ -519,6 +519,7 @@ LIST_ARM11="		\
 	imx31_litekit	\
 	imx31_phycore	\
 	mx31ads		\
+	mx31pdk		\
 "
 
 #########################################################################
Makefile +3 -0
index 0f82e71..fe7e811 100644
@@ -2755,6 +2755,9 @@ imx31_phycore_config	: unconfig
 mx31ads_config		: unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads freescale mx31
 
+mx31pdk_config		: unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm1136 mx31pdk freescale mx31
+
 omap2420h4_config	: unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 NULL omap24xx
 
board/freescale/mx31pdk/Makefile new file +53 -0

53 lines not on this page · raw message

board/freescale/mx31pdk/config.mk new file +1 -0
new file mode 100644
index 0000000..d34dc02
@@ -0,0 +1 @@
+TEXT_BASE = 0x87f00000
board/freescale/mx31pdk/lowlevel_init.S new file +30 -0
new file mode 100644
index 0000000..a94ea7f
@@ -0,0 +1,30 @@
+/*
+ * (C) Copyright 2008 Magnus Lilja <[email protected]>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * This is just to keep the linker happy.
+ */
+
+.globl lowlevel_init
+lowlevel_init:
+	mov	pc, lr
+
board/freescale/mx31pdk/mx31pdk.c new file +76 -0

76 lines not on this page · raw message

board/freescale/mx31pdk/u-boot.lds new file +59 -0

59 lines not on this page · raw message

include/configs/mx31pdk.h new file +159 -0

159 lines not on this page · raw message

Signature · 1 line
1.5.2.4
#4 lore raw

PATCH v3 4/6 i.MX31: Add i.MX31 NAND Flash Controller driver.

Imported from Freescale's Linux NFC driver from the i.MX31 BSP release 5 (Linux 2.6.22.5) and the i.MX31 PDK BSP (Linux 2.6.24).

The code has been changed to conform (better) with the coding style in Linux/U-boot. Sections not used by U-boot have been removed.

The driver has been tested on i.MX31 Litekit (small page NAND) and i.MX31 PDK (large page NAND). Both boards have 8 bit wide NAND devices.
16 bit NAND devices have not been tested and probably requires a minor code change.

---

Issues regarding non-standard OOB/Bad block table, verify_buf and memcpy_32() and some other of Scott Wood's comments haven't been implemented yet.

And yes, the controller requires 16 bit accesses but I made a memcpy_32() instead of memcpy_16() but the plan is to implement Scott's proposal to memcpy_32() to a software buffer and then memcpy() from there.

 drivers/mtd/nand/Makefile             |    1 +
 drivers/mtd/nand/mx31_nand.c          | 1136 +++++++++++++++++++++++++++++++++
 include/asm-arm/arch-mx31/mx31-regs.h |   96 +++
 3 files changed, 1233 insertions(+), 0 deletions(-)
drivers/mtd/nand/Makefile +1 -0
index 1923310..729b8c2 100644
@@ -37,6 +37,7 @@ endif
 
 COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
 COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
+COBJS-$(CONFIG_MX31_NAND) += mx31_nand.o
 endif
 
 COBJS	:= $(COBJS-y)
drivers/mtd/nand/mx31_nand.c new file +1136 -0

1,136 lines not on this page · raw message

include/asm-arm/arch-mx31/mx31-regs.h +96 -0

100 lines not on this page · raw message

Signature · 1 line
1.5.2.4
#5 lore raw

PATCH v3 5/6 i.MX31: Add NAND support in the i.MX31 Litekit config file.

---
 include/configs/imx31_litekit.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
include/configs/imx31_litekit.h +12 -0
index 62a03fa..da155cf 100644
@@ -36,6 +36,8 @@
 #define CONFIG_MX31_HCLK_FREQ	26000000
 #define CONFIG_MX31_CLK32	32000
 
+#define CONFIG_MX31_NAND	1
+
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
@@ -90,6 +92,8 @@
 #define CONFIG_CMD_SPI
 #define CONFIG_CMD_DATE
 
+#define CONFIG_CMD_NAND
+
 #define CONFIG_BOOTDELAY	3
 
 #define CONFIG_NETMASK		255.255.255.0
@@ -175,4 +179,12 @@
 #undef CONFIG_JFFS2_CMDLINE
 #define CONFIG_JFFS2_DEV	"nor0"
 
+/*
+ * NAND flash
+ */
+
+#define NAND_MAX_CHIPS		1
+#define CFG_MAX_NAND_DEVICE	1
+#define CFG_NAND_BASE		0x40000000
+
 #endif /* __CONFIG_H */
Signature · 1 line
1.5.2.4
#6 lore raw

PATCH v3 6/6 i.MX31: Enable NAND driver for i.MX31 PDK board.

The U-Boot environment is placed in NAND.

---
 include/configs/mx31pdk.h |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)
include/configs/mx31pdk.h +24 -2
index 6df1a00..b511e36 100644
@@ -38,6 +38,8 @@
 #define CONFIG_MX31_HCLK_FREQ	26000000
 #define CONFIG_MX31_CLK32	32768
 
+#define CONFIG_MX31_NAND		1
+
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
@@ -52,8 +54,9 @@
 
 /*
  * Size of malloc() pool
+ * An extra 128kbyte is needed for the NAND Bad Block table.
  */
-#define CFG_MALLOC_LEN		(CFG_ENV_SIZE + 128 * 1024)
+#define CFG_MALLOC_LEN		(CFG_ENV_SIZE + 128 * 1024 + 128 * 1024)
 #define CFG_GBL_DATA_SIZE	128  /* bytes reserved for initial data */
 
 /*
@@ -92,6 +95,8 @@
 #define CONFIG_CMD_SPI
 #define CONFIG_CMD_DATE
 
+#define CONFIG_CMD_NAND
+
 /* Disabled due to compilation errors in cmd_bootm.c (IMLS seems to require
  * that CFG_NO_FLASH is undefined).
  */
@@ -151,9 +156,26 @@
 /* No NOR flash present */
 #define CFG_NO_FLASH		1
 
-#define CFG_ENV_IS_NOWHERE	1
+/*
+ * NAND flash
+ */
+
+#define NAND_MAX_CHIPS		1
+#define CFG_MAX_NAND_DEVICE	1
+#define CFG_NAND_BASE		0x40000000
 
+/*
+ * Place U-boot environment right after the U-boot code.
+ */
+#define CFG_ENV_IS_IN_NAND	1
+#define CFG_ENV_OFFSET		0x40000
+/* CFG_ENV_SIZE has to be a multiple of the NAND block size */
 #define CFG_ENV_SIZE		(128 * 1024)
 
+/*
+ * JFFS2 partitions
+ */
+#define CONFIG_JFFS2_DEV	"nand0"
+
 #endif /* __CONFIG_H */
 
Signature · 1 line
1.5.2.4
#7 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

In reply to Magnus Lilja
Quoted 7 lines · Magnus Lilja

Add support for the Freescale i.MX31 PDK (a.k.a 3DS) board. Ethernet and MC13873 RTC support is enabled by this patch.

Booting from NAND is not supported yet so U-boot relies on some other initial boot loader to set up SDRAM and clocks and copying U-boot to SDRAM.

Quoted 11 lines
---
 MAKEALL                                 |    1 +
 Makefile                                |    3 +
 board/freescale/mx31pdk/Makefile        |   53 ++++++++++
 board/freescale/mx31pdk/config.mk       |    1 +
 board/freescale/mx31pdk/lowlevel_init.S |   30 ++++++
 board/freescale/mx31pdk/mx31pdk.c       |   76 +++++++++++++++
 board/freescale/mx31pdk/u-boot.lds      |   59 ++++++++++++
 include/configs/mx31pdk.h               |  159 +++++++++++++++++++++++++++++++
 8 files changed, 382 insertions(+), 0 deletions(-)

applied to u-boot-arm branch testing

Best Regards,
J.

#8 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Dear Jean-Christophe,

Quoted 19 lines · In message <[email protected]> you wrote:
Quoted 7 lines · Magnus Lilja

Add support for the Freescale i.MX31 PDK (a.k.a 3DS) board. Ethernet and MC13873 RTC support is enabled by this patch.

Booting from NAND is not supported yet so U-boot relies on some other initial boot loader to set up SDRAM and clocks and copying U-boot to SDRAM.

Quoted 11 lines
---
 MAKEALL                                 |    1 +
 Makefile                                |    3 +
 board/freescale/mx31pdk/Makefile        |   53 ++++++++++
 board/freescale/mx31pdk/config.mk       |    1 +
 board/freescale/mx31pdk/lowlevel_init.S |   30 ++++++
 board/freescale/mx31pdk/mx31pdk.c       |   76 +++++++++++++++
 board/freescale/mx31pdk/u-boot.lds      |   59 ++++++++++++
 include/configs/mx31pdk.h               |  159 +++++++++++++++++++++++++++++++
 8 files changed, 382 insertions(+), 0 deletions(-)
Quoted 1 line

applied to u-boot-arm branch testing

This patch (and all the others of this patch series) was sumbitted while the merge window was open.

Is there any special reason it was not added to the master branch yet?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If something is different, it's either better or worse,  and  usually
both.                                                    - Larry Wall
#9 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Quoted 22 lines · Wolfgang Denk

Dear Jean-Christophe,

Quoted 19 lines · In message <[email protected]> you wrote:
Quoted 18 lines · Magnus Lilja

Add support for the Freescale i.MX31 PDK (a.k.a 3DS) board. Ethernet and MC13873 RTC support is enabled by this patch.

Booting from NAND is not supported yet so U-boot relies on some other initial boot loader to set up SDRAM and clocks and copying U-boot to SDRAM.

---
 MAKEALL                                 |    1 +
 Makefile                                |    3 +
 board/freescale/mx31pdk/Makefile        |   53 ++++++++++
 board/freescale/mx31pdk/config.mk       |    1 +
 board/freescale/mx31pdk/lowlevel_init.S |   30 ++++++
 board/freescale/mx31pdk/mx31pdk.c       |   76 +++++++++++++++
 board/freescale/mx31pdk/u-boot.lds      |   59 ++++++++++++
 include/configs/mx31pdk.h               |  159 +++++++++++++++++++++++++++++++
 8 files changed, 382 insertions(+), 0 deletions(-)
Quoted 9 lines
Quoted 1 line

applied to u-boot-arm branch testing

This patch (and all the others of this patch series) was sumbitted while the merge window was open.

Is there any special reason it was not added to the master branch yet?

As we discuss on IRC this board will be merge when it can boot from a storage

Best Regards,
J.

#10 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 7 lines · Magnus Lilja
Quoted 5 lines

Add support for the Freescale i.MX31 PDK (a.k.a 3DS) board. Ethernet and MC13873 RTC support is enabled by this patch.

Booting from NAND is not supported yet so U-boot relies on some other initial boot loader to set up SDRAM and clocks and copying U-boot to SDRAM.

...

Quoted 5 lines
Quoted 5 lines

This patch (and all the others of this patch series) was sumbitted while the merge window was open.

Is there any special reason it was not added to the master branch yet?

...

Quoted 1 line

As we discuss on IRC this board will be merge when it can boot from a storage

IRC may be fine for finding a quick agreement, but please *always* post a response to the patches on the mailing list.

Only then everybody (including me) can know what's going on.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The important thing about being a leader is not being right or wrong,
but being *certain*.                    - Terry Pratchett, _Truckers_
#11 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Quoted 16 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 7 lines · Magnus Lilja
Quoted 5 lines

Add support for the Freescale i.MX31 PDK (a.k.a 3DS) board. Ethernet and MC13873 RTC support is enabled by this patch.

Booting from NAND is not supported yet so U-boot relies on some other initial boot loader to set up SDRAM and clocks and copying U-boot to SDRAM.

...

Quoted 5 lines
Quoted 5 lines

This patch (and all the others of this patch series) was sumbitted while the merge window was open.

Is there any special reason it was not added to the master branch yet?

Quoted 7 lines

...

Quoted 1 line

As we discuss on IRC this board will be merge when it can boot from a storage

IRC may be fine for finding a quick agreement, but please *always* post a response to the patches on the mailing list.

Only then everybody (including me) can know what's going on.

I've done it in this reply
F Sep03 Cc u-boot at lists ??>Re: [U-Boot] [PATCH v3 0/6] i.MX31: Add NAND support and new PDK?board.
Best Regards,
J.

#12 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

In reply to Jean-Christophe PLAGNIOL-VILLARD

Hi Jean-Christophe,

Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines

Is there any special reason it was not added to the master branch yet?

As we discuss on IRC this board will be merge when it can boot from a storage

Using some patches I sent we can boot it from storage, even without the MTD NAND driver.

Quoted 2 lines

Best Regards,
J.

Regards,

Alan

#13 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Quoted 8 lines · Alan Carvalho de Assis

Hi Jean-Christophe,

Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines

Is there any special reason it was not added to the master branch yet?

Quoted 5 lines
Quoted 2 lines

As we discuss on IRC this board will be merge when it can boot from a storage

Using some patches I sent we can boot it from storage, even without the MTD NAND driver.

Could you specify which one? pease

Best Regards,
J.

#14 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Hi Jean-Christophe,

Quoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 8 lines · Alan Carvalho de Assis

Hi Jean-Christophe,

Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines

Is there any special reason it was not added to the master branch yet?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

As we discuss on IRC this board will be merge when it can boot from a storage

Using some patches I sent we can boot it from storage, even without the MTD NAND driver.

Could you specify which one? pease

Please check the following thread:
http://lists.denx.de/pipermail/u-boot/2008-October/041355.html

I can boot from NAND Flash on iMX31PDK board after applying this series of patches.

Quoted 1 line

Best Regards,

Best Regards,

Quoted 2 lines

J.

Alan

#15 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Quoted 18 lines · Alan Carvalho de Assis

Hi Jean-Christophe,

Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 13 lines · Alan Carvalho de Assis

Hi Jean-Christophe,

Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines

Is there any special reason it was not added to the master branch yet?

As we discuss on IRC this board will be merge when it can boot from a storage

Using some patches I sent we can boot it from storage, even without the MTD NAND driver.

Quoted 8 lines
Quoted 2 lines

Could you specify which one? pease

Please check the following thread:
http://lists.denx.de/pipermail/u-boot/2008-October/041355.html

I can boot from NAND Flash on iMX31PDK board after applying this series of patches.

Thanks,
I've seen this patch I put some comment on it asap

Best Regards,

J.

#16 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Hi Jean-Christophe,

Quoted 35 lines · Jean-Christophe PLAGNIOL-VILLARD

From: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Subject: Re: [U-Boot] [PATCH v3 3/6] i.MX31: Add basic support for Freescale's i.MX31 PDK board.
To: "Alan Carvalho de Assis" <[email protected]>
Cc: u-boot at lists.denx.de, "Magnus Lilja" <[email protected]>
Date: Thursday, October 16, 2008, 5:17 AM

Quoted 3 lines · Alan Carvalho de Assis

Hi Jean-Christophe,

On Wed, Oct 15, 2008 at 2:04 PM, Jean-Christophe

PLAGNIOL-VILLARD

Quoted 2 lines
Quoted 1 line · <[email protected]> wrote:

On 08:51 Wed 15 Oct , Alan Carvalho de Assis

Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines

Hi Jean-Christophe,

On Mon, Oct 13, 2008 at 5:49 AM,

Jean-Christophe PLAGNIOL-VILLARD

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line · <[email protected]> wrote:
Quoted 1 line

Is there any special reason it was

not added to the master branch

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

yet?

As we discuss on IRC this board will be

merge when it can boot from a storage

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Using some patches I sent we can boot it from

storage, even without

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

the MTD NAND driver.

Could you specify which one? pease

Please check the following thread:

Quoted 8 lines

http://lists.denx.de/pipermail/u-boot/2008-October/041355.html

Quoted 2 lines

I can boot from NAND Flash on iMX31PDK board after

applying this

Quoted 1 line

series of patches.

Thanks,
I've seen this patch I put some comment on it asap

Have you had a chance to review Alan's patch for booting MX31PDK from NAND Flash?

Thanks,

Fabio Estevam

#17 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

In reply to Magnus Lilja

Dear Magnus Lilja,

Quoted 7 lines · In message <[email protected]> you wrote:

Add support for the Freescale i.MX31 PDK (a.k.a 3DS) board. Ethernet and MC13873 RTC support is enabled by this patch.

Booting from NAND is not supported yet so U-boot relies on some other initial boot loader to set up SDRAM and clocks and copying U-boot to SDRAM.

Quoted 10 lines
---
 MAKEALL                                 |    1 +
 Makefile                                |    3 +
 board/freescale/mx31pdk/Makefile        |   53 ++++++++++
 board/freescale/mx31pdk/config.mk       |    1 +
 board/freescale/mx31pdk/lowlevel_init.S |   30 ++++++
 board/freescale/mx31pdk/mx31pdk.c       |   76 +++++++++++++++
 board/freescale/mx31pdk/u-boot.lds      |   59 ++++++++++++
 include/configs/mx31pdk.h               |  159 +++++++++++++++++++++++++++++++
 8 files changed, 382 insertions(+), 0 deletions(-)

I still have these patches marked as open in my list, but they probably need rebasing now anyway.

Is it OK that I mark these patches as done?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Vor allem kein Gedanke! Nichts ist kompromittierender als ein  Gedan-
ke!            - Friedrich Wilhelm Nietzsche _Der Fall Wagner_ (1888)
#18 lore raw

PATCH v3 3/6 i.MX31: Add basic support for Freescale's i.MX31 PDK board.

Hi Wolfgang,

2009/2/9 Wolfgang Denk <[email protected]>:

Quoted 21 lines

Dear Magnus Lilja,

Quoted 7 lines · In message <[email protected]> you wrote:

Add support for the Freescale i.MX31 PDK (a.k.a 3DS) board. Ethernet and MC13873 RTC support is enabled by this patch.

Booting from NAND is not supported yet so U-boot relies on some other initial boot loader to set up SDRAM and clocks and copying U-boot to SDRAM.

Quoted 10 lines
---
 MAKEALL                                 |    1 +
 Makefile                                |    3 +
 board/freescale/mx31pdk/Makefile        |   53 ++++++++++
 board/freescale/mx31pdk/config.mk       |    1 +
 board/freescale/mx31pdk/lowlevel_init.S |   30 ++++++
 board/freescale/mx31pdk/mx31pdk.c       |   76 +++++++++++++++
 board/freescale/mx31pdk/u-boot.lds      |   59 ++++++++++++
 include/configs/mx31pdk.h               |  159 +++++++++++++++++++++++++++++++
 8 files changed, 382 insertions(+), 0 deletions(-)
Quoted 4 lines

I still have these patches marked as open in my list, but they probably need rebasing now anyway.

Is it OK that I mark these patches as done?

Not sure what you mean by "done", but I'm planning to rebase and re-submit once Maxim's patch for NAND-SPL boot for i.MX31 has been merged into the tree.

Best Regards, Magnus

#19 lore raw

PATCH v3 2/6 i.MX31: Make the SPI bus and chip select configurable for MC13783

In reply to Magnus Lilja
Quoted 7 lines · Magnus Lilja

The i.MX31 has three SPI buses and each bus has several chip selects and the MC13783 chip can be connected to any of these. The current RTC driver for MC13783 is hardcoded for CSPI2/SS2.

This patch makes make MC13783 SPI bus and chip select configurable via CONFIG_MC13783_SPI_BUS and CONFIG_MC13783_SPI_CS.

Quoted 8 lines
---
 doc/README.mx31                 |   19 +++++++++++++++++++
 drivers/rtc/mc13783-rtc.c       |    6 ++++--
 include/configs/imx31_litekit.h |    3 +++
 include/configs/mx31ads.h       |    3 +++
 4 files changed, 29 insertions(+), 2 deletions(-)

applied to u-boot-arm

Best Regards,
J.

#20 lore raw

PATCH v3 2/6 i.MX31: Make the SPI bus and chip select configurable for MC13783

Dear Jean-Christophe,

Quoted 16 lines · In message <[email protected]> you wrote:
Quoted 7 lines · Magnus Lilja

The i.MX31 has three SPI buses and each bus has several chip selects and the MC13783 chip can be connected to any of these. The current RTC driver for MC13783 is hardcoded for CSPI2/SS2.

This patch makes make MC13783 SPI bus and chip select configurable via CONFIG_MC13783_SPI_BUS and CONFIG_MC13783_SPI_CS.

Quoted 8 lines
---
 doc/README.mx31                 |   19 +++++++++++++++++++
 drivers/rtc/mc13783-rtc.c       |    6 ++++--
 include/configs/imx31_litekit.h |    3 +++
 include/configs/mx31ads.h       |    3 +++
 4 files changed, 29 insertions(+), 2 deletions(-)
Quoted 1 line

applied to u-boot-arm

Yet it never made it into mainline yet.

What happened to this patch series? Please comment.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The further the spiritual evolution of  mankind  advances,  the  more
certain  it seems to me that the path to genuine religiosity does not
lie through the fear of life, and the fear of death, and blind faith,
but through striving after rational knowledge.      - Albert Einstein
#21 lore raw

PATCH v3 2/6 i.MX31: Make the SPI bus and chip select configurable for MC13783

Quoted 19 lines · Wolfgang Denk

Dear Jean-Christophe,

Quoted 16 lines · In message <[email protected]> you wrote:
Quoted 15 lines · Magnus Lilja

The i.MX31 has three SPI buses and each bus has several chip selects and the MC13783 chip can be connected to any of these. The current RTC driver for MC13783 is hardcoded for CSPI2/SS2.

This patch makes make MC13783 SPI bus and chip select configurable via CONFIG_MC13783_SPI_BUS and CONFIG_MC13783_SPI_CS.

---
 doc/README.mx31                 |   19 +++++++++++++++++++
 drivers/rtc/mc13783-rtc.c       |    6 ++++--
 include/configs/imx31_litekit.h |    3 +++
 include/configs/mx31ads.h       |    3 +++
 4 files changed, 29 insertions(+), 2 deletions(-)
Quoted 5 lines
Quoted 1 line

applied to u-boot-arm

Yet it never made it into mainline yet.

What happened to this patch series? Please comment.

It is 1a6337b01351b82a45b0defa76f08744511c580b

Best Regards,
J.

#22 lore raw

PATCH v3 2/6 i.MX31: Make the SPI bus and chip select configurable for MC13783

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
 doc/README.mx31                 |   19 +++++++++++++++++++
 drivers/rtc/mc13783-rtc.c       |    6 ++++--
 include/configs/imx31_litekit.h |    3 +++
 include/configs/mx31ads.h       |    3 +++
 4 files changed, 29 insertions(+), 2 deletions(-)
Quoted 6 lines
Quoted 5 lines
Quoted 1 line

applied to u-boot-arm

Yet it never made it into mainline yet.

What happened to this patch series? Please comment.

It is 1a6337b01351b82a45b0defa76f08744511c580b

Ah, I see. I was looking for doc/README.mx31 and didn;t see that it got merged/renamed later. Sorry.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The thing is, as you progress in the Craft,  you'll  learn  there  is
another rule... When you break rules, break 'em good and hard.
                                    - Terry Pratchett, _Wyrd Sisters_
#23 lore raw

PATCH v3 1/6 i.MX31: Add reset_timer() and modify get_timer_masked().

In reply to Magnus Lilja
Quoted 9 lines · Magnus Lilja

This patch adds the reset_timer() function (needed by nand_base.c) and modifies the get_timer_masked() to work in the same way as the omap24xx function.

---
 cpu/arm1136/mx31/interrupts.c |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

applied to u-boot-arm

Best Regards,
J.

#24 lore raw

v3 cover i.MX31: Add NAND support and new PDK board.

In reply to Magnus Lilja

Hi,

2008/8/29 Magnus Lilja <[email protected]>:

Quoted 17 lines

Hi again

This series of patches adds support for the NAND flash controller in the i.MX31 device and also introduces the Freescale i.MX31 PDK board.

Changes since v2:

- Added doc/README.mx31 (contains MC13783 SPI config documentation)
- Split the PDK patch into two patches, the first introduces the board without NAND support, the second adds NAND support.
- Re-ordered the series so the NAND patches are placed last
- mx31_nand.c has been updated w.r.t. coding style.
- There are still issues with the NAND driver (i.e. not all comments from Scott Wood have been taken care of yet). Therefore I suspect that the NAND driver is not ready for inclusion yet, the other patches should be OK.

Quoted 2 lines

The patches are based on the current main U-boot git repo (as of Friday morning).

Is there are chance that the first couple of patches in the series can be merged into the official tree? I'm talking about the following patches:
[PATCH v3 1/6] i.MX31: Add reset_timer() and modify get_timer_masked(). [PATCH v3 2/6] i.MX31: Make the SPI bus and chip select configurable for MC13783 [PATCH v3 3/6] i.MX31: Add basic support for Freescale's i.MX31 PDK board.

The rest of the patches in the series depends on the i.MX31 NAND driver and I'm not able to fix the issues in the immediate future so that'll have to wait.

Regards, Magnus

#25 lore raw

v3 cover i.MX31: Add NAND support and new PDK board.

Quoted 20 lines · Magnus Lilja

Hi,

2008/8/29 Magnus Lilja <[email protected]>:

Quoted 17 lines

Hi again

This series of patches adds support for the NAND flash controller in the i.MX31 device and also introduces the Freescale i.MX31 PDK board.

Changes since v2:

- Added doc/README.mx31 (contains MC13783 SPI config documentation)
- Split the PDK patch into two patches, the first introduces the board without NAND support, the second adds NAND support.
- Re-ordered the series so the NAND patches are placed last
- mx31_nand.c has been updated w.r.t. coding style.
- There are still issues with the NAND driver (i.e. not all comments from Scott Wood have been taken care of yet). Therefore I suspect that the NAND driver is not ready for inclusion yet, the other patches should be OK.

Quoted 8 lines
Quoted 2 lines

The patches are based on the current main U-boot git repo (as of Friday morning).

Is there are chance that the first couple of patches in the series can be merged into the official tree? I'm talking about the following patches:
[PATCH v3 1/6] i.MX31: Add reset_timer() and modify get_timer_masked().

yes

Quoted 1 line

[PATCH v3 2/6] i.MX31: Make the SPI bus and chip select configurable for MC13783

yes

Quoted 1 line

[PATCH v3 3/6] i.MX31: Add basic support for Freescale's i.MX31 PDK board.

It will be apply in arm test branch until it can boot with flash

Best Regards,
J.

#26 lore raw

v3 cover i.MX31: Add NAND support and new PDK board.

Quoted 9 lines
Quoted 4 lines

Is there are chance that the first couple of patches in the series can be merged into the official tree? I'm talking about the following patches:
[PATCH v3 1/6] i.MX31: Add reset_timer() and modify get_timer_masked().

yes

Quoted 1 line

[PATCH v3 2/6] i.MX31: Make the SPI bus and chip select configurable for MC13783

yes

Quoted 1 line

[PATCH v3 3/6] i.MX31: Add basic support for Freescale's i.MX31 PDK board.

It will be apply in arm test branch until it can boot with flash

Thanks,

Magnus

#27 lore raw

v3 cover i.MX31: Add NAND support and new PDK board.

In reply to Magnus Lilja

Dear Jean-Christophe,

Quoted 3 lines · in message <[email protected]> Magnus…

This series of patches adds support for the NAND flash controller in the i.MX31 device and also introduces the Freescale i.MX31 PDK board.

As far as I can see these patches have never been applied.

Will you please have a look? Thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
O Staat!   Wie tief dir alle Besten fluchen!  Du bist kein Ziel.  Der
Mensch mu? weiter suchen.                     - Christian Morgenstern
#28 lore raw

v3 cover i.MX31: Add NAND support and new PDK board.

Wolfgang,

2009/1/24 Wolfgang Denk <[email protected]>:

Quoted 10 lines

Dear Jean-Christophe,

Quoted 3 lines · in message <[email protected]> Magnus…

This series of patches adds support for the NAND flash controller in the i.MX31 device and also introduces the Freescale i.MX31 PDK board.

As far as I can see these patches have never been applied.

Will you please have a look? Thanks.

If I remember correctly there were two issues:
1) The patches didn't have support for booting from NAND so it relied on some other entity to do the booting
2) The NAND driver was not accepted

Regarding 1) other people have posted patches that would allow the PDK to boot properly from NAND. The last set of patches used the existing nand_spl framework, however there were some comments on those patches (minor comments in my opinion) but an updated patch-set that added NAND-boot hasn't been posted. Last I've noticed in the subject is this thread:http://lists.denx.de/pipermail/u-boot/2008-December/044266.html with a followup from me in January.

Regarding 2) there were other attempts at submitting a NAND driver for the controller that Freescale uses in i.MX31 and some other non-ARM SoC, but I don't know what happened with that effort. Scott made some comments as he pointed out a couple of hours ago.

Regards, Magnus