Re: [U-Boot] [PATCH 2/2] kirkwood: Add support for the D-Link DNS-320

2012-07-31 Thread Stefan Herbrechtsmeier

Am 31.07.2012 11:01, schrieb Jamie Lentin:

On Mon, 30 Jul 2012, Prafulla Wadaskar wrote:





-Original Message-
From: Jamie Lentin [mailto:j...@lentin.co.uk]
Sent: 31 July 2012 03:26
To: u-boot@lists.denx.de
Cc: Prafulla Wadaskar; albert.u.b...@aribaud.net;
ub...@lukaperkov.net; Jamie Lentin
Subject: [PATCH 2/2] kirkwood: Add support for the D-Link DNS-320

Extend dnskw to support the D-Link DNS-320 ShareCenter NAS also. For
more
information on this NAS, see:-

  http://jamie.lentin.co.uk/devices/dlink-dns320
  http://dns323.kood.org/dns-320
  http://sharecenter.dlink.com/products/DNS-320

Signed-off-by: Jamie Lentin 
Cc: prafu...@marvell.com
Cc: albert.u.b...@aribaud.net
---
 MAINTAINERS|4 +
 board/d-link/dnskw/dnskw.c |8 +-
 board/d-link/dnskw/dnskw.h |6 +
 board/d-link/dnskw/kwbimage.dns320.cfg |  207

 boards.cfg |1 +
 include/configs/dnskw.h|   10 ++
 6 files changed, 232 insertions(+), 4 deletions(-)
 create mode 100644 board/d-link/dnskw/kwbimage.dns320.cfg

diff --git a/MAINTAINERS b/MAINTAINERS
index fd0c65c..92ede1f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -673,6 +673,10 @@ Igor Grinberg 

 cm-t35ARM ARMV7 (OMAP3xx Soc)

+Jamie Lentin 
+
+dns320ARM926EJS (Kirkwood SoC)
+
 Stefan Herbrechtsmeier 

 dns325ARM926EJS (Kirkwood SoC)
diff --git a/board/d-link/dnskw/dnskw.c b/board/d-link/dnskw/dnskw.c
index d29735c..cd6bfe9 100644
--- a/board/d-link/dnskw/dnskw.c
+++ b/board/d-link/dnskw/dnskw.c
@@ -58,8 +58,8 @@ int board_early_init_f(void)
 MPP10_UART0_TXD,
 MPP11_UART0_RXD,
 MPP12_SD_CLK,
-MPP13_SD_CMD,
-MPP14_SD_D0,
+MPP13_UART1_TXD,/* Custom ...*/
+MPP14_UART1_RXD,/* ... controller */


Are these entries valid for both boards? If not then encapsulate with 
#ifdef


It seems fairly reasonable to---the DNS-325 does not make use of the 
SD interface. Either these pins are unattached or attached to the 
embedded controller in the same way, but the connection is not useful. 
Either way, setting them to UART does not cause any problems on the 
DNS-325.
The DNS-325 has no SD interface. The SD configuration is only the 
default configuration for this pins (compare to other boards). Maybe we 
should change all other SD pins to GPIO to make clear that they are unused.




I could set MPP13_GPIO, MPP14_GPIO for the DNS-325 instead, or just 
not configure them at all (if that is an option).
As MMP14 has a internal pull-up you can configure it as input 
MPP14_UART1_RXD even if it is not connected on the board.



 MPP15_SD_D1,
 MPP16_SD_D2,
 MPP17_SD_D3,
@@ -74,13 +74,13 @@ int board_early_init_f(void)
 MPP26_GPIO,/* power led */
 MPP27_GPIO,/* sata0(right) error led */
 MPP28_GPIO,/* sata1(left) error led */
-MPP29_GPIO,/* usb error led */
+MPP29_GPIO,/* usb error led (dns-325) */


Ditto


