arm: kirkwood: add support for Synology DS109 board
Subsystems (2)
PATCH v2 1/5 arm: kirkwood: add support for Synology DS109 board
Synology DS109 is based on MV88F6281. The code
is based on Dreamplug code with modificatons
from Synologys open source repository.
---
Changes in v2:
- adapt config options to new checks
- tag with kirkwood instead of mvebu
arch/arm/mach-kirkwood/Kconfig | 4 + board/Synology/ds109/Kconfig | 12 +++ board/Synology/ds109/Makefile | 9 ++ board/Synology/ds109/ds109.c | 169 ++++++++++++++++++++++++++++++++++++++ board/Synology/ds109/ds109.h | 44 ++++++++++ board/Synology/ds109/kwbimage.cfg | 147 +++++++++++++++++++++++++++++++++ board/Synology/ds109/openocd.cfg | 115 ++++++++++++++++++++++++++ configs/ds109_defconfig | 16 ++++ include/configs/ds109.h | 103 +++++++++++++++++++++++ 9 files changed, 619 insertions(+) create mode 100644 board/Synology/ds109/Kconfig create mode 100644 board/Synology/ds109/Makefile create mode 100644 board/Synology/ds109/ds109.c create mode 100644 board/Synology/ds109/ds109.h create mode 100644 board/Synology/ds109/kwbimage.cfg create mode 100644 board/Synology/ds109/openocd.cfg create mode 100644 configs/ds109_defconfig create mode 100644 include/configs/ds109.h
arch/arm/mach-kirkwood/Kconfig +4 -0
@@ -10,6 +10,9 @@ config TARGET_OPENRD config TARGET_DREAMPLUG bool "DreamPlug Board" +config TARGET_DS109 + bool "Synology DS109" + config TARGET_GURUPLUG bool "GuruPlug Board"
@@ -59,6 +62,7 @@ config SYS_SOC source "board/Marvell/openrd/Kconfig" source "board/Marvell/dreamplug/Kconfig" +source "board/Synology/ds109/Kconfig" source "board/Marvell/guruplug/Kconfig" source "board/Marvell/sheevaplug/Kconfig" source "board/buffalo/lsxl/Kconfig"
board/Synology/ds109/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_DS109 + +config SYS_BOARD + default "ds109" + +config SYS_VENDOR + default "Synology" + +config SYS_CONFIG_NAME + default "ds109" + +endif
board/Synology/ds109/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := ds109.o
board/Synology/ds109/ds109.c new file +169 -0
169 lines not on this page · raw message
board/Synology/ds109/ds109.h new file +44 -0
44 lines not on this page · raw message
board/Synology/ds109/kwbimage.cfg new file +147 -0
147 lines not on this page · raw message
board/Synology/ds109/openocd.cfg new file +115 -0
115 lines not on this page · raw message
configs/ds109_defconfig new file +16 -0
@@ -0,0 +1,16 @@ +CONFIG_ARM=y +CONFIG_KIRKWOOD=y +CONFIG_TARGET_DS109=y +CONFIG_HUSH_PARSER=y +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_SF=y +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +CONFIG_CMD_PING=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_BAR=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SYS_NS16550=y
include/configs/ds109.h new file +103 -0
103 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v2 2/5 arm: kirkwood: ds109 board is maintained
---
Changes in v2: None
board/Synology/ds109/MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 board/Synology/ds109/MAINTAINERS
board/Synology/ds109/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +DS109 BOARD +M: Walter Schweizer <[email protected]> +S: Maintained +F: board/Synology/ds109 +F: configs/ds109_defconfig +F: include/configs/ds109.h
Signature · 1 line
2.1.4
PATCH v2 3/5 arm: kirkwood: fix kirkwood initial setup
In reply to Walter Schweizer---
Changes in v2: None
board/Synology/ds109/kwbimage.cfg | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-)
board/Synology/ds109/kwbimage.cfg +16 -11
@@ -19,7 +19,10 @@ BOOT_FROM spi # Maximum KWBIMAGE_MAX_CONFIG configurations allowed # Configure RGMII-0/1 interface pad voltage to 1.8V -DATA 0xFFD100e0 0x1b1b9b9b +DATA 0xFFD100e0 0x1b1b1b9b + +DATA 0xFFD20134 0xbbbbbbbb +DATA 0xFFD20138 0x00bbbbbb #Dram initalization for SINGLE x16 CL=5 @ 400MHz DATA 0xFFD01400 0x43000c30 # DDR Configuration register
@@ -30,7 +33,7 @@ DATA 0xFFD01400 0x43000c30 # DDR Configuration register # bit29-26: zero # bit31-30: 01 -DATA 0xFFD01404 0x37543000 # DDR Controller Control Low +DATA 0xFFD01404 0x39543000 # DDR Controller Control Low # bit 4: 0=addr/cmd in smame cycle # bit 5: 0=clk is driven during self refresh, we don't care for APX # bit 6: 0=use recommended falling edge of clk for addr/cmd
@@ -52,14 +55,14 @@ DATA 0xFFD01408 0x22125451 # DDR Timing (Low) (active cycles value +1) # bit27-24: TRRD # bit31-28: TRTP -DATA 0xFFD0140C 0x00000a33 # DDR Timing (High) +DATA 0xFFD0140C 0x00000833 # 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 +DATA 0xFFD01410 0x0000000d # DDR Address Control # bit1-0: 01, Cs0width=x8 # bit3-2: 10, Cs0size=1Gb # bit5-4: 01, Cs1width=x8
@@ -92,7 +95,7 @@ DATA 0xFFD0141C 0x00000C52 # DDR Mode # bit12: 0, PD must be zero # bit31-13: 0 required -DATA 0xFFD01420 0x00000040 # DDR Extended Mode +DATA 0xFFD01420 0x00000042 # DDR Extended Mode # bit0: 0, DDR DLL enabled # bit1: 0, DDR drive strenght normal # bit2: 0, DDR ODT control lsd (disabled)
@@ -104,7 +107,7 @@ DATA 0xFFD01420 0x00000040 # DDR Extended Mode # bit12: 0, DDR output buffer enabled # bit31-13: 0 required -DATA 0xFFD01424 0x0000F17F # DDR Controller Control High +DATA 0xFFD01424 0x0000F1FF # DDR Controller Control High # bit2-0: 111, required # bit3 : 1 , MBUS Burst Chop disabled # bit6-4: 111, required
@@ -120,26 +123,28 @@ 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 +DATA 0xFFD01504 0x07FFFFF1 # 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) +# bit31-24: 0x07, Size (i.e. 128MB) DATA 0xFFD01508 0x10000000 # CS[1]n Base address to 256Mb -DATA 0xFFD0150C 0x0FFFFFF5 # CS[1]n Size 256Mb Window enabled for CS1 +DATA 0xFFD0150C 0x00000000 # CS[1]n Size, window disabled +DATA 0xFFD01510 0x20000000 # CS[2]n Base address to 256Mb DATA 0xFFD01514 0x00000000 # CS[2]n Size, window disabled +DATA 0xFFD01518 0x30000000 # CS[3]n Base address to 256Mb DATA 0xFFD0151C 0x00000000 # CS[3]n Size, window disabled -DATA 0xFFD01494 0x00030000 # DDR ODT Control (Low) +DATA 0xFFD01494 0x003C0000 # DDR ODT Control (Low) 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 0x0000E803 # CPU ODT Control +DATA 0xFFD0149C 0x0000F80F # CPU ODT Control DATA 0xFFD01480 0x00000001 # DDR Initialization Control #bit0=1, enable DDR init upon this register write
Signature · 1 line
2.1.4
PATCH v2 4/5 arm: kirkwood: fix output enable settings
In reply to Walter Schweizer---
Changes in v2: None
board/Synology/ds109/ds109.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
board/Synology/ds109/ds109.h +2 -2
@@ -9,8 +9,8 @@#ifndef __DS109_H#define __DS109_H -#define DS109_OE_LOW (~(0)) -#define DS109_OE_HIGH (~(0)) +#define DS109_OE_LOW (0) +#define DS109_OE_HIGH (0)#define DS109_OE_VAL_LOW ((1 << 22)|(1 << 23))#define DS109_OE_VAL_HIGH ((1 << 1)|1)
Signature · 1 line
2.1.4
PATCH v2 5/5 arm: kirkwood: fix Synology board tag
In reply to Walter Schweizer---
Changes in v2: None
board/Synology/ds109/ds109.c | 7 +++++++ 1 file changed, 7 insertions(+)
board/Synology/ds109/ds109.c +7 -0
@@ -115,6 +115,7 @@ void setup_board_tags(struct tag **in_params)unsigned int boardId;struct tag *params;struct tag_mv_uboot *t; +int i;printf ("Synology board tags..." ); params = *in_params;
@@ -128,6 +129,12 @@ void setup_board_tags(struct tag **in_params) t->tclk =CONFIG_SYS_TCLK ; t->sysclk =CONFIG_SYS_TCLK *2 ; + t->isusbhost =1 ; +for (i =0 ; i <4 ; i++) { +memset (t->macaddr[i],0 ,sizeof (t->macaddr[i])); + t->mtu[i] =0 ; + } + params->hdr.tag =ATAG_MV_UBOOT ; params->hdr.size =tag_size (tag_mv_uboot); params =tag_next (params);
Signature · 1 line
2.1.4
PATCH v2 1/5 arm: kirkwood: add support for Synology DS109 board
In reply to Walter SchweizerQuoted 5 lines · Walter Schweizer
Synology DS109 is based on MV88F6281. The code
is based on Dreamplug code with modificatons
from Synologys open source repository.Signed-off-by Walter Schweizer <[email protected]>
All 5 patches applied to u-boot-marvell/master.
Thanks,
Stefan