diff mbox

[U-Boot] mx28evk: add NAND support

Message ID 1334658946-7533-1-git-send-email-lauri.hintsala@bluegiga.com
State Accepted
Commit ecb7be2985e130d1d3f7569f086cf50bfe60d337
Headers show

Commit Message

Lauri Hintsala April 17, 2012, 10:35 a.m. UTC
NAND support is not enabled by default because Eval Kit is not delivered
with NAND chip. To enable NAND support add CONFIG_CMD_NAND to board config.

Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
---
 board/freescale/mx28evk/iomux.c |   21 +++++++++++++++++++++
 include/configs/mx28evk.h       |   10 ++++++++++
 2 files changed, 31 insertions(+), 0 deletions(-)

Comments

Marek Vasut April 17, 2012, 11:21 a.m. UTC | #1
Dear Lauri Hintsala,

> NAND support is not enabled by default because Eval Kit is not delivered
> with NAND chip. To enable NAND support add CONFIG_CMD_NAND to board config.
> 
> Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>

Acked-by: Marek Vasut <marex@denx.de>

I think we can schedule it for .04 release as this is basically a fix? Fabio ?

> ---
>  board/freescale/mx28evk/iomux.c |   21 +++++++++++++++++++++
>  include/configs/mx28evk.h       |   10 ++++++++++
>  2 files changed, 31 insertions(+), 0 deletions(-)
> 
> diff --git a/board/freescale/mx28evk/iomux.c
> b/board/freescale/mx28evk/iomux.c index 396761b..6587c45 100644
> --- a/board/freescale/mx28evk/iomux.c
> +++ b/board/freescale/mx28evk/iomux.c
> @@ -26,6 +26,7 @@
>  #include <asm/arch/sys_proto.h>
> 
>  #define	MUX_CONFIG_SSP0	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
> +#define	MUX_CONFIG_GPMI	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
>  #define	MUX_CONFIG_ENET	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
>  #define	MUX_CONFIG_EMI	(MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
>  #define	MUX_CONFIG_SSP2	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP)
> @@ -55,6 +56,26 @@ const iomux_cfg_t iomux_setup[] = {
>  	MX28_PAD_PWM3__GPIO_3_28 |
>  		(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> 
> +#ifdef CONFIG_NAND_MXS
> +	/* GPMI NAND */
> +	MX28_PAD_GPMI_D00__GPMI_D0 | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_D01__GPMI_D1 | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_D02__GPMI_D2 | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_D03__GPMI_D3 | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_D04__GPMI_D4 | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_D05__GPMI_D5 | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_D06__GPMI_D6 | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_D07__GPMI_D7 | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_CE0N__GPMI_CE0N | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_RDY0__GPMI_READY0 | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_RDN__GPMI_RDN |
> +		(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP),
> +	MX28_PAD_GPMI_WRN__GPMI_WRN | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_ALE__GPMI_ALE | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_CLE__GPMI_CLE | MUX_CONFIG_GPMI,
> +	MX28_PAD_GPMI_RESETN__GPMI_RESETN | MUX_CONFIG_GPMI,
> +#endif
> +
>  	/* FEC0 */
>  	MX28_PAD_ENET0_MDC__ENET0_MDC | MUX_CONFIG_ENET,
>  	MX28_PAD_ENET0_MDIO__ENET0_MDIO | MUX_CONFIG_ENET,
> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
> index 02f3366..2a44baa 100644
> --- a/include/configs/mx28evk.h
> +++ b/include/configs/mx28evk.h
> @@ -148,6 +148,16 @@
>  #endif
> 
>  /*
> + * NAND Driver
> + */
> +#ifdef CONFIG_CMD_NAND
> +#define CONFIG_NAND_MXS
> +#define CONFIG_SYS_MAX_NAND_DEVICE	1
> +#define CONFIG_SYS_NAND_BASE		0x60000000
> +#define CONFIG_SYS_NAND_5_ADDR_CYCLE
> +#endif
> +
> +/*
>   * Ethernet on SOC (FEC)
>   */
>  #ifdef	CONFIG_CMD_NET

Best regards,
Marek Vasut
Fabio Estevam April 17, 2012, 1:34 p.m. UTC | #2
On 4/17/12, Marek Vasut <marex@denx.de> wrote:
> Dear Lauri Hintsala,
>
>> NAND support is not enabled by default because Eval Kit is not delivered
>> with NAND chip. To enable NAND support add CONFIG_CMD_NAND to board
>> config.
>>
>> Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
>
> Acked-by: Marek Vasut <marex@denx.de>
>
> I think we can schedule it for .04 release as this is basically a fix? Fabio
> ?

Looks good to me. My only suggestion (can be part of a separate patch)
is to modify the mx28evk README and explain that mx28evk can also boot
from NAND and explain the boot mode settings, etc.

Thanks,

Fabio Estevam
Marek Vasut April 17, 2012, 2:22 p.m. UTC | #3
Dear Fabio Estevam,

> On 4/17/12, Marek Vasut <marex@denx.de> wrote:
> > Dear Lauri Hintsala,
> > 
> >> NAND support is not enabled by default because Eval Kit is not delivered
> >> with NAND chip. To enable NAND support add CONFIG_CMD_NAND to board
> >> config.
> >> 
> >> Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
> > 
> > Acked-by: Marek Vasut <marex@denx.de>
> > 
> > I think we can schedule it for .04 release as this is basically a fix?
> > Fabio ?
> 
> Looks good to me. My only suggestion (can be part of a separate patch)
> is to modify the mx28evk README and explain that mx28evk can also boot
> from NAND and explain the boot mode settings, etc.

Good idea, but let's do this in a separate patch :)
> 
> Thanks,
> 
> Fabio Estevam

Best regards,
Marek Vasut
Stefano Babic April 17, 2012, 2:30 p.m. UTC | #4
On 17/04/2012 13:21, Marek Vasut wrote:
> Dear Lauri Hintsala,
> 
>> NAND support is not enabled by default because Eval Kit is not delivered
>> with NAND chip. To enable NAND support add CONFIG_CMD_NAND to board config.
>>
>> Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
> 
> Acked-by: Marek Vasut <marex@denx.de>
> 
> I think we can schedule it for .04 release as this is basically a fix? Fabio ?

Well, this is not a fix because it adds a feature that is not yet
supported. It should be deferred to the next release.

Best regards,
Stefano Babic
Marek Vasut April 17, 2012, 2:46 p.m. UTC | #5
Dear Stefano Babic,

> On 17/04/2012 13:21, Marek Vasut wrote:
> > Dear Lauri Hintsala,
> > 
> >> NAND support is not enabled by default because Eval Kit is not delivered
> >> with NAND chip. To enable NAND support add CONFIG_CMD_NAND to board
> >> config.
> >> 
> >> Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
> > 
> > Acked-by: Marek Vasut <marex@denx.de>
> > 
> > I think we can schedule it for .04 release as this is basically a fix?
> > Fabio ?
> 
> Well, this is not a fix because it adds a feature that is not yet
> supported. It should be deferred to the next release.

Ok, I won't object either way as it doesn't concern me that much ;-)

> 
> Best regards,
> Stefano Babic

Best regards,
Marek Vasut
Fabio Estevam May 2, 2012, 5:26 p.m. UTC | #6
Hi Stefano,

On Tue, Apr 17, 2012 at 11:30 AM, Stefano Babic <sbabic@denx.de> wrote:

> Well, this is not a fix because it adds a feature that is not yet
> supported. It should be deferred to the next release.

Can this be applied now?
Marek Vasut May 2, 2012, 5:53 p.m. UTC | #7
Dear Fabio Estevam,

> Hi Stefano,
> 
> On Tue, Apr 17, 2012 at 11:30 AM, Stefano Babic <sbabic@denx.de> wrote:
> > Well, this is not a fix because it adds a feature that is not yet
> > supported. It should be deferred to the next release.
> 
> Can this be applied now?

Should be ...

Best regards,
Marek Vasut
Stefano Babic May 2, 2012, 8:58 p.m. UTC | #8
Am 02/05/2012 19:26, schrieb Fabio Estevam:
> Hi Stefano,
> 
> On Tue, Apr 17, 2012 at 11:30 AM, Stefano Babic <sbabic@denx.de> wrote:
> 
>> Well, this is not a fix because it adds a feature that is not yet
>> supported. It should be deferred to the next release.
> 
> Can this be applied now?
> 

Yes, I will do it.

Best regards,
Stefano Babic
Stefano Babic May 6, 2012, 4:42 p.m. UTC | #9
On 17/04/2012 12:35, Lauri Hintsala wrote:
> NAND support is not enabled by default because Eval Kit is not delivered
> with NAND chip. To enable NAND support add CONFIG_CMD_NAND to board config.
> 
> Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
> ---

Applied to u-boot-imx, thanks

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/freescale/mx28evk/iomux.c b/board/freescale/mx28evk/iomux.c
index 396761b..6587c45 100644
--- a/board/freescale/mx28evk/iomux.c
+++ b/board/freescale/mx28evk/iomux.c
@@ -26,6 +26,7 @@ 
 #include <asm/arch/sys_proto.h>
 
 #define	MUX_CONFIG_SSP0	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
+#define	MUX_CONFIG_GPMI	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
 #define	MUX_CONFIG_ENET	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
 #define	MUX_CONFIG_EMI	(MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
 #define	MUX_CONFIG_SSP2	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP)
@@ -55,6 +56,26 @@  const iomux_cfg_t iomux_setup[] = {
 	MX28_PAD_PWM3__GPIO_3_28 |
 		(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
 
+#ifdef CONFIG_NAND_MXS
+	/* GPMI NAND */
+	MX28_PAD_GPMI_D00__GPMI_D0 | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_D01__GPMI_D1 | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_D02__GPMI_D2 | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_D03__GPMI_D3 | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_D04__GPMI_D4 | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_D05__GPMI_D5 | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_D06__GPMI_D6 | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_D07__GPMI_D7 | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_CE0N__GPMI_CE0N | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_RDY0__GPMI_READY0 | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_RDN__GPMI_RDN |
+		(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP),
+	MX28_PAD_GPMI_WRN__GPMI_WRN | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_ALE__GPMI_ALE | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_CLE__GPMI_CLE | MUX_CONFIG_GPMI,
+	MX28_PAD_GPMI_RESETN__GPMI_RESETN | MUX_CONFIG_GPMI,
+#endif
+
 	/* FEC0 */
 	MX28_PAD_ENET0_MDC__ENET0_MDC | MUX_CONFIG_ENET,
 	MX28_PAD_ENET0_MDIO__ENET0_MDIO | MUX_CONFIG_ENET,
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 02f3366..2a44baa 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -148,6 +148,16 @@ 
 #endif
 
 /*
+ * NAND Driver
+ */
+#ifdef CONFIG_CMD_NAND
+#define CONFIG_NAND_MXS
+#define CONFIG_SYS_MAX_NAND_DEVICE	1
+#define CONFIG_SYS_NAND_BASE		0x60000000
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+#endif
+
+/*
  * Ethernet on SOC (FEC)
  */
 #ifdef	CONFIG_CMD_NET