Unattached on the DNS-320, so same situation as above.


 MPP30_GPIO,
 MPP31_GPIO,
 MPP32_GPIO,
 MPP33_GPIO,
 MPP34_GPIO,/* power key */
-MPP35_GPIO,
+MPP35_GPIO,/* usb error led (dns-320) */


Ditto


Unattached on the DNS-325, so same situation as above.


 MPP36_GPIO,
 MPP37_GPIO,
 MPP38_GPIO,
diff --git a/board/d-link/dnskw/dnskw.h b/board/d-link/dnskw/dnskw.h
index 4b11cb6..8886050 100644
--- a/board/d-link/dnskw/dnskw.h
+++ b/board/d-link/dnskw/dnskw.h
@@ -43,6 +43,12 @@
 #define DNSKW_OE_VAL_HIGH0x0800/* disable leds */
 #endif /* CONFIG_BOARD_IS_DNS325 */

+/* DNS-320 specific configuration */
+#ifdef CONFIG_BOARD_IS_DNS320
+#define DNSKW_OE_VAL_LOW0x3800/* disable leds */
+#define DNSKW_OE_VAL_HIGH0x0808/* disable leds */
+#endif /* CONFIG_BOARD_IS_DNS320 */
+
 /* PHY related */
 #define MV88E1116_MAC_CTRL_REG21
 #define MV88E1116_PGADR_REG22
diff --git a/board/d-link/dnskw/kwbimage.dns320.cfg b/board/d-
link/dnskw/kwbimage.dns320.cfg
new file mode 100644
index 000..5fb4052
--- /dev/null
+++ b/board/d-link/dnskw/kwbimage.dns320.cfg
@@ -0,0 +1,207 @@
+#
+# Copyright (C) 2012
+# Jamie Lentin 
+#
+# Based on dns325 support:
+# Copyright (C) 2011
+# Stefan Herbrechtsmeier 
+#
+# 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
+# G

Re: [U-Boot] [PATCH 2/2] kirkwood: Add support for the D-Link DNS-320

2012-07-31 Thread Jamie Lentin

On Mon, 30 Jul 2012, Prafulla Wadaskar wrote:





-Original Message-
From: Jamie Lentin [mailto:j...@lentin.co.uk]
Sent: 31 July 2012 03:26
To: u-boot@lists.denx.de
Cc: Prafulla Wadaskar; albert.u.b...@aribaud.net;
ub...@lukaperkov.net; Jamie Lentin
Subject: [PATCH 2/2] kirkwood: Add support for the D-Link DNS-320

Extend dnskw to support the D-Link DNS-320 ShareCenter NAS also. For
more
information on this NAS, see:-

  http://jamie.lentin.co.uk/devices/dlink-dns320
  http://dns323.kood.org/dns-320
  http://sharecenter.dlink.com/products/DNS-320

Signed-off-by: Jamie Lentin 
Cc: prafu...@marvell.com
Cc: albert.u.b...@aribaud.net
---
 MAINTAINERS|4 +
 board/d-link/dnskw/dnskw.c |8 +-
 board/d-link/dnskw/dnskw.h |6 +
 board/d-link/dnskw/kwbimage.dns320.cfg |  207

 boards.cfg |1 +
 include/configs/dnskw.h|   10 ++
 6 files changed, 232 insertions(+), 4 deletions(-)
 create mode 100644 board/d-link/dnskw/kwbimage.dns320.cfg

diff --git a/MAINTAINERS b/MAINTAINERS
index fd0c65c..92ede1f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -673,6 +673,10 @@ Igor Grinberg 

cm-t35  ARM ARMV7 (OMAP3xx Soc)

+Jamie Lentin 
+
+   dns320  ARM926EJS (Kirkwood SoC)
+
 Stefan Herbrechtsmeier 

