diff mbox

[U-Boot,10/10] mx23_olinuxino: Add ethernet support

Message ID 1359548001-14278-11-git-send-email-otavio@ossystems.com.br
State Changes Requested
Delegated to: Stefano Babic
Headers show

Commit Message

Otavio Salvador Jan. 30, 2013, 12:13 p.m. UTC
This adds support to the LAN9512 chip included in the board and extend
the environment to easy netboot use.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 board/olimex/mx23_olinuxino/mx23_olinuxino.c |  6 +++++
 board/olimex/mx23_olinuxino/spl_boot.c       |  4 +++
 include/configs/mx23_olinuxino.h             | 40 +++++++++++++++++++++++++---
 3 files changed, 47 insertions(+), 3 deletions(-)

Comments

Marek Vasut Jan. 30, 2013, 2:18 p.m. UTC | #1
Dear Otavio Salvador,

> This adds support to the LAN9512 chip included in the board and extend
> the environment to easy netboot use.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  board/olimex/mx23_olinuxino/mx23_olinuxino.c |  6 +++++
>  board/olimex/mx23_olinuxino/spl_boot.c       |  4 +++
>  include/configs/mx23_olinuxino.h             | 40
> +++++++++++++++++++++++++--- 3 files changed, 47 insertions(+), 3
> deletions(-)
> 
> diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 2501417..9ed7718
> 100644
> --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> @@ -23,6 +23,7 @@
>   */
> 
>  #include <common.h>
> +#include <asm/gpio.h>
>  #include <asm/io.h>
>  #include <asm/arch/iomux-mx23.h>
>  #include <asm/arch/imx-regs.h>
> @@ -45,6 +46,11 @@ int board_early_init_f(void)
>  	/* SSP0 clock at 96MHz */
>  	mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
> 
> +#ifdef CONFIG_CMD_USB
> +	/* Enable LAN9512 */
> +	gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1);
> +#endif
> +
>  	return 0;
>  }
> 
> diff --git a/board/olimex/mx23_olinuxino/spl_boot.c
> b/board/olimex/mx23_olinuxino/spl_boot.c index 3bbf5ad..a96c293 100644
> --- a/board/olimex/mx23_olinuxino/spl_boot.c
> +++ b/board/olimex/mx23_olinuxino/spl_boot.c
> @@ -95,6 +95,10 @@ const iomux_cfg_t iomux_setup[] = {
>  	MX23_PAD_SSP1_DATA2__SSP1_DATA2 | MUX_CONFIG_SSP,
>  	MX23_PAD_SSP1_DATA3__SSP1_DATA3 | MUX_CONFIG_SSP,
>  	MX23_PAD_SSP1_SCK__SSP1_SCK | MUX_CONFIG_SSP,
> +
> +	/* Ethernet */
> +	MX23_PAD_GPMI_ALE__GPIO_0_17 |
> +		(MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
>  };
> 
>  void board_init_ll(void)
> diff --git a/include/configs/mx23_olinuxino.h
> b/include/configs/mx23_olinuxino.h index 7e17809..42de557 100644
> --- a/include/configs/mx23_olinuxino.h
> +++ b/include/configs/mx23_olinuxino.h
> @@ -53,11 +53,13 @@
>  #define	CONFIG_DOS_PARTITION
> 
>  #define	CONFIG_CMD_CACHE
> +#define	CONFIG_CMD_DHCP
>  #define	CONFIG_CMD_EXT2
>  #define	CONFIG_CMD_FAT
>  #define	CONFIG_CMD_GPIO
>  #define	CONFIG_CMD_LED
>  #define	CONFIG_CMD_MMC
> +#define	CONFIG_CMD_NET
>  #define	CONFIG_CMD_USB
> 
>  /*
> @@ -148,6 +150,12 @@
>  #define	CONFIG_USB_STORAGE
>  #endif
> 
> +/* Ethernet */
> +#ifdef	CONFIG_CMD_NET
> +#define	CONFIG_USB_HOST_ETHER
> +#define	CONFIG_USB_ETHER_SMSC95XX
> +#endif
> +
>  /*
>   * Boot Linux
>   */

Split the env from this patch into separate one ; merge the rest into the 09/10 
as the SMC device is also a hub etc.

Best regards,
Marek Vasut
Otavio Salvador Jan. 30, 2013, 3:38 p.m. UTC | #2
On Wed, Jan 30, 2013 at 12:18 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Otavio Salvador,
>
>> This adds support to the LAN9512 chip included in the board and extend
>> the environment to easy netboot use.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>  board/olimex/mx23_olinuxino/mx23_olinuxino.c |  6 +++++
>>  board/olimex/mx23_olinuxino/spl_boot.c       |  4 +++
>>  include/configs/mx23_olinuxino.h             | 40
>> +++++++++++++++++++++++++--- 3 files changed, 47 insertions(+), 3
>> deletions(-)
>>
>> diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
>> b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 2501417..9ed7718
>> 100644
>> --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
>> +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
>> @@ -23,6 +23,7 @@
>>   */
>>
>>  #include <common.h>
>> +#include <asm/gpio.h>
>>  #include <asm/io.h>
>>  #include <asm/arch/iomux-mx23.h>
>>  #include <asm/arch/imx-regs.h>
>> @@ -45,6 +46,11 @@ int board_early_init_f(void)
>>       /* SSP0 clock at 96MHz */
>>       mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
>>
>> +#ifdef CONFIG_CMD_USB
>> +     /* Enable LAN9512 */
>> +     gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1);
>> +#endif
>> +
>>       return 0;
>>  }
>>
>> diff --git a/board/olimex/mx23_olinuxino/spl_boot.c
>> b/board/olimex/mx23_olinuxino/spl_boot.c index 3bbf5ad..a96c293 100644
>> --- a/board/olimex/mx23_olinuxino/spl_boot.c
>> +++ b/board/olimex/mx23_olinuxino/spl_boot.c
>> @@ -95,6 +95,10 @@ const iomux_cfg_t iomux_setup[] = {
>>       MX23_PAD_SSP1_DATA2__SSP1_DATA2 | MUX_CONFIG_SSP,
>>       MX23_PAD_SSP1_DATA3__SSP1_DATA3 | MUX_CONFIG_SSP,
>>       MX23_PAD_SSP1_SCK__SSP1_SCK | MUX_CONFIG_SSP,
>> +
>> +     /* Ethernet */
>> +     MX23_PAD_GPMI_ALE__GPIO_0_17 |
>> +             (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
>>  };
>>
>>  void board_init_ll(void)
>> diff --git a/include/configs/mx23_olinuxino.h
>> b/include/configs/mx23_olinuxino.h index 7e17809..42de557 100644
>> --- a/include/configs/mx23_olinuxino.h
>> +++ b/include/configs/mx23_olinuxino.h
>> @@ -53,11 +53,13 @@
>>  #define      CONFIG_DOS_PARTITION
>>
>>  #define      CONFIG_CMD_CACHE
>> +#define      CONFIG_CMD_DHCP
>>  #define      CONFIG_CMD_EXT2
>>  #define      CONFIG_CMD_FAT
>>  #define      CONFIG_CMD_GPIO
>>  #define      CONFIG_CMD_LED
>>  #define      CONFIG_CMD_MMC
>> +#define      CONFIG_CMD_NET
>>  #define      CONFIG_CMD_USB
>>
>>  /*
>> @@ -148,6 +150,12 @@
>>  #define      CONFIG_USB_STORAGE
>>  #endif
>>
>> +/* Ethernet */
>> +#ifdef       CONFIG_CMD_NET
>> +#define      CONFIG_USB_HOST_ETHER
>> +#define      CONFIG_USB_ETHER_SMSC95XX
>> +#endif
>> +
>>  /*
>>   * Boot Linux
>>   */
>
> Split the env from this patch into separate one ; merge the rest into the 09/10
> as the SMC device is also a hub etc.

In this case I'd prefer to add support for the hub only in the
previous patch and left the ethernet support on this with the env.

Makes sense?

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
Marek Vasut Jan. 30, 2013, 3:40 p.m. UTC | #3
Dear Otavio Salvador,

> On Wed, Jan 30, 2013 at 12:18 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Otavio Salvador,
> > 
> >> This adds support to the LAN9512 chip included in the board and extend
> >> the environment to easy netboot use.
> >> 
> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >> ---
> >> 
> >>  board/olimex/mx23_olinuxino/mx23_olinuxino.c |  6 +++++
> >>  board/olimex/mx23_olinuxino/spl_boot.c       |  4 +++
> >>  include/configs/mx23_olinuxino.h             | 40
> >> 
> >> +++++++++++++++++++++++++--- 3 files changed, 47 insertions(+), 3
> >> deletions(-)
> >> 
> >> diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> >> b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 2501417..9ed7718
> >> 100644
> >> --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> >> +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> >> @@ -23,6 +23,7 @@
> >> 
> >>   */
> >>  
> >>  #include <common.h>
> >> 
> >> +#include <asm/gpio.h>
> >> 
> >>  #include <asm/io.h>
> >>  #include <asm/arch/iomux-mx23.h>
> >>  #include <asm/arch/imx-regs.h>
> >> 
> >> @@ -45,6 +46,11 @@ int board_early_init_f(void)
> >> 
> >>       /* SSP0 clock at 96MHz */
> >>       mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
> >> 
> >> +#ifdef CONFIG_CMD_USB
> >> +     /* Enable LAN9512 */
> >> +     gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1);
> >> +#endif
> >> +
> >> 
> >>       return 0;
> >>  
> >>  }
> >> 
> >> diff --git a/board/olimex/mx23_olinuxino/spl_boot.c
> >> b/board/olimex/mx23_olinuxino/spl_boot.c index 3bbf5ad..a96c293 100644
> >> --- a/board/olimex/mx23_olinuxino/spl_boot.c
> >> +++ b/board/olimex/mx23_olinuxino/spl_boot.c
> >> @@ -95,6 +95,10 @@ const iomux_cfg_t iomux_setup[] = {
> >> 
> >>       MX23_PAD_SSP1_DATA2__SSP1_DATA2 | MUX_CONFIG_SSP,
> >>       MX23_PAD_SSP1_DATA3__SSP1_DATA3 | MUX_CONFIG_SSP,
> >>       MX23_PAD_SSP1_SCK__SSP1_SCK | MUX_CONFIG_SSP,
> >> 
> >> +
> >> +     /* Ethernet */
> >> +     MX23_PAD_GPMI_ALE__GPIO_0_17 |
> >> +             (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
> >> 
> >>  };
> >>  
> >>  void board_init_ll(void)
> >> 
> >> diff --git a/include/configs/mx23_olinuxino.h
> >> b/include/configs/mx23_olinuxino.h index 7e17809..42de557 100644
> >> --- a/include/configs/mx23_olinuxino.h
> >> +++ b/include/configs/mx23_olinuxino.h
> >> @@ -53,11 +53,13 @@
> >> 
> >>  #define      CONFIG_DOS_PARTITION
> >>  
> >>  #define      CONFIG_CMD_CACHE
> >> 
> >> +#define      CONFIG_CMD_DHCP
> >> 
> >>  #define      CONFIG_CMD_EXT2
> >>  #define      CONFIG_CMD_FAT
> >>  #define      CONFIG_CMD_GPIO
> >>  #define      CONFIG_CMD_LED
> >>  #define      CONFIG_CMD_MMC
> >> 
> >> +#define      CONFIG_CMD_NET
> >> 
> >>  #define      CONFIG_CMD_USB
> >>  
> >>  /*
> >> 
> >> @@ -148,6 +150,12 @@
> >> 
> >>  #define      CONFIG_USB_STORAGE
> >>  #endif
> >> 
> >> +/* Ethernet */
> >> +#ifdef       CONFIG_CMD_NET
> >> +#define      CONFIG_USB_HOST_ETHER
> >> +#define      CONFIG_USB_ETHER_SMSC95XX
> >> +#endif
> >> +
> >> 
> >>  /*
> >>  
> >>   * Boot Linux
> >>   */
> > 
> > Split the env from this patch into separate one ; merge the rest into the
> > 09/10 as the SMC device is also a hub etc.
> 
> In this case I'd prefer to add support for the hub only in the
> previous patch and left the ethernet support on this with the env.
> 
> Makes sense?

The hub and the ethernet are the same chip, thus it makes no sense to have two 
patches for that.

Best regards,
Marek Vasut
Otavio Salvador Jan. 30, 2013, 3:51 p.m. UTC | #4
On Wed, Jan 30, 2013 at 1:40 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Otavio Salvador,
>
>> On Wed, Jan 30, 2013 at 12:18 PM, Marek Vasut <marex@denx.de> wrote:
>> > Dear Otavio Salvador,
>> >
>> >> This adds support to the LAN9512 chip included in the board and extend
>> >> the environment to easy netboot use.
>> >>
>> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> >> ---
>> >>
>> >>  board/olimex/mx23_olinuxino/mx23_olinuxino.c |  6 +++++
>> >>  board/olimex/mx23_olinuxino/spl_boot.c       |  4 +++
>> >>  include/configs/mx23_olinuxino.h             | 40
>> >>
>> >> +++++++++++++++++++++++++--- 3 files changed, 47 insertions(+), 3
>> >> deletions(-)
>> >>
>> >> diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
>> >> b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 2501417..9ed7718
>> >> 100644
>> >> --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
>> >> +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
>> >> @@ -23,6 +23,7 @@
>> >>
>> >>   */
>> >>
>> >>  #include <common.h>
>> >>
>> >> +#include <asm/gpio.h>
>> >>
>> >>  #include <asm/io.h>
>> >>  #include <asm/arch/iomux-mx23.h>
>> >>  #include <asm/arch/imx-regs.h>
>> >>
>> >> @@ -45,6 +46,11 @@ int board_early_init_f(void)
>> >>
>> >>       /* SSP0 clock at 96MHz */
>> >>       mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
>> >>
>> >> +#ifdef CONFIG_CMD_USB
>> >> +     /* Enable LAN9512 */
>> >> +     gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1);
>> >> +#endif
>> >> +
>> >>
>> >>       return 0;
>> >>
>> >>  }
>> >>
>> >> diff --git a/board/olimex/mx23_olinuxino/spl_boot.c
>> >> b/board/olimex/mx23_olinuxino/spl_boot.c index 3bbf5ad..a96c293 100644
>> >> --- a/board/olimex/mx23_olinuxino/spl_boot.c
>> >> +++ b/board/olimex/mx23_olinuxino/spl_boot.c
>> >> @@ -95,6 +95,10 @@ const iomux_cfg_t iomux_setup[] = {
>> >>
>> >>       MX23_PAD_SSP1_DATA2__SSP1_DATA2 | MUX_CONFIG_SSP,
>> >>       MX23_PAD_SSP1_DATA3__SSP1_DATA3 | MUX_CONFIG_SSP,
>> >>       MX23_PAD_SSP1_SCK__SSP1_SCK | MUX_CONFIG_SSP,
>> >>
>> >> +
>> >> +     /* Ethernet */
>> >> +     MX23_PAD_GPMI_ALE__GPIO_0_17 |
>> >> +             (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
>> >>
>> >>  };
>> >>
>> >>  void board_init_ll(void)
>> >>
>> >> diff --git a/include/configs/mx23_olinuxino.h
>> >> b/include/configs/mx23_olinuxino.h index 7e17809..42de557 100644
>> >> --- a/include/configs/mx23_olinuxino.h
>> >> +++ b/include/configs/mx23_olinuxino.h
>> >> @@ -53,11 +53,13 @@
>> >>
>> >>  #define      CONFIG_DOS_PARTITION
>> >>
>> >>  #define      CONFIG_CMD_CACHE
>> >>
>> >> +#define      CONFIG_CMD_DHCP
>> >>
>> >>  #define      CONFIG_CMD_EXT2
>> >>  #define      CONFIG_CMD_FAT
>> >>  #define      CONFIG_CMD_GPIO
>> >>  #define      CONFIG_CMD_LED
>> >>  #define      CONFIG_CMD_MMC
>> >>
>> >> +#define      CONFIG_CMD_NET
>> >>
>> >>  #define      CONFIG_CMD_USB
>> >>
>> >>  /*
>> >>
>> >> @@ -148,6 +150,12 @@
>> >>
>> >>  #define      CONFIG_USB_STORAGE
>> >>  #endif
>> >>
>> >> +/* Ethernet */
>> >> +#ifdef       CONFIG_CMD_NET
>> >> +#define      CONFIG_USB_HOST_ETHER
>> >> +#define      CONFIG_USB_ETHER_SMSC95XX
>> >> +#endif
>> >> +
>> >>
>> >>  /*
>> >>
>> >>   * Boot Linux
>> >>   */
>> >
>> > Split the env from this patch into separate one ; merge the rest into the
>> > 09/10 as the SMC device is also a hub etc.
>>
>> In this case I'd prefer to add support for the hub only in the
>> previous patch and left the ethernet support on this with the env.
>>
>> Makes sense?
>
> The hub and the ethernet are the same chip, thus it makes no sense to have two
> patches for that.

I'd like to have all changes of ethernet in a single commit so the
enviroment and all the other changes for it in one logical change. I
agree about the hub but the ethernet does not seem right to merge it
there.

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
Marek Vasut Jan. 30, 2013, 4:06 p.m. UTC | #5
Dear Otavio Salvador,

[...]

> >> In this case I'd prefer to add support for the hub only in the
> >> previous patch and left the ethernet support on this with the env.
> >> 
> >> Makes sense?
> > 
> > The hub and the ethernet are the same chip, thus it makes no sense to
> > have two patches for that.
> 
> I'd like to have all changes of ethernet in a single commit so the
> enviroment and all the other changes for it in one logical change. I
> agree about the hub but the ethernet does not seem right to merge it
> there.

This will then be completely un-bisectable.

Best regards,
Marek Vasut
Otavio Salvador Jan. 30, 2013, 4:09 p.m. UTC | #6
On Wed, Jan 30, 2013 at 2:06 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Otavio Salvador,
>
> [...]
>
>> >> In this case I'd prefer to add support for the hub only in the
>> >> previous patch and left the ethernet support on this with the env.
>> >>
>> >> Makes sense?
>> >
>> > The hub and the ethernet are the same chip, thus it makes no sense to
>> > have two patches for that.
>>
>> I'd like to have all changes of ethernet in a single commit so the
>> enviroment and all the other changes for it in one logical change. I
>> agree about the hub but the ethernet does not seem right to merge it
>> there.
>
> This will then be completely un-bisectable.

I will prepare the patches for v2 and we check how it goes. :)

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
Marek Vasut Jan. 30, 2013, 4:16 p.m. UTC | #7
Dear Otavio Salvador,

