arm: mvebu: create generic 88F6820 config option
Subsystems (3)
PATCH v2 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.
---
Changes in v2: None
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
@@ -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
@@ -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
PATCH v2 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.
Changes in v2:
- move CONFIG_SPL_xxx_SUPPORT to defconfig
- collect review from Simon
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 | 43 +++++++ include/configs/db-88f6820-amc.h | 123 ++++++++++++++++++++ 9 files changed, 483 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 +43 -0
43 lines not on this page · raw message
include/configs/db-88f6820-amc.h new file +123 -0
123 lines not on this page · raw message
Signature · 1 line
2.9.2.518.ged577c6.dirty
PATCH v2 2/3 arm: mvebu: add DB-88F6820-AMC board
Quoted 16 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 flashReviewed-by Simon Glass <[email protected]>Signed-off-by Chris Packham <[email protected]>---
I've used my work email address for theMAINTAINERSentry. Mainly because it gives a better chance at finding someone else to contact rather than a random gmail address.
Quoted 6 lines
I've also left the copyright assignments to Stefan and Gregory since the code was derived from the -GP board.
Changes in v2:
- moveCONFIG_SPL_xxx_SUPPORTto defconfig
- collect review from Simon
Applied to u-boot-marvell/master
Thanks,
Stefan
PATCH v2 3/3 arm: mvebu: NAND support for DB-88F6820-AMC
In reply to Chris PackhamEnable the NAND interface on this board.
---
Changes in v2: None
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
@@ -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
@@ -12,6 +12,7 @@ CONFIG_BOOTDELAY=3 CONFIG_SPL=y # 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
@@ -28,6 +29,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
@@ -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
PATCH v2 3/3 arm: mvebu: NAND support for DB-88F6820-AMC
Quoted 3 lines · Chris Packham
Enable the NAND interface on this board.
Signed-off-by Chris Packham <[email protected]>
Applied to u-boot-marvell/master
Thanks,
Stefan
PATCH v2 1/3 arm: mvebu: create generic 88F6820 config option
In reply to Chris PackhamQuoted 9 lines · Chris Packham
88F6820 is a specific Armada-38x chip that is used on the DB-88F6820-GP board. Rather than having
DB_88F6820_GPandTARGET_DB_88F6820_GPwhich selects the former. RenameDB_88F6820_GPto 88F6820 so that other boards using the 88F6820 can be added.Signed-off-by Chris Packham <[email protected]>---
Changes in v2: None
Changed for clearfog here as well while applying.
Applied to u-boot-marvell/master
Thanks,
Stefan
PATCH v2 1/3 arm: mvebu: create generic 88F6820 config option
Hi Stefan,
Quoted 7 lines · Stefan Roese
Quoted 6 lines · Chris Packham
88F6820 is a specific Armada-38x chip that is used on the DB-88F6820-GP board. Rather than having
DB_88F6820_GPandTARGET_DB_88F6820_GPwhich selects the former. RenameDB_88F6820_GPto 88F6820 so that other boards using the 88F6820 can be added.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Chris Packham <[email protected]>---
Changes in v2: None
Changed for clearfog here as well while applying.
I didn't notice clearfog when I was looking. One potential side-effect of my change for the clearfog board is that mv_board_id_get() will now return 0 instead of DB_68XX_ID (0x11). I'm not sure what the consequences of this are. The AMC board works fine with 0 and DB_68XX_ID is probably wrong for a board that is not the db-88f6820-gp. On the other hand the AMC board isn't using a number of peripherals so I may not have noticed a breakage.
If this does turn out to be a problem the following should be equivalent to the way things were before (sorry can't send a proper patch having remote access issues).
--- 8< ---
(quoted diff) +0 -0
b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
index 49d704a..cc3e5e2 100644 (file)
arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c +1 -1
@@ -45,7 +45,7 @@ u32 g_dev_id = -1;u32 mv_board_id_get (void ) { -#if defined(CONFIG_TARGET_DB_88F6820_GP ) +#if defined(CONFIG_88F6820 )return DB_GP_68XX_ID ;#else
PATCH v2 1/3 arm: mvebu: create generic 88F6820 config option
Hi Chris,
Quoted 17 lines · Chris Packham
Quoted 7 lines · Stefan Roese
Quoted 6 lines · Chris Packham
88F6820 is a specific Armada-38x chip that is used on the DB-88F6820-GP board. Rather than having
DB_88F6820_GPandTARGET_DB_88F6820_GPwhich selects the former. RenameDB_88F6820_GPto 88F6820 so that other boards using the 88F6820 can be added.Quoted 8 lines
Quoted 4 lines
Signed-off-by Chris Packham <[email protected]>---
Changes in v2: None
Changed for clearfog here as well while applying.
Quoted 6 lines
I didn't notice clearfog when I was looking. One potential side-effect of my change for the clearfog board is that
mv_board_id_get()will now return 0 instead ofDB_68XX_ID(0x11). I'm not sure what the consequences of this are. The AMC board works fine with 0 andDB_68XX_IDis probably wrong for a board that is not the db-88f6820-gp.
Correct, using the value for the DB- board for clearfog was wrong.
Quoted 6 lines
On the other hand the AMC board isn't using a number of peripherals so I may not have noticed a breakage.
If this does turn out to be a problem the following should be equivalent to the way things were before (sorry can't send a proper patch having remote access issues).
I suggest to leave it as is for now as it should be correct now.
Thanks for looking into it though. Perhaps this needs to be revisited at some time.
Thanks,
Stefan