dns325  ARM926EJS (Kirkwood SoC)
diff --git a/board/d-link/dnskw/dnskw.c b/board/d-link/dnskw/dnskw.c
index d29735c..cd6bfe9 100644
--- a/board/d-link/dnskw/dnskw.c
+++ b/board/d-link/dnskw/dnskw.c
@@ -58,8 +58,8 @@ int board_early_init_f(void)
MPP10_UART0_TXD,
MPP11_UART0_RXD,
MPP12_SD_CLK,
-   MPP13_SD_CMD,
-   MPP14_SD_D0,
+   MPP13_UART1_TXD,/* Custom ...*/
+   MPP14_UART1_RXD,/* ... controller */


Are these entries valid for both boards? If not then encapsulate with #ifdef


It seems fairly reasonable to---the DNS-325 does not make use of the SD 
interface. Either these pins are unattached or attached to the embedded 
controller in the same way, but the connection is not useful. Either way, 
setting them to UART does not cause any problems on the DNS-325.


I could set MPP13_GPIO, MPP14_GPIO for the DNS-325 instead, or just not 
configure them at all (if that is an option).



MPP15_SD_D1,
MPP16_SD_D2,
MPP17_SD_D3,
@@ -74,13 +74,13 @@ int board_early_init_f(void)
MPP26_GPIO, /* power led */
MPP27_GPIO, /* sata0(right) error led */
MPP28_GPIO, /* sata1(left) error led */
-   MPP29_GPIO, /* usb error led */
+   MPP29_GPIO, /* usb error led (dns-325) */


Ditto


Unattached on the DNS-320, so same situation as above.


MPP30_GPIO,
MPP31_GPIO,
MPP32_GPIO,
MPP33_GPIO,
MPP34_GPIO, /* power key */
-   MPP35_GPIO,
+   MPP35_GPIO, /* usb error led (dns-320) */


Ditto


Unattached on the DNS-325, so same situation as above.


MPP36_GPIO,
MPP37_GPIO,
MPP38_GPIO,
diff --git a/board/d-link/dnskw/dnskw.h b/board/d-link/dnskw/dnskw.h
index 4b11cb6..8886050 100644
--- a/board/d-link/dnskw/dnskw.h
+++ b/board/d-link/dnskw/dnskw.h
@@ -43,6 +43,12 @@
 #define DNSKW_OE_VAL_HIGH  0x0800  /* disable leds */
 #endif /* CONFIG_BOARD_IS_DNS325 */

+/* DNS-320 specific configuration */
+#ifdef CONFIG_BOARD_IS_DNS320
+#define DNSKW_OE_VAL_LOW   0x3800  /* disable leds */
+#define DNSKW_OE_VAL_HIGH  0x0808  /* disable leds */
+#endif /* CONFIG_BOARD_IS_DNS320 */
+
 /* PHY related */
 #define MV88E1116_MAC_CTRL_REG 21
 #define MV88E1116_PGADR_REG22
diff --git a/board/d-link/dnskw/kwbimage.dns320.cfg b/board/d-
link/dnskw/kwbimage.dns320.cfg
new file mode 100644
index 000..5fb4052
--- /dev/null
+++ b/board/d-link/dnskw/kwbimage.dns320.cfg
@@ -0,0 +1,207 @@
+#
+# Copyright (C) 2012
+# Jamie Lentin 
+#
+# Based on dns325 support:
+# Copyright (C) 2011
+# Stefan Herbrechtsmeier 
+#
+# 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
+# alo

Re: [U-Boot] [PATCH 2/2] kirkwood: Add support for the D-Link DNS-320

2012-07-30 Thread Prafulla Wadaskar


