Skip to contentSkip to conversation

add new board nas62x0

PATCH Superseded Luka Perkov 3 participants 5 messages Mar 15, 2012 – Mar 16, 2012

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add new board nas62x0

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

Only difference between boards is number of SATA ports. By default we use only one SATA port. In order to use both SATA ports on NAS6220 define CONFIG_NAS6220 in board config file.

---

If you want to test the boot loader without touching nand you can boot u-boot using UART. In order to create UART image you need to change image configuration from nand to uart:

sed -i 's/nand/uart/' board/Marvell/ib62x0/kwbimage.cfg

To boot your kirkwood board from UART you will need this tool:

http://www.solinno.co.uk/public/kwuartboot/
http://www.solinno.co.uk/public/kwuartboot/kwuartboot-0.1.tar.gz

Compile and run it like this:

./kwuartboot /dev/ttyUSB0 /path/to/u-boot.kwb

And when it's finished open the console.

board/Marvell/ib62x0/Makefile new file +51 -0
new file mode 100644
index 0000000..3d82f27
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor <www.marvell.com>
+# Written-by: Prafulla Wadaskar <[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., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).o
+
+COBJS	:= ib62x0.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/Marvell/ib62x0/ib62x0.c new file +122 -0

122 lines not on this page · raw message

board/Marvell/ib62x0/ib62x0.h new file +41 -0

41 lines not on this page · raw message

board/Marvell/ib62x0/kwbimage.cfg new file +167 -0

167 lines not on this page · raw message

boards.cfg +1 -0
index 28cc345..8fc87d6 100644
@@ -147,6 +147,7 @@ netspace_max_v2              arm         arm926ejs   netspace_v2         LaCie
 netspace_v2                  arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:NETSPACE_V2
 dreamplug                    arm         arm926ejs   -                   Marvell        kirkwood
 guruplug                     arm         arm926ejs   -                   Marvell        kirkwood
+ib62x0                       arm         arm926ejs   -                   Marvell        kirkwood
 mv88f6281gtw_ge              arm         arm926ejs   -                   Marvell        kirkwood
 openrd_base                  arm         arm926ejs   openrd              Marvell        kirkwood        openrd:BOARD_IS_OPENRD_BASE
 openrd_client                arm         arm926ejs   openrd              Marvell        kirkwood        openrd:BOARD_IS_OPENRD_CLIENT
include/configs/ib62x0.h new file +193 -0

193 lines not on this page · raw message

#1 lore raw

PATCH 1/1 add new board nas62x0

Hi all,

may be it can be also imported in debian-uboot package ?

more available at :
https://doukki.net/doku.php?id=wiki:notes:ib-nas6220-b

Le 16/03/2012 00:59, Luka Perkov a ?crit :

Quoted 18 lines

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

Only difference between boards is number of SATA ports. By default we use only one SATA port. In order to use both SATA ports on NAS6220 define CONFIG_NAS6220 in board config file.

---

If you want to test the boot loader without touching nand you can boot u-boot using UART. In order to create UART image you need to change image configuration from nand to uart:

sed -i 's/nand/uart/' board/Marvell/ib62x0/kwbimage.cfg

To boot your kirkwood board from UART you will need this tool:

Quoted 9 lines

http://www.solinno.co.uk/public/kwuartboot/
http://www.solinno.co.uk/public/kwuartboot/kwuartboot-0.1.tar.gz

Compile and run it like this:

./kwuartboot /dev/ttyUSB0 /path/to/u-boot.kwb

And when it's finished open the console.

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

Only difference between boards is number of SATA ports. By default we use only one SATA port. In order to use both SATA ports on NAS6220 define CONFIG_NAS6220 in board config file.

---

If you want to test the boot loader without touching nand you can boot u-boot using UART. In order to create UART image you need to change image configuration from nand to uart:

sed -i 's/nand/uart/' board/Marvell/ib62x0/kwbimage.cfg

To boot your kirkwood board from UART you will need this tool:

http://www.solinno.co.uk/public/kwuartboot/
http://www.solinno.co.uk/public/kwuartboot/kwuartboot-0.1.tar.gz

Compile and run it like this:

./kwuartboot /dev/ttyUSB0 /path/to/u-boot.kwb

And when it's finished open the console.

board/Marvell/ib62x0/Makefile new file +51 -0
new file mode 100644
index 0000000..3d82f27
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor <www.marvell.com>
+# Written-by: Prafulla Wadaskar <[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., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).o
+
+COBJS	:= ib62x0.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/Marvell/ib62x0/ib62x0.c new file +122 -0

122 lines not on this page · raw message

board/Marvell/ib62x0/ib62x0.h new file +41 -0

41 lines not on this page · raw message

(quoted diff) +0 -0

b/board/Marvell/ib62x0/kwbimage.cfg
new file mode 100644
index 0000000..ffa3c18

board/Marvell/ib62x0/kwbimage.cfg new file +54 -0

54 lines not on this page · raw message

bit31=0
+# bit27-24: 7= CL+2, STARTBURST sample stages, for freqs 400MHz, unbuffered DIMM
+# bit30-28: 3 required
+# bit31: 0=no additional STARTBURST delay
+
+DATA 0xFFD01408 0x22125451 # DDR Timing (Low) (active cycles value +1)
+# bit3-0: TRAS lsbs
+# bit7-4: TRCD
+# bit11- 8: TRP
+# bit15-12: TWR
+# bit19-16: TWTR
+# bit20: TRAS msb
+# bit23-21: 0x0
+# bit27-24: TRRD
+# bit31-28: TRTP
+
+DATA 0xFFD0140C 0x00000a33 # DDR Timing (High)

+# bit6-0:   TRFC
+# bit8-7:   TR2R
+# bit10-9:  TR2W

+# bit12-11: TW2W
+# bit31-13: zero required
+
+DATA 0xFFD01410 0x000000CC # DDR Address Control

+# bit1-0:   00, Cs0width=x8
+# bit3-2:   11, Cs0size=1Gb
+# bit5-4:   00, Cs1width=x8
+# bit7-6:   11, Cs1size=1Gb
+# bit9-8:   00, Cs2width=nonexistent
+# bit11-10: 00, Cs2size =nonexistent
+# bit13-12: 00, Cs3width=nonexistent
+# bit15-14: 00, Cs3size =nonexistent
+# bit16:    0,  Cs0AddrSel
+# bit17:    0,  Cs1AddrSel
+# bit18:    0,  Cs2AddrSel
+# bit19:    0,  Cs3AddrSel

+# bit31-20: 0 required
+
+DATA 0xFFD01414 0x00000000 # DDR Open Pages Control
+# bit0: 0, OpenPage enabled
+# bit31-1: 0 required
+
+DATA 0xFFD01418 0x00000000 # DDR Operation
+# bit3-0: 0x0, DDR cmd
+# bit31-4: 0 required
+
+DATA 0xFFD0141C 0x00000C52 # DDR Mode

+# bit2-0:   2, BurstLen=2 required
+# bit3:     0, BurstType=0 required
+# bit6-4:   4, CL=5
+# bit7:     0, TestMode=0 normal
+# bit8:     0, DLL reset=0 normal
+# bit11-9:  6, auto-precharge write recovery ????????????
+# bit12:    0, PD must be zero
+# bit31-13: 0 required
+
+DATA 0xFFD01420 0x00000004	# DDR Extended Mode
+# bit0:    0,  DDR DLL enabled
+# bit1:    0,  DDR drive strenght normal
+# bit2:    1,  DDR ODT control lsd (disabled)
+# bit5-3:  000, required
+# bit6:    0,  DDR ODT control msb, (disabled)
+# bit9-7:  000, required
+# bit10:   0,  differential DQS enabled
+# bit11:   0, required
+# bit12:   0, DDR output buffer enabled
+# bit31-13: 0 required
+
+DATA 0xFFD01424 0x0000F17F	# DDR Controller Control High
+# bit2-0:  111, required
+# bit3  :  1  , MBUS Burst Chop disabled
+# bit6-4:  111, required
+# bit7  :  0
+# bit8  :  1  , add writepath sample stage, must be 1 for DDR freq >=
300MHz
+# bit9  :  0  , no half clock cycle addition to dataout
+# bit10 :  0  , 1/4 clock cycle skew enabled for addr/ctl signals
+# bit11 :  0  , 1/4 clock cycle skew disabled for write mesh

