Skip to contentSkip to conversation

kirkwood: add NAS62x0 board support

PATCH Superseded Luka Perkov 4 participants 6 messages Apr 17, 2012 – Jun 2, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v8 1/1 kirkwood: add NAS62x0 board support

Add support for new boards RaidSonic ICY BOX NAS6210 and NAS6220.

NAS6210 has 1 SATA and 1 eSATA port while NAS6220 has 2 SATA ports.

More information about the boards can be found here:

http://www.raidsonic.de/en/products/nas-systems.php?we_objectID=7036
http://www.raidsonic.de/en/products/nas-systems.php?we_objectID=7515

---

Changes from version v1:

* use tools/checkpatch.pl to locate patch errors and fix them
* add two entries in boards.cfg, one for each board
* fixed CONFIG_RESET_PHY_R
* don't define values for macros that enable features only
* remove static RAM configuration
* fix comments
* use only CONFIG_ENV_OFFSET and remove CONFIG_ENV_ADDR
* clean coding style
* add entry in MAINTAINERS file

Changes from version v2:

* use defined() in macros for board selection for robustness

Changes from version v3:

* don't use utf8 for Geralds name
* don't mix upper/lower case in kwbimage.cfg
* fix prompt

Changes from version v4:
* fix board Makefile (clean and distclean)
* use generic way to handle arch number of the board
* fix MAINTAINERS file
* move code from Marvell to raidsonic folder
* use CONFIG_MACH_TYPE
* set only necessary GPIOs
* use link instead of address for license
* add few links about board being supported for quick reference
* add previous change logs
* multiple updates to kwbimage.cfg, thank you Simon

Changes from version v5:
* remove typo from kwbimage.cfg (duplicated lines), thank you David
* clean up comments in kwbimage.cfg

Changes from version v6:
* replace KW_SATA_PORT0_OFFSET with MV_SATA_PORT0_OFFSET
* change commit message

Changes from version v7:
* use same config for both boards, because fix for second SATA or eSATA port is here:

http://lists.denx.de/pipermail/u-boot/2012-April/122594.html

Without that patch uboot *will* work.

* change some files because of the above

 MAINTAINERS                         |    4 +
 board/raidsonic/ib62x0/Makefile     |   43 +++++++++
 board/raidsonic/ib62x0/ib62x0.c     |   79 ++++++++++++++++
 board/raidsonic/ib62x0/ib62x0.h     |   40 +++++++++
 board/raidsonic/ib62x0/kwbimage.cfg |  169 +++++++++++++++++++++++++++++++++++
 boards.cfg                          |    1 +
 include/configs/ib62x0.h            |  152 +++++++++++++++++++++++++++++++
 8 files changed, 489 insertions(+), 1 deletion(-)
MAINTAINERS +4 -0
index 708ded7..9d2aba7 100644
@@ -777,6 +777,10 @@ Linus Walleij <[email protected]>
 	integratorap	various
 	integratorcp	various
 
+Luka Perkov <[email protected]>
+
+	ib62x0		ARM926EJS
+
 Dave Peverley <[email protected]>
 
 	omap730p2	ARM926EJS
board/raidsonic/ib62x0/Makefile new file +43 -0

43 lines not on this page · raw message

board/raidsonic/ib62x0/ib62x0.c new file +79 -0

79 lines not on this page · raw message

