Skip to contentSkip to conversation

arm: mvebu: create generic 88F6820 config option

PATCH Superseded Chris Packham 3 participants 6 messages Sep 14, 2016 – Sep 20, 2016

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm: mvebu: create generic 88F6820 config option

88F6820 is a specific Armada-38x chip that is used on the DB-88F6820-GP board. Rather than having DB_88F6820_GP and TARGET_DB_88F6820_GP which selects the former. Rename DB_88F6820_GP to 88F6820 so that other boards using the 88F6820 can be added.

---

 arch/arm/mach-mvebu/Kconfig                   | 4 ++--
 arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-mvebu/Kconfig +2 -2
index 220886aa592a..06820a5e4f2c 100644
@@ -21,7 +21,7 @@ config MV78460
 	bool
 	select ARMADA_XP
 
-config DB_88F6820_GP
+config 88F6820
 	bool
 	select ARMADA_38X
 
@@ -39,7 +39,7 @@ config TARGET_DB_88F6720
 
 config TARGET_DB_88F6820_GP
 	bool "Support DB-88F6820-GP"
-	select DB_88F6820_GP
+	select 88F6820
 
 config TARGET_DB_MV784MP_GP
 	bool "Support db-mv784mp-gp"
arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c +1 -1
index 49d704a36230..cc3e5e23c0dd 100644
@@ -45,7 +45,7 @@ u32 g_dev_id = -1;
 
 u32 mv_board_id_get(void)
 {
-#if defined(CONFIG_DB_88F6820_GP)
+#if defined(CONFIG_TARGET_DB_88F6820_GP)
 	return DB_GP_68XX_ID;
 #else
 	/*
Signature · 1 line
2.9.2.518.ged577c6.dirty
#1 lore raw

PATCH 2/3 arm: mvebu: add DB-88F6820-AMC board

This board is a plug in card for Marvell's switch system development kits. Form-factor aside it is similar to the DB-88F6820-GP with the following differences.
- TCLK is 200MHz
- SPI1 is used
- No SATA
- No MMC
- NAND flash

---
I've used my work email address for the MAINTAINERS entry. Mainly because it gives a better chance at finding someone else to contact rather than a random gmail address.

I've also left the copyright assignments to Stefan and Gregory since the code was derived from the -GP board.

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/armada-385-amc.dts               | 155 ++++++++++++++++++++++++++
 arch/arm/mach-mvebu/Kconfig                   |   7 ++
 board/Marvell/db-88f6820-amc/MAINTAINERS      |   6 +
 board/Marvell/db-88f6820-amc/Makefile         |   7 ++
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c | 129 +++++++++++++++++++++
 board/Marvell/db-88f6820-amc/kwbimage.cfg     |  12 ++
 configs/db-88f6820-amc_defconfig              |  38 +++++++
 include/configs/db-88f6820-amc.h              | 130 +++++++++++++++++++++
 9 files changed, 485 insertions(+)
 create mode 100644 arch/arm/dts/armada-385-amc.dts
 create mode 100644 board/Marvell/db-88f6820-amc/MAINTAINERS
 create mode 100644 board/Marvell/db-88f6820-amc/Makefile
 create mode 100644 board/Marvell/db-88f6820-amc/db-88f6820-amc.c
 create mode 100644 board/Marvell/db-88f6820-amc/kwbimage.cfg
 create mode 100644 configs/db-88f6820-amc_defconfig
 create mode 100644 include/configs/db-88f6820-amc.h
arch/arm/dts/Makefile +1 -0
index a4ab06964e20..78a8416e4686 100644
@@ -70,6 +70,7 @@ dtb-$(CONFIG_ARCH_MVEBU) +=			\
 	armada-375-db.dtb			\
 	armada-388-clearfog.dtb			\
 	armada-388-gp.dtb			\
+	armada-385-amc.dtb			\
 	armada-xp-gp.dtb			\
 	armada-xp-maxbcm.dtb			\
 	armada-xp-synology-ds414.dtb		\
arch/arm/dts/armada-385-amc.dts new file +155 -0

155 lines not on this page · raw message

arch/arm/mach-mvebu/Kconfig +7 -0
index 06820a5e4f2c..fd5eb67942e6 100644
@@ -41,6 +41,10 @@ config TARGET_DB_88F6820_GP
 	bool "Support DB-88F6820-GP"
 	select 88F6820
 
+config TARGET_DB_88F6820_AMC
+	bool "Support DB-88F6820-AMC"
+	select 88F6820
+
 config TARGET_DB_MV784MP_GP
 	bool "Support db-mv784mp-gp"
 	select MV78460
@@ -63,6 +67,7 @@ config SYS_BOARD
 	default "clearfog" if TARGET_CLEARFOG
 	default "db-88f6720" if TARGET_DB_88F6720
 	default "db-88f6820-gp" if TARGET_DB_88F6820_GP
+	default "db-88f6820-amc" if TARGET_DB_88F6820_AMC
 	default "db-mv784mp-gp" if TARGET_DB_MV784MP_GP
 	default "ds414" if TARGET_DS414
 	default "maxbcm" if TARGET_MAXBCM
@@ -72,6 +77,7 @@ config SYS_CONFIG_NAME
 	default "clearfog" if TARGET_CLEARFOG
 	default "db-88f6720" if TARGET_DB_88F6720
 	default "db-88f6820-gp" if TARGET_DB_88F6820_GP
+	default "db-88f6820-amc" if TARGET_DB_88F6820_AMC
 	default "db-mv784mp-gp" if TARGET_DB_MV784MP_GP
 	default "ds414" if TARGET_DS414
 	default "maxbcm" if TARGET_MAXBCM
@@ -81,6 +87,7 @@ config SYS_VENDOR
 	default "Marvell" if TARGET_DB_MV784MP_GP
 	default "Marvell" if TARGET_DB_88F6720
 	default "Marvell" if TARGET_DB_88F6820_GP
+	default "Marvell" if TARGET_DB_88F6820_AMC
 	default "solidrun" if TARGET_CLEARFOG
 	default "Synology" if TARGET_DS414
 
board/Marvell/db-88f6820-amc/MAINTAINERS new file +6 -0
new file mode 100644
index 000000000000..abf5b7efdc93
@@ -0,0 +1,6 @@
+DB_88F6820_AMC BOARD
+M:	Chris Packham <[email protected]>
+S:	Maintained
+F:	board/Marvell/db-88f6820-amc/
+F:	include/configs/db-88f6820-amc.h
+F:	configs/db-88f6820-amc_defconfig
board/Marvell/db-88f6820-amc/Makefile new file +7 -0
new file mode 100644
index 000000000000..79e1a75f4c18
@@ -0,0 +1,7 @@
+#
+# Copyright (C) 2015 Stefan Roese <[email protected]>
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	:= db-88f6820-amc.o
board/Marvell/db-88f6820-amc/db-88f6820-amc.c new file +129 -0

129 lines not on this page · raw message

board/Marvell/db-88f6820-amc/kwbimage.cfg new file +12 -0
new file mode 100644
index 000000000000..1f748db37c1e
@@ -0,0 +1,12 @@
+#
+# Copyright (C) 2014 Stefan Roese <[email protected]>
+#
+
+# Armada XP uses version 1 image format
+VERSION		1
+
+# Boot Media configurations
+BOOT_FROM	spi
+
+# Binary Header (bin_hdr) with DDR3 training code
+BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068
configs/db-88f6820-amc_defconfig new file +38 -0
new file mode 100644
index 000000000000..74794fed4766
@@ -0,0 +1,38 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MVEBU=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_TARGET_DB_88F6820_AMC=y
+CONFIG_DEFAULT_DEVICE_TREE="armada-385-amc"
+CONFIG_SPL=y
+CONFIG_BOOTDELAY=3
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_BASE=0xd0012000
+CONFIG_DEBUG_UART_CLOCK=200000000
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
include/configs/db-88f6820-amc.h new file +130 -0

130 lines not on this page · raw message

Signature · 1 line
2.9.2.518.ged577c6.dirty
#2 lore raw

PATCH 2/3 arm: mvebu: add DB-88F6820-AMC board

Hi Chris,

Quoted 27 lines · Chris Packham

This board is a plug in card for Marvell's switch system development kits. Form-factor aside it is similar to the DB-88F6820-GP with the following differences.
- TCLK is 200MHz
- SPI1 is used
- No SATA
- No MMC
- NAND flash

---
I've used my work email address for the MAINTAINERS entry. Mainly because it gives a better chance at finding someone else to contact rather than a random gmail address.

I've also left the copyright assignments to Stefan and Gregory since the code was derived from the -GP board.

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/armada-385-amc.dts               | 155 ++++++++++++++++++++++++++
 arch/arm/mach-mvebu/Kconfig                   |   7 ++
 board/Marvell/db-88f6820-amc/MAINTAINERS      |   6 +
 board/Marvell/db-88f6820-amc/Makefile         |   7 ++
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c | 129 +++++++++++++++++++++
 board/Marvell/db-88f6820-amc/kwbimage.cfg     |  12 ++
 configs/db-88f6820-amc_defconfig              |  38 +++++++
 include/configs/db-88f6820-amc.h              | 130 +++++++++++++++++++++
Quoted 8 lines
 9 files changed, 485 insertions(+)
 create mode 100644 arch/arm/dts/armada-385-amc.dts
 create mode 100644 board/Marvell/db-88f6820-amc/MAINTAINERS
 create mode 100644 board/Marvell/db-88f6820-amc/Makefile
 create mode 100644 board/Marvell/db-88f6820-amc/db-88f6820-amc.c
 create mode 100644 board/Marvell/db-88f6820-amc/kwbimage.cfg
 create mode 100644 configs/db-88f6820-amc_defconfig
 create mode 100644 include/configs/db-88f6820-amc.h

The SPL_xxx_SUPPORT options have now moved to Kconfig, but other than that:

Regards,
Simon

#3 lore raw

PATCH 2/3 arm: mvebu: add DB-88F6820-AMC board

Quoted 39 lines · Simon Glass

Hi Chris,

Quoted 27 lines · Chris Packham

This board is a plug in card for Marvell's switch system development kits. Form-factor aside it is similar to the DB-88F6820-GP with the following differences.
- TCLK is 200MHz
- SPI1 is used
- No SATA
- No MMC
- NAND flash

---
I've used my work email address for the MAINTAINERS entry. Mainly because it gives a better chance at finding someone else to contact rather than a random gmail address.

I've also left the copyright assignments to Stefan and Gregory since the code was derived from the -GP board.

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/armada-385-amc.dts               | 155 ++++++++++++++++++++++++++
 arch/arm/mach-mvebu/Kconfig                   |   7 ++
 board/Marvell/db-88f6820-amc/MAINTAINERS      |   6 +
 board/Marvell/db-88f6820-amc/Makefile         |   7 ++
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c | 129 +++++++++++++++++++++
 board/Marvell/db-88f6820-amc/kwbimage.cfg     |  12 ++
 configs/db-88f6820-amc_defconfig              |  38 +++++++
 include/configs/db-88f6820-amc.h              | 130 +++++++++++++++++++++
Quoted 8 lines
 9 files changed, 485 insertions(+)
 create mode 100644 arch/arm/dts/armada-385-amc.dts
 create mode 100644 board/Marvell/db-88f6820-amc/MAINTAINERS
 create mode 100644 board/Marvell/db-88f6820-amc/Makefile
 create mode 100644 board/Marvell/db-88f6820-amc/db-88f6820-amc.c
 create mode 100644 board/Marvell/db-88f6820-amc/kwbimage.cfg
 create mode 100644 configs/db-88f6820-amc_defconfig
 create mode 100644 include/configs/db-88f6820-amc.h
Quoted 4 lines

The SPL_xxx_SUPPORT options have now moved to Kconfig, but other than that:

Hi Simon,

Thanks for the review. I've moved the SPL_*_SUPPORT to the defconfig locally, I'll wait to see if there are any other comments before sending a v2.

#4 lore raw

PATCH 2/3 arm: mvebu: add DB-88F6820-AMC board

Hi Chris,

Quoted 42 lines · Chris Packham
Quoted 41 lines · Simon Glass

Hi Chris,

Quoted 27 lines · Chris Packham

This board is a plug in card for Marvell's switch system development kits. Form-factor aside it is similar to the DB-88F6820-GP with the following differences.
- TCLK is 200MHz
- SPI1 is used
- No SATA
- No MMC
- NAND flash

---
I've used my work email address for the MAINTAINERS entry. Mainly because it gives a better chance at finding someone else to contact rather than a random gmail address.

I've also left the copyright assignments to Stefan and Gregory since the code was derived from the -GP board.

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/armada-385-amc.dts               | 155 ++++++++++++++++++++++++++
 arch/arm/mach-mvebu/Kconfig                   |   7 ++
 board/Marvell/db-88f6820-amc/MAINTAINERS      |   6 +
 board/Marvell/db-88f6820-amc/Makefile         |   7 ++
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c | 129 +++++++++++++++++++++
 board/Marvell/db-88f6820-amc/kwbimage.cfg     |  12 ++
 configs/db-88f6820-amc_defconfig              |  38 +++++++
 include/configs/db-88f6820-amc.h              | 130 +++++++++++++++++++++
Quoted 8 lines
 9 files changed, 485 insertions(+)
 create mode 100644 arch/arm/dts/armada-385-amc.dts
 create mode 100644 board/Marvell/db-88f6820-amc/MAINTAINERS
 create mode 100644 board/Marvell/db-88f6820-amc/Makefile
 create mode 100644 board/Marvell/db-88f6820-amc/db-88f6820-amc.c
 create mode 100644 board/Marvell/db-88f6820-amc/kwbimage.cfg
 create mode 100644 configs/db-88f6820-amc_defconfig
 create mode 100644 include/configs/db-88f6820-amc.h

The SPL_xxx_SUPPORT options have now moved to Kconfig, but other than that:

Quoted 8 lines
Quoted 2 lines

Hi Simon,

Thanks for the review. I've moved the SPL_*_SUPPORT to the defconfig locally, I'll wait to see if there are any other comments before sending a v2.

I've just scanned your patches and and they look pretty good. So please send a v2 and I'll pull them later this week.

Thanks,
Stefan

#5 lore raw

PATCH 3/3 arm: mvebu: NAND support for DB-88F6820-AMC

In reply to Chris Packham

Enable the NAND interface on this board.

---

 arch/arm/dts/armada-385-amc.dts  | 8 ++++++++
 configs/db-88f6820-amc_defconfig | 2 ++
 include/configs/db-88f6820-amc.h | 4 ++++
 3 files changed, 14 insertions(+)
arch/arm/dts/armada-385-amc.dts +8 -0
index 858138a3376b..a5a8a7f186db 100644
@@ -120,6 +120,14 @@
 					reg = <0>;
 				};
 			};
+
+			flash at d0000 {
+				status = "okay";
+				num-cs = <1>;
+				marvell,nand-keep-config;
+				marvell,nand-enable-arbiter;
+				nand-on-flash-bbt;
+			};
 		};
 
 		pcie-controller {
configs/db-88f6820-amc_defconfig +2 -0
index 74794fed4766..9a6cf4767d92 100644
@@ -7,6 +7,7 @@ CONFIG_SPL=y
 CONFIG_BOOTDELAY=3
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
+CONFIG_CMD_NAND=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_I2C=y
@@ -23,6 +24,7 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_NAND_PXA3XX=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_MACRONIX=y
include/configs/db-88f6820-amc.h +4 -0
index b9cb243e402d..97c51c91d9bb 100644
@@ -68,6 +68,10 @@
 #define CONFIG_PCI_SCAN_SHOW
 #endif
 
+/* NAND */
+#define CONFIG_SYS_NAND_USE_FLASH_BBT
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+
 #define CONFIG_SYS_CONSOLE_INFO_QUIET	/* don't print console @ startup */
 #define CONFIG_SYS_ALT_MEMTEST
 
Signature · 1 line
2.9.2.518.ged577c6.dirty