> -Original Message-
> From: Jamie Lentin [mailto:j...@lentin.co.uk]
> Sent: 31 July 2012 03:26
> To: u-boot@lists.denx.de
> Cc: Prafulla Wadaskar; albert.u.b...@aribaud.net;
> ub...@lukaperkov.net; Jamie Lentin
> Subject: [PATCH 2/2] kirkwood: Add support for the D-Link DNS-320
> 
> Extend dnskw to support the D-Link DNS-320 ShareCenter NAS also. For
> more
> information on this NAS, see:-
> 
>   http://jamie.lentin.co.uk/devices/dlink-dns320
>   http://dns323.kood.org/dns-320
>   http://sharecenter.dlink.com/products/DNS-320
> 
> Signed-off-by: Jamie Lentin 
> Cc: prafu...@marvell.com
> Cc: albert.u.b...@aribaud.net
> ---
>  MAINTAINERS|4 +
>  board/d-link/dnskw/dnskw.c |8 +-
>  board/d-link/dnskw/dnskw.h |6 +
>  board/d-link/dnskw/kwbimage.dns320.cfg |  207
> 
>  boards.cfg |1 +
>  include/configs/dnskw.h|   10 ++
>  6 files changed, 232 insertions(+), 4 deletions(-)
>  create mode 100644 board/d-link/dnskw/kwbimage.dns320.cfg
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index fd0c65c..92ede1f 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -673,6 +673,10 @@ Igor Grinberg 
> 
>   cm-t35  ARM ARMV7 (OMAP3xx Soc)
> 
> +Jamie Lentin 
> +
> + dns320  ARM926EJS (Kirkwood SoC)
> +
>  Stefan Herbrechtsmeier 
> 
>   dns325  ARM926EJS (Kirkwood SoC)
> diff --git a/board/d-link/dnskw/dnskw.c b/board/d-link/dnskw/dnskw.c
> index d29735c..cd6bfe9 100644
> --- a/board/d-link/dnskw/dnskw.c
> +++ b/board/d-link/dnskw/dnskw.c
> @@ -58,8 +58,8 @@ int board_early_init_f(void)
>   MPP10_UART0_TXD,
>   MPP11_UART0_RXD,
>   MPP12_SD_CLK,
> - MPP13_SD_CMD,
> - MPP14_SD_D0,
> + MPP13_UART1_TXD,/* Custom ...*/
> + MPP14_UART1_RXD,/* ... controller */

Are these entries valid for both boards? If not then encapsulate with #ifdef

>   MPP15_SD_D1,
>   MPP16_SD_D2,
>   MPP17_SD_D3,
> @@ -74,13 +74,13 @@ int board_early_init_f(void)
>   MPP26_GPIO, /* power led */
>   MPP27_GPIO, /* sata0(right) error led */
>   MPP28_GPIO, /* sata1(left) error led */
> - MPP29_GPIO, /* usb error led */
> + MPP29_GPIO, /* usb error led (dns-325) */

Ditto

>   MPP30_GPIO,
>   MPP31_GPIO,
>   MPP32_GPIO,
>   MPP33_GPIO,
>   MPP34_GPIO, /* power key */
> - MPP35_GPIO,
> + MPP35_GPIO, /* usb error led (dns-320) */

Ditto

>   MPP36_GPIO,
>   MPP37_GPIO,
>   MPP38_GPIO,
> diff --git a/board/d-link/dnskw/dnskw.h b/board/d-link/dnskw/dnskw.h
> index 4b11cb6..8886050 100644
> --- a/board/d-link/dnskw/dnskw.h
> +++ b/board/d-link/dnskw/dnskw.h
> @@ -43,6 +43,12 @@
>  #define DNSKW_OE_VAL_HIGH0x0800  /* disable leds */
>  #endif /* CONFIG_BOARD_IS_DNS325 */
> 
> +/* DNS-320 specific configuration */
> +#ifdef CONFIG_BOARD_IS_DNS320
> +#define DNSKW_OE_VAL_LOW 0x3800  /* disable leds */
> +#define DNSKW_OE_VAL_HIGH0x0808  /* disable leds */
> +#endif /* CONFIG_BOARD_IS_DNS320 */
> +
>  /* PHY related */
>  #define MV88E1116_MAC_CTRL_REG   21
>  #define MV88E1116_PGADR_REG  22
> diff --git a/board/d-link/dnskw/kwbimage.dns320.cfg b/board/d-
> link/dnskw/kwbimage.dns320.cfg
> new file mode 100644
> index 000..5fb4052
> --- /dev/null
> +++ b/board/d-link/dnskw/kwbimage.dns320.cfg
> @@ -0,0 +1,207 @@
> +#
> +# Copyright (C) 2012
> +# Jamie Lentin 
> +#
> +# Based on dns325 support:
> +# Copyright (C) 2011
> +# Stefan Herbrechtsmeier 
> +#
> +# 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., 51 Franklin Street, Fifth Floor, Boston,
> +# MA 02110-1301 USA
> +#
> +# Refer docs/README.kwimage for more details about how-to configure
> +# and create kirkwood boot image
> +#
> +
> +# Boot Media configurations
> +BOOT_FROMnand
> +NAND_ECC_MODEdefault
> +NAND_PAGE_SIZE   0x0800
> +
> +# SOC