board/raidsonic/ib62x0/ib62x0.h new file +40 -0
new file mode 100644
index 0000000..0c30690
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011-2012
+ * Gerald Kerma <[email protected]>
+ * Simon Baatz <[email protected]>
+ * Luka Perkov <[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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __IB62x0_H
+#define __IB62x0_H
+
+#define IB62x0_OE_LOW		(~(1 << 22 | 1 << 24 | 1 << 25 | 1 << 27))
+#define IB62x0_OE_HIGH		(~(0))
+#define IB62x0_OE_VAL_LOW	0
+#define IB62x0_OE_VAL_HIGH	0
+
+/* PHY related */
+#define MV88E1116_LED_FCTRL_REG		10
+#define MV88E1116_CPRSP_CR3_REG		21
+#define MV88E1116_MAC_CTRL_REG		21
+#define MV88E1116_PGADR_REG		22
+#define MV88E1116_RGMII_TXTM_CTRL	(1 << 4)
+#define MV88E1116_RGMII_RXTM_CTRL	(1 << 5)
+
+#endif /* __IB62x0_H */
board/raidsonic/ib62x0/kwbimage.cfg new file +169 -0

169 lines not on this page · raw message

boards.cfg +1 -0
index 3cf75c3..23f84e8 100644
@@ -153,6 +153,7 @@ openrd_client                arm         arm926ejs   openrd              Marvell
 openrd_ultimate              arm         arm926ejs   openrd              Marvell        kirkwood        openrd:BOARD_IS_OPENRD_ULTIMATE
 rd6281a                      arm         arm926ejs   -                   Marvell        kirkwood
 sheevaplug                   arm         arm926ejs   -                   Marvell        kirkwood
+ib62x0                       arm         arm926ejs   ib62x0              raidsonic      kirkwood
 dockstar                     arm         arm926ejs   -                   Seagate        kirkwood
 jadecpu                      arm         arm926ejs   jadecpu             syteco         mb86r0x
 mx25pdk                      arm         arm926ejs   mx25pdk             freescale      mx25		mx25pdk:IMX_CONFIG=board/freescale/mx25pdk/imximage.cfg
include/configs/ib62x0.h new file +152 -0

152 lines not on this page · raw message

#1 lore raw

PATCH v8 1/1 kirkwood: add NAS62x0 board support

Quoted 78 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Luka Perkov
Sent: 18 April 2012 00:52
To: u-boot at lists.denx.de
Cc: dreagle at doukki.net
Subject: [U-Boot] [PATCH v8] kirkwood: add NAS62x0 board support

Add support for new boards RaidSonic ICY BOX NAS6210 and NAS6220.

NAS6210 has 1 SATA and 1 eSATA port while NAS6220 has 2 SATA ports.

More information about the boards can be found here:

http://www.raidsonic.de/en/products/nas-systems.php?we_objectID=7036
http://www.raidsonic.de/en/products/nas-systems.php?we_objectID=7515

---

Changes from version v1:

* use tools/checkpatch.pl to locate patch errors and fix them
* add two entries in boards.cfg, one for each board
* fixed CONFIG_RESET_PHY_R
* don't define values for macros that enable features only
* remove static RAM configuration
* fix comments
* use only CONFIG_ENV_OFFSET and remove CONFIG_ENV_ADDR
* clean coding style
* add entry in MAINTAINERS file

Changes from version v2:

* use defined() in macros for board selection for robustness

Changes from version v3:

* don't use utf8 for Geralds name
* don't mix upper/lower case in kwbimage.cfg
* fix prompt

Changes from version v4:
* fix board Makefile (clean and distclean)
* use generic way to handle arch number of the board
* fix MAINTAINERS file
* move code from Marvell to raidsonic folder
* use CONFIG_MACH_TYPE
* set only necessary GPIOs
* use link instead of address for license
* add few links about board being supported for quick reference
* add previous change logs
* multiple updates to kwbimage.cfg, thank you Simon

Changes from version v5:
* remove typo from kwbimage.cfg (duplicated lines), thank you David
* clean up comments in kwbimage.cfg

Changes from version v6:
* replace KW_SATA_PORT0_OFFSET with MV_SATA_PORT0_OFFSET
* change commit message

Changes from version v7:
* use same config for both boards, because fix for second SATA or
eSATA port
is here:

http://lists.denx.de/pipermail/u-boot/2012-April/122594.html

Without that patch uboot *will* work.

* change some files because of the above

Quoted 11 lines
 MAINTAINERS                         |    4 +
 board/raidsonic/ib62x0/Makefile     |   43 +++++++++
 board/raidsonic/ib62x0/ib62x0.c     |   79 ++++++++++++++++
 board/raidsonic/ib62x0/ib62x0.h     |   40 +++++++++
 board/raidsonic/ib62x0/kwbimage.cfg |  169
+++++++++++++++++++++++++++++++++++
 boards.cfg                          |    1 +
 include/configs/ib62x0.h            |  152
+++++++++++++++++++++++++++++++
 8 files changed, 489 insertions(+), 1 deletion(-)

Applied to u-boot-marvell.git master branch

Regards..
Prafulla . . .

#2 lore raw

PATCH v8 1/1 kirkwood: add NAS62x0 board support

In reply to Luka Perkov

Hi Luka,

Am Dienstag 17 April 2012, 21:22:17 schrieb Luka Perkov:

include/configs/ib62x0.h line 42

Quoted 4 lines
include/configs/ib62x0.h new file +4 -0
+/*
+ * Machine type
+ */
+#define CONFIG_MACH_TYPE	MACH_TYPE_NAS6210

btw i guess this will break in about half a year. because:
- uboot follows mach-types.h from the kernel
- the kernel will only keep mach-types for boards which are supported by the kernel AND using the old-style machine init, that is no boards with no device tree support for booting.
- no old style machine setups are accepted for kirkwood platforms anymore.

that means at some point of time in the future MACH_TYPE_NAS6210 wont be defined anymore ;)