+# bit15-12: 1111 required
+# bit31-16: 0 required
+
+DATA 0xFFD01428 0x00085520 # DDR2 ODT Read Timing (default values)
+DATA 0xFFD0147C 0x00008552 # DDR2 ODT Write Timing (default values)
+
+DATA 0xFFD01500 0x00000000 # CS[0]n Base address to 0x0
+DATA 0xFFD01504 0x0FFFFFF1 # CS[0]n Size

+# bit0:    1,  Window enabled
+# bit1:    0,  Write Protect disabled
+# bit3-2:  00, CS0 hit selected

+# bit23-4: ones, required
+# bit31-24: 0x0F, Size (i.e. 256MB)
+
+DATA 0xFFD01508 0x10000000 # CS[1]n Base address to 256Mb
+DATA 0xFFD0150C 0x00000000 # CS[1]n Size, window disabled
+
+DATA 0xFFD01514 0x00000000 # CS[2]n Size, window disabled
+DATA 0xFFD0151C 0x00000000 # CS[3]n Size, window disabled
+
+DATA 0xFFD01494 0x00120012 # DDR ODT Control (Low)
+# bit3-0: 2, ODT0Rd, MODT[0] asserted during read from DRAM CS1 +# bit7-4: 1, ODT0Rd, MODT[0] asserted during read from DRAM CS0 +# bit19-16:2, ODT0Wr, MODT[0] asserted during write to DRAM CS1 +# bit23-20:1, ODT0Wr, MODT[0] asserted during write to DRAM CS0 +
+DATA 0xFFD01498 0x00000000 # DDR ODT Control (High)
+# bit1-0: 00, ODT0 controlled by ODT Control (low) register above +# bit3-2: 01, ODT1 active NEVER!
+# bit31-4: zero, required
+
+DATA 0xFFD0149C 0x0000E40F # CPU ODT Control
+DATA 0xFFD01480 0x00000001 # DDR Initialization Control
+#bit0=1, enable DDR init upon this register write
+
+# End of Header extension
+DATA 0x0 0x0

boards.cfg +0 -0
index 28cc345..8fc87d6 100644
@@ -147,6 +147,7 @@ netspace_max_v2              arm         arm926ejs
 netspace_v2         LaCie
 netspace_v2                  arm         arm926ejs   netspace_v2
  LaCie          kirkwood	lacie_kw:NETSPACE_V2
 dreamplug                    arm         arm926ejs   -
  Marvell        kirkwood
 guruplug                     arm         arm926ejs   -

Marvell kirkwood
+ib62x0 arm arm926ejs -
Marvell kirkwood
mv88f6281gtw_ge arm arm926ejs -
Marvell kirkwood
openrd_base arm arm926ejs openrd
Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE
openrd_client arm arm926ejs openrd
Marvell kirkwood openrd:BOARD_IS_OPENRD_CLIENT

include/configs/ib62x0.h new file +193 -0

193 lines not on this page · raw message

#2 lore raw

PATCH 1/1 add new board nas62x0

Dear DrEagle,

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

may be it can be also imported in debian-uboot package ?

Please do not top post / full quote.

Best regards,

Wolfgang Denk

Signature · 4 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 more sins you confess, the more books you will sell.
#3 lore raw

PATCH 1/1 add new board nas62x0

In reply to Luka Perkov

Dear Luka Perkov,

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

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

Checkpatch reports a number of issues:

WARNING: please, no space before tabs
ERROR: trailing whitespace
WARNING: please, no spaces at the start of a line

Please fix these.

