summaryrefslogtreecommitdiff
path: root/board/Marvell/db-88f6281-bp
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2019-04-13 20:21:18 +1200
committerStefan Roese <sr@denx.de>2019-04-26 07:35:38 +0200
commitd55254ab77d84f254829578d0b12f8e15082c0a4 (patch)
tree00ad040cea53602f36de74bb51f2773b4a61c049 /board/Marvell/db-88f6281-bp
parent30387ee292f04b039d6bd0922e90402c61fa7a21 (diff)
ARM: kirkwood: add db-88f6281-bp board
This is Marvell's Kirkwood development board. It has the following features - 512M DDR2 - 2 PCI connectors - 1 x1 PCI-e interface - 1 Gigabit Ethernet Port - 2 SATA Ports - USB 2.0 Interface - SDIO - 128M NAND Flash - 16M SPI Flash It can be strapped to boot from SPI or NAND so there are two defconfigs (one per boot media). Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/Marvell/db-88f6281-bp')
-rw-r--r--board/Marvell/db-88f6281-bp/.gitignore1
-rw-r--r--board/Marvell/db-88f6281-bp/Kconfig12
-rw-r--r--board/Marvell/db-88f6281-bp/MAINTAINERS10
-rw-r--r--board/Marvell/db-88f6281-bp/Makefile12
-rw-r--r--board/Marvell/db-88f6281-bp/db-88f6281-bp.c103
-rw-r--r--board/Marvell/db-88f6281-bp/kwbimage.cfg.in36
6 files changed, 174 insertions, 0 deletions
diff --git a/board/Marvell/db-88f6281-bp/.gitignore b/board/Marvell/db-88f6281-bp/.gitignore
new file mode 100644
index 0000000000..775b9346b8
--- /dev/null
+++ b/board/Marvell/db-88f6281-bp/.gitignore
@@ -0,0 +1 @@
+kwbimage.cfg
diff --git a/board/Marvell/db-88f6281-bp/Kconfig b/board/Marvell/db-88f6281-bp/Kconfig
new file mode 100644
index 0000000000..38467399e6
--- /dev/null
+++ b/board/Marvell/db-88f6281-bp/Kconfig
@@ -0,0 +1,12 @@
+if TARGET_DB_88F6281_BP
+
+config SYS_BOARD
+ default "db-88f6281-bp"
+
+config SYS_VENDOR
+ default "Marvell"
+
+config SYS_CONFIG_NAME
+ default "db-88f6281-bp"
+
+endif
diff --git a/board/Marvell/db-88f6281-bp/MAINTAINERS b/board/Marvell/db-88f6281-bp/MAINTAINERS
new file mode 100644
index 0000000000..acf0b051ff
--- /dev/null
+++ b/board/Marvell/db-88f6281-bp/MAINTAINERS
@@ -0,0 +1,10 @@
+DB_88F6820_AMC BOARD
+M: Chris Packham <judge.packham@gmail.com>
+S: Maintained
+F: arch/arm/dts/kirkwood-db-88f6281.dts
+F: arch/arm/dts/kirkwood-db-88f6281-spi.dts
+F: arch/arm/dts/kirkwood-db.dtsi
+F: board/Marvell/db-88f6281-bp/
+F: include/configs/db-88f6281-bp.h
+F: configs/db-88f6281-bp-nand_defconfig
+F: configs/db-88f6281-bp-spi_defconfig
diff --git a/board/Marvell/db-88f6281-bp/Makefile b/board/Marvell/db-88f6281-bp/Makefile
new file mode 100644
index 0000000000..e6aa7e39a0
--- /dev/null
+++ b/board/Marvell/db-88f6281-bp/Makefile
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+obj-y := db-88f6281-bp.o
+extra-y := kwbimage.cfg
+
+quiet_cmd_sed = SED $@
+ cmd_sed = sed $(SEDFLAGS_$(@F)) $< >$(dir $<)$(@F)
+
+SEDFLAGS_kwbimage.cfg = -e "s/^\#@BOOT_FROM.*/BOOT_FROM $(if $(CONFIG_CMD_NAND),nand,spi)/"
+$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
+ include/config/auto.conf
+ $(call if_changed,sed)
diff --git a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
new file mode 100644
index 0000000000..b68f2f3c89
--- /dev/null
+++ b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
@@ -0,0 +1,103 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include <common.h>
+#include <linux/io.h>
+#include <miiphy.h>
+#include <netdev.h>
+#include <asm/arch/cpu.h>
+#include <asm/arch/soc.h>
+#include <asm/arch/mpp.h>
+#include <asm/arch/gpio.h>
+
+#define DB_88F6281_OE_LOW ~(BIT(7))
+#define DB_88F6281_OE_HIGH ~(BIT(15) | BIT(14) | BIT(13) | BIT(4))
+#define DB_88F6281_OE_VAL_LOW BIT(7)
+#define DB_88F6281_OE_VAL_HIGH 0
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f(void)
+{
+ mvebu_config_gpio(DB_88F6281_OE_VAL_LOW,
+ DB_88F6281_OE_VAL_HIGH,
+ DB_88F6281_OE_LOW, DB_88F6281_OE_HIGH);
+
+ /* Multi-Purpose Pins Functionality configuration */
+ static const u32 kwmpp_config[] = {
+#ifdef CONFIG_CMD_NAND
+ MPP0_NF_IO2,
+ MPP1_NF_IO3,
+ MPP2_NF_IO4,
+ MPP3_NF_IO5,
+#else
+ MPP0_SPI_SCn,
+ MPP1_SPI_MOSI,
+ MPP2_SPI_SCK,
+ MPP3_SPI_MISO,
+#endif
+ MPP4_NF_IO6,
+ MPP5_NF_IO7,
+ MPP6_SYSRST_OUTn,
+ MPP7_GPO,
+ MPP8_TW_SDA,
+ MPP9_TW_SCK,
+ MPP10_UART0_TXD,
+ MPP11_UART0_RXD,
+ MPP12_SD_CLK,
+ MPP13_SD_CMD,
+ MPP14_SD_D0,
+ MPP15_SD_D1,
+ MPP16_SD_D2,
+ MPP17_SD_D3,
+ MPP18_NF_IO0,
+ MPP19_NF_IO1,
+ MPP20_SATA1_ACTn,
+ MPP21_SATA0_ACTn,
+ MPP22_GPIO,
+ MPP23_GPIO,
+ MPP24_GPIO,
+ MPP25_GPIO,
+ MPP26_GPIO,
+ MPP27_GPIO,
+ MPP28_GPIO,
+ MPP29_GPIO,
+ MPP30_GPIO,
+ MPP31_GPIO,
+ MPP32_GPIO,
+ MPP33_GPIO,
+ MPP34_GPIO,
+ MPP35_GPIO,
+ MPP36_GPIO,
+ MPP37_GPIO,
+ MPP38_GPIO,
+ MPP39_GPIO,
+ MPP40_GPIO,
+ MPP41_GPIO,
+ MPP42_GPIO,
+ MPP43_GPIO,
+ MPP44_GPIO,
+ MPP45_GPIO,
+ MPP46_GPIO,
+ MPP47_GPIO,
+ MPP48_GPIO,
+ MPP49_GPIO,
+ 0
+ };
+ kirkwood_mpp_conf(kwmpp_config, NULL);
+
+ return 0;
+}
+
+int board_init(void)
+{
+ gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
+
+ return 0;
+}
+
+#ifdef CONFIG_RESET_PHY_R
+/* automatically defined by kirkwood config.h */
+void reset_phy(void)
+{
+}
+#endif
diff --git a/board/Marvell/db-88f6281-bp/kwbimage.cfg.in b/board/Marvell/db-88f6281-bp/kwbimage.cfg.in
new file mode 100644
index 0000000000..05f8b275f6
--- /dev/null
+++ b/board/Marvell/db-88f6281-bp/kwbimage.cfg.in
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+# Boot Media configurations
+#@BOOT_FROM
+
+DATA 0xd00100e0 0x1b1b1b9b
+DATA 0xd0020134 0xbbbbbbbb
+DATA 0xd0020138 0x00bbbbbb
+DATA 0xd0020154 0x00000200
+DATA 0xd002014c 0x00001c00
+DATA 0xd0020148 0x00000001
+
+DATA 0xd0001400 0x43000c30
+DATA 0xd0001404 0x39543000
+DATA 0xd0001408 0x22125451
+DATA 0xd000140c 0x00000833
+DATA 0xd0001410 0x000000cc
+DATA 0xd0001414 0x00000000
+DATA 0xd0001418 0x00000000
+DATA 0xd000141c 0x00000c52
+DATA 0xd0001420 0x00000044
+DATA 0xd0001424 0x0000f1ff
+DATA 0xd0001428 0x00085520
+DATA 0xd000147c 0x00008552
+DATA 0xd0001504 0x0ffffff1
+DATA 0xd0001508 0x10000000
+DATA 0xd000150c 0x0ffffff5
+DATA 0xd0001514 0x00000000
+DATA 0xd000151c 0x00000000
+DATA 0xd0001494 0x84210000
+DATA 0xd0001498 0x00000000
+DATA 0xd000149c 0x0000f40f
+DATA 0xd0001480 0x00000001
+
+# End of Header extension
+DATA 0x0 0x0