just wanted to letting you know.

Signature · 1 line
michael
#3 lore raw

PATCH v8 1/1 kirkwood: add NAS62x0 board support

Hi Michael,

Quoted 12 lines · Michael Walle

include/configs/ib62x0.h line 42

Quoted 4 lines
include/configs/ib62x0.h new file +4 -0
+/*
+ * Machine type
+ */
+#define CONFIG_MACH_TYPE	MACH_TYPE_NAS6210

btw i guess this will break in about half a year. because:
- uboot follows mach-types.h from the kernel
- the kernel will only keep mach-types for boards which are supported by the kernel AND using the old-style machine init, that is no boards with no device tree support for booting.
- no old style machine setups are accepted for kirkwood platforms anymore.

Quoted 4 lines

that means at some point of time in the future MACH_TYPE_NAS6210 wont be defined anymore ;)

just wanted to letting you know.

I'm aware of that :)

This board is already accepted upstream, for more info look here:

commit f6a26ae7699416d86bea8cb68ce413571e9cab3c
Merge: cdd3a35 48a5765
Author: Linus Torvalds <[email protected]>
Date: Tue May 22 13:32:53 2012 -0700

Once 3.5 is out we'll patch uboot. Simon is the one that pushed support for this board upstream using device tree. Thanks Simon.

Luka

#4 lore raw

PATCH v8 1/1 kirkwood: add NAS62x0 board support

Dear Luka Perkov,

Quoted 28 lines

Hi Michael,

Quoted 13 lines · Michael Walle

include/configs/ib62x0.h line 42

Quoted 4 lines
include/configs/ib62x0.h new file +4 -0
+/*
+ * Machine type
+ */
+#define CONFIG_MACH_TYPE	MACH_TYPE_NAS6210

btw i guess this will break in about half a year. because:
- uboot follows mach-types.h from the kernel
- the kernel will only keep mach-types for boards which are supported by the

kernel AND using the old-style machine init, that is no boards with no device tree support for booting.

Quoted 7 lines

- no old style machine setups are accepted for kirkwood platforms anymore.

that means at some point of time in the future MACH_TYPE_NAS6210 wont be defined anymore ;)

just wanted to letting you know.

I'm aware of that :)

This board is already accepted upstream, for more info look here:

Quoted 7 lines

commit f6a26ae7699416d86bea8cb68ce413571e9cab3c
Merge: cdd3a35 48a5765
Author: Linus Torvalds <[email protected]>
Date: Tue May 22 13:32:53 2012 -0700

Once 3.5 is out we'll patch uboot. Simon is the one that pushed support for this board upstream using device tree. Thanks Simon.

Why would you wait for 3.5 ? You can use -next .

Quoted 1 line

Luka

Best regards,
Marek Vasut

#5 lore raw

PATCH v8 1/1 kirkwood: add NAS62x0 board support

Hi Marek,

Quoted 31 lines · Marek Vasut
Quoted 31 lines · Michael Walle
Quoted 13 lines

include/configs/ib62x0.h line 42

Quoted 4 lines
include/configs/ib62x0.h new file +4 -0
+/*
+ * Machine type
+ */
+#define CONFIG_MACH_TYPE	MACH_TYPE_NAS6210

btw i guess this will break in about half a year. because:
- uboot follows mach-types.h from the kernel
- the kernel will only keep mach-types for boards which are supported by the

kernel AND using the old-style machine init, that is no boards with no device tree support for booting.

Quoted 7 lines

- no old style machine setups are accepted for kirkwood platforms anymore.

that means at some point of time in the future MACH_TYPE_NAS6210 wont be defined anymore ;)

just wanted to letting you know.

I'm aware of that :)

This board is already accepted upstream, for more info look here:

commit f6a26ae7699416d86bea8cb68ce413571e9cab3c
Merge: cdd3a35 48a5765
Author: Linus Torvalds <[email protected]>
Date: Tue May 22 13:32:53 2012 -0700

Quoted 4 lines
Quoted 2 lines

Once 3.5 is out we'll patch uboot. Simon is the one that pushed support for this board upstream using device tree. Thanks Simon.

Why would you wait for 3.5 ? You can use -next .

I know. I'm busy with other stuff ;)

Regards,
Luka