[U-Boot] [PATCH 2/2] kirkwood: Add support for the D-Link DNS-320

2012-07-30 Thread Jamie Lentin
Extend dnskw to support the D-Link DNS-320 ShareCenter NAS also. For more
information on this NAS, see:-

  http://jamie.lentin.co.uk/devices/dlink-dns320
  http://dns323.kood.org/dns-320
  http://sharecenter.dlink.com/products/DNS-320

Signed-off-by: Jamie Lentin 
Cc: prafu...@marvell.com
Cc: albert.u.b...@aribaud.net
---
 MAINTAINERS|4 +
 board/d-link/dnskw/dnskw.c |8 +-
 board/d-link/dnskw/dnskw.h |6 +
 board/d-link/dnskw/kwbimage.dns320.cfg |  207 
 boards.cfg |1 +
 include/configs/dnskw.h|   10 ++
 6 files changed, 232 insertions(+), 4 deletions(-)
 create mode 100644 board/d-link/dnskw/kwbimage.dns320.cfg

diff --git a/MAINTAINERS b/MAINTAINERS
index fd0c65c..92ede1f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -673,6 +673,10 @@ Igor Grinberg 
 
cm-t35  ARM ARMV7 (OMAP3xx Soc)
 
+Jamie Lentin 
+
+   dns320  ARM926EJS (Kirkwood SoC)
+
 Stefan Herbrechtsmeier 
 
dns325  ARM926EJS (Kirkwood SoC)
diff --git a/board/d-link/dnskw/dnskw.c b/board/d-link/dnskw/dnskw.c
index d29735c..cd6bfe9 100644
--- a/board/d-link/dnskw/dnskw.c
+++ b/board/d-link/dnskw/dnskw.c
@@ -58,8 +58,8 @@ int board_early_init_f(void)
MPP10_UART0_TXD,
MPP11_UART0_RXD,
MPP12_SD_CLK,
-   MPP13_SD_CMD,
-   MPP14_SD_D0,
+   MPP13_UART1_TXD,/* Custom ...*/
+   MPP14_UART1_RXD,/* ... controller */
MPP15_SD_D1,
MPP16_SD_D2,
MPP17_SD_D3,
@@ -74,13 +74,13 @@ int board_early_init_f(void)
MPP26_GPIO, /* power led */
MPP27_GPIO, /* sata0(right) error led */
MPP28_GPIO, /* sata1(left) error led */
-   MPP29_GPIO, /* usb error led */
+   MPP29_GPIO, /* usb error led (dns-325) */
MPP30_GPIO,
MPP31_GPIO,
MPP32_GPIO,
MPP33_GPIO,
MPP34_GPIO, /* power key */
-   MPP35_GPIO,
+   MPP35_GPIO, /* usb error led (dns-320) */
MPP36_GPIO,
MPP37_GPIO,
MPP38_GPIO,
diff --git a/board/d-link/dnskw/dnskw.h b/board/d-link/dnskw/dnskw.h
index 4b11cb6..8886050 100644
--- a/board/d-link/dnskw/dnskw.h
+++ b/board/d-link/dnskw/dnskw.h
@@ -43,6 +43,12 @@
 #define DNSKW_OE_VAL_HIGH  0x0800  /* disable leds */
 #endif /* CONFIG_BOARD_IS_DNS325 */
 