Quoted 3 lines

Only difference between boards is number of SATA ports. By default we use only one SATA port. In order to use both SATA ports on NAS6220 define CONFIG_NAS6220 in board config file.

You should provide a second entry to boards.cfg then which sets this define, so that editing of the board config file is not needed.

Quoted 8 lines

If you want to test the boot loader without touching nand you can boot u-boot using UART. In order to create UART image you need to change image configuration from nand to uart:

sed -i 's/nand/uart/' board/Marvell/ib62x0/kwbimage.cfg

To boot your kirkwood board from UART you will need this tool:

Quoted 8 lines

http://www.solinno.co.uk/public/kwuartboot/
http://www.solinno.co.uk/public/kwuartboot/kwuartboot-0.1.tar.gz

Compile and run it like this:

./kwuartboot /dev/ttyUSB0 /path/to/u-boot.kwb

And when it's finished open the console.

This text should probably be added to a README and checked in. As is, this information gets lost for the users.

board/Marvell/ib62x0/ib62x0.c line 122

Quoted 6 lines
board/Marvell/ib62x0/ib62x0.c new file +6 -0
+#ifdef CONFIG_RESET_PHY_R
+/*
+ * This must be here because of the compile issue if missing
+ */
+void reset_phy(void) {}
+#endif /* CONFIG_RESET_PHY_R */

This makes no sense. If you don't need reset_phy(), then don't define CONFIG_RESET_PHY

include/configs/ib62x0.h line 38

Quoted 6 lines
include/configs/ib62x0.h new file +6 -0
+/*
+ * High Level Configuration Options (easy to change)
+ */
+#define CONFIG_FEROCEON_88FR131	1	/* CPU Core subversion */
+#define CONFIG_KIRKWOOD		1	/* SOC Family Name */
+#define CONFIG_KW88F6281	1	/* SOC Name */

Please don't define values for macros that enable features only. Please fix globally.

...

include/configs/ib62x0.h line 55

Quoted 5 lines
include/configs/ib62x0.h new file +5 -0
+/*
+ * Memory Info
+ */
+#define CONFIG_NR_DRAM_BANKS	1 	/* we have 1 bank of DRAM */
+#define PHYS_SDRAM_1_SIZE		(256 << 20) /* SDRAM size 256MB */

please use get_ram_size() instead and auto-size the memory.

Quoted 1 line

+#define CONFIG_MAX_RAM_BANK_SIZE (256 << 20)

...

Quoted 4 lines

+/*
+ * max 4k env size is enough, but in case of nand
+ * it has to be rounded to sector size
+ */

I think this is not correct.

include/configs/ib62x0.h line 101

Quoted 2 lines
include/configs/ib62x0.h new file +2 -0
+#define CONFIG_ENV_ADDR			0x80000
+#define CONFIG_ENV_OFFSET		0x80000	/* env starts here */

Using both ADDR and OFFSET is redundant at best. Drop one.

include/configs/ib62x0.h line 155

Quoted 4 lines
include/configs/ib62x0.h new file +4 -0
+/* Data, registers and alternate blocks are at the same offset */
+#define CONFIG_SYS_ATA_DATA_OFFSET	(0x0100)
+#define CONFIG_SYS_ATA_REG_OFFSET	(0x0100)
+#define CONFIG_SYS_ATA_ALT_OFFSET	(0x0100)

Please do not use parens for simple parameters. Please fix globally.

Best regards,

Wolfgang Denk

Signature · 4 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
Speed of a tortoise breaking the sound barrier         = 1 Machturtle
#4 lore raw

PATCH 1/1 add new board nas62x0

In reply to Luka Perkov

Dear Luka Perkov,

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

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

BTW: Please use git-format-patch to create the patches, or at least
make sure we get a statistics which files were changed / added.

For example, it nearly espcaped me that there is no entry to the MAINTAINERS file in your patch.

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
Those who do not  understand  Unix  are  condemned  to  reinvent  it,
poorly.              - Henry Spencer, University of Toronto Unix hack