> On Wed, Jan 30, 2013 at 2:06 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Otavio Salvador,
> > 
> > [...]
> > 
> >> >> In this case I'd prefer to add support for the hub only in the
> >> >> previous patch and left the ethernet support on this with the env.
> >> >> 
> >> >> Makes sense?
> >> > 
> >> > The hub and the ethernet are the same chip, thus it makes no sense to
> >> > have two patches for that.
> >> 
> >> I'd like to have all changes of ethernet in a single commit so the
> >> enviroment and all the other changes for it in one logical change. I
> >> agree about the hub but the ethernet does not seem right to merge it
> >> there.
> > 
> > This will then be completely un-bisectable.
> 
> I will prepare the patches for v2 and we check how it goes. :)

Cool your jets already ... re-submit only upon request.

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
index 2501417..9ed7718 100644
--- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
+++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
@@ -23,6 +23,7 @@ 
  */
 
 #include <common.h>
+#include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/iomux-mx23.h>
 #include <asm/arch/imx-regs.h>
@@ -45,6 +46,11 @@  int board_early_init_f(void)
 	/* SSP0 clock at 96MHz */
 	mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
 
+#ifdef CONFIG_CMD_USB
+	/* Enable LAN9512 */
+	gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1);
+#endif
+
 	return 0;
 }
 
diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c
index 3bbf5ad..a96c293 100644
--- a/board/olimex/mx23_olinuxino/spl_boot.c
+++ b/board/olimex/mx23_olinuxino/spl_boot.c
@@ -95,6 +95,10 @@  const iomux_cfg_t iomux_setup[] = {
 	MX23_PAD_SSP1_DATA2__SSP1_DATA2 | MUX_CONFIG_SSP,
 	MX23_PAD_SSP1_DATA3__SSP1_DATA3 | MUX_CONFIG_SSP,
 	MX23_PAD_SSP1_SCK__SSP1_SCK | MUX_CONFIG_SSP,
+
+	/* Ethernet */
+	MX23_PAD_GPMI_ALE__GPIO_0_17 |
+		(MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
 };
 
 void board_init_ll(void)
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h
index 7e17809..42de557 100644
--- a/include/configs/mx23_olinuxino.h
+++ b/include/configs/mx23_olinuxino.h
@@ -53,11 +53,13 @@ 
 #define	CONFIG_DOS_PARTITION
 
 #define	CONFIG_CMD_CACHE
+#define	CONFIG_CMD_DHCP
 #define	CONFIG_CMD_EXT2
 #define	CONFIG_CMD_FAT
 #define	CONFIG_CMD_GPIO
 #define	CONFIG_CMD_LED
 #define	CONFIG_CMD_MMC
+#define	CONFIG_CMD_NET
 #define	CONFIG_CMD_USB
 
 /*
@@ -148,6 +150,12 @@ 
 #define	CONFIG_USB_STORAGE
 #endif
 
+/* Ethernet */
+#ifdef	CONFIG_CMD_NET
+#define	CONFIG_USB_HOST_ETHER
+#define	CONFIG_USB_ETHER_SMSC95XX
+#endif
+
 /*
  * Boot Linux
  */
@@ -173,6 +181,7 @@ 
 /*
  * Extra Environments
  */
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"update_sd_firmware_filename=u-boot.sd\0" \
 	"update_sd_firmware="		/* Update the SD firmware partition */ \
@@ -189,6 +198,7 @@ 
 	"fdt_file=imx23-olinuxino.dtb\0" \
 	"fdt_addr=0x41000000\0" \
 	"boot_fdt=try\0" \
+	"ip_dyn=yes\0" \
 	"mmcdev=0\0" \
 	"mmcpart=2\0" \
 	"mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
@@ -214,6 +224,31 @@ 
 			"fi; " \
 		"else " \
 			"bootm; " \
+		"fi;\0" \
+	"netargs=setenv bootargs console=${console_mainline},${baudrate} " \
+		"root=/dev/nfs " \
+		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
+	"netboot=echo Booting from net ...; " \
+		"usb start; " \
+		"run netargs; "	\
+		"if test ${ip_dyn} = yes; then " \
+			"setenv get_cmd dhcp; " \
+		"else " \
+			"setenv get_cmd tftp; " \
+		"fi; " \
+		"${get_cmd} ${uimage}; " \
+		"if test ${boot_fdt} = yes; then " \
+			"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
+				"bootm ${loadaddr} - ${fdt_addr}; " \
+			"else " \
+				"if test ${boot_fdt} = try; then " \
+					"bootm; " \
+				"else " \
+					"echo WARN: Cannot load the DT; " \
+				"fi;" \
+			"fi; " \
+		"else " \
+			"bootm; " \
 		"fi;\0"
 
 #define CONFIG_BOOTCOMMAND \
@@ -223,10 +258,9 @@ 
 		"else " \
 			"if run loaduimage; then " \
 				"run mmcboot; " \
-			"else " \
-				"echo ERR: Fail to boot from MMC; " \
+			"else run netboot; " \
 			"fi; " \
 		"fi; " \
-	"else exit; fi"
+	"else run netboot; fi"
 
 #endif /* __MX23_OLINUXINO_CONFIG_H__ */