+/* DNS-320 specific configuration */
+#ifdef CONFIG_BOARD_IS_DNS320
+#define DNSKW_OE_VAL_LOW   0x3800  /* disable leds */
+#define DNSKW_OE_VAL_HIGH  0x0808  /* disable leds */
+#endif /* CONFIG_BOARD_IS_DNS320 */
+
 /* PHY related */
 #define MV88E1116_MAC_CTRL_REG 21
 #define MV88E1116_PGADR_REG22
diff --git a/board/d-link/dnskw/kwbimage.dns320.cfg 
b/board/d-link/dnskw/kwbimage.dns320.cfg
new file mode 100644
index 000..5fb4052
--- /dev/null
+++ b/board/d-link/dnskw/kwbimage.dns320.cfg
@@ -0,0 +1,207 @@
+#
+# Copyright (C) 2012
+# Jamie Lentin 
+#
+# Based on dns325 support:
+# Copyright (C) 2011
+# Stefan Herbrechtsmeier 
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+# Refer docs/README.kwimage for more details about how-to configure
+# and create kirkwood boot image
+#
+
+# Boot Media configurations
+BOOT_FROM  nand
+NAND_ECC_MODE  default
+NAND_PAGE_SIZE 0x0800
+
+# SOC registers configuration using bootrom header extension
+# Maximum KWBIMAGE_MAX_CONFIG configurations allowed
+
+# Configure RGMII-0 interface pad voltage to 1.8V
+DATA 0xFFD100e0 0x1b1b1b9b
+
+#Dram initalization for SINGLE x16 CL=3 @ 200MHz
+DATA 0xFFD01400 0x43000618 # DDR Configuration register
+# bit13-0:  0x618 DDR2 clks refresh rate
+# bit23-14: 0 required
+# bit24:1 enable exit self refresh mode on DDR access
+# bit25:1 required
+# bit29-26: 0 required
+# bit31-30: 0b01 required
+
+DATA 0xFFD01404 0x35143000 # DDR Controller Control Low
+# bit3-0:   0 required
+

[U-Boot] [PATCH 2/2] kirkwood: Add support for the D-Link DNS-320

2012-05-01 Thread Jamie Lentin
Extend dnskw to support the D-Link DNS-320 ShareCenter NAS also. For more
information on this NAS, see:-

  http://jamie.lentin.co.uk/devices/dlink-dns320
  http://dns323.kood.org/dns-320
  http://sharecenter.dlink.com/products/DNS-320

Signed-off-by: Jamie Lentin 
Cc: prafu...@marvell.com
Cc: albert.u.b...@aribaud.net
---
 MAINTAINERS|4 +
 board/d-link/dnskw/dnskw.c |8 +-
 board/d-link/dnskw/dnskw.h |6 +
 board/d-link/dnskw/kwbimage.dns320.cfg |  207 
 boards.cfg |1 +
 include/configs/dnskw.h|   10 ++
 6 files changed, 232 insertions(+), 4 deletions(-)
 create mode 100644 board/d-link/dnskw/kwbimage.dns320.cfg

diff --git a/MAINTAINERS b/MAINTAINERS
index 708ded7..0da6384 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -669,6 +669,10 @@ Igor Grinberg 
 
cm-t35  ARM ARMV7 (OMAP3xx Soc)
 
+Jamie Lentin 
+
+   dns320  ARM926EJS (Kirkwood SoC)
+
 Stefan Herbrechtsmeier 
 
dns325  ARM926EJS (Kirkwood SoC)
diff --git a/board/d-link/dnskw/dnskw.c b/board/d-link/dnskw/dnskw.c
index 28ce1ba..0c0a754 100644
--- a/board/d-link/dnskw/dnskw.c
+++ b/board/d-link/dnskw/dnskw.c
@@ -58,8 +58,8 @@ int board_early_init_f(void)
MPP10_UART0_TXD,
MPP11_UART0_RXD,
MPP12_SD_CLK,
-   MPP13_SD_CMD,
-   MPP14_SD_D0,
+   MPP13_UART1_TXD,/* Custom ...*/
+   MPP14_UART1_RXD,/* ... controller */
MPP15_SD_D1,
MPP16_SD_D2,
MPP17_SD_D3,
@@ -74,13 +74,13 @@ int board_early_init_f(void)
MPP26_GPIO, /* power led */
MPP27_GPIO, /* sata0(right) error led */
MPP28_GPIO, /* sata1(left) error led */
-   MPP29_GPIO, /* usb error led */
+   MPP29_GPIO, /* usb error led (dns-325) */
MPP30_GPIO,
MPP31_GPIO,
MPP32_GPIO,
MPP33_GPIO,
MPP34_GPIO, /* power key */
-   MPP35_GPIO,
+   MPP35_GPIO, /* usb error led (dns-320) */
MPP36_GPIO,
MPP37_GPIO,
MPP38_GPIO,
diff --git a/board/d-link/dnskw/dnskw.h b/board/d-link/dnskw/dnskw.h
index 4b11cb6..8886050 100644
--- a/board/d-link/dnskw/dnskw.h
+++ b/board/d-link/dnskw/dnskw.h
@@ -43,6 +43,12 @@
 #define DNSKW_OE_VAL_HIGH  0x0800  /* disable leds */
 #endif /* CONFIG_BOARD_IS_DNS325 */
 
+/* DNS-320 specific configuration */
+#ifdef CONFIG_BOARD_IS_DNS320
+#define DNSKW_OE_VAL_LOW   0x3800  /* disable leds */
+#define DNSKW_OE_VAL_HIGH  0x0808  /* disable leds */
+#endif /* CONFIG_BOARD_IS_DNS320 */
+
 /* PHY related */
 #define MV88E1116_MAC_CTRL_REG 21
 #define MV88E1116_PGADR_REG22
diff --git a/board/d-link/dnskw/kwbimage.dns320.cfg 
b/board/d-link/dnskw/kwbimage.dns320.cfg
new file mode 100644
index 000..5fb4052
--- /dev/null
+++ b/board/d-link/dnskw/kwbimage.dns320.cfg
@@ -0,0 +1,207 @@
+#
+# Copyright (C) 2012
+# Jamie Lentin 
+#
+# Based on dns325 support:
+# Copyright (C) 2011
+# Stefan Herbrechtsmeier 
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+# Refer docs/README.kwimage for more details about how-to configure
+# and create kirkwood boot image
+#
+
+# Boot Media configurations
+BOOT_FROM  nand
+NAND_ECC_MODE  default
+NAND_PAGE_SIZE 0x0800
+
+# SOC registers configuration using bootrom header extension
+# Maximum KWBIMAGE_MAX_CONFIG configurations allowed
+
+# Configure RGMII-0 interface pad voltage to 1.8V
+DATA 0xFFD100e0 0x1b1b1b9b
+
+#Dram initalization for SINGLE x16 CL=3 @ 200MHz
+DATA 0xFFD01400 0x43000618 # DDR Configuration register
+# bit13-0:  0x618 DDR2 clks refresh rate
+# bit23-14: 0 required
+# bit24:1 enable exit self refresh mode on DDR access
+# bit25:1 required
+# bit29-26: 0 required
+# bit31-30: 0b01 required
+
+DATA 0xFFD01404 0x35143000 # DDR Controller Control Low
+# bit3-0:   0 required
+