From f05062edc4c9cbb47ef11aebbb72d1580695127f Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Mon, 18 Jun 2018 21:56:22 +0300 Subject: [PATCH 01/18] mvebu: turris_omnia: use u-boot-spl-dtb.bin u-boot-spl.bin and u-boot-spl-dtb.bin are identical when building the turris_omnia_defconfig. This commit makes Turris Omnia consistent with all other mvebu boards. Signed-off-by: Baruch Siach Signed-off-by: Stefan Roese --- board/CZ.NIC/turris_omnia/kwbimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/CZ.NIC/turris_omnia/kwbimage.cfg b/board/CZ.NIC/turris_omnia/kwbimage.cfg index cc05792556..1f748db37c 100644 --- a/board/CZ.NIC/turris_omnia/kwbimage.cfg +++ b/board/CZ.NIC/turris_omnia/kwbimage.cfg @@ -9,4 +9,4 @@ VERSION 1 BOOT_FROM spi # Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl.bin 0000005b 00000068 +BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 From d38f04f7c2bca1d636ef67acf605c99e0b3a30cb Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Mon, 18 Jun 2018 21:56:23 +0300 Subject: [PATCH 02/18] mvebu: a38x: drop duplicate platform id symbols Use generic mvebu Kconfig symbols like all other mvebu boards. Signed-off-by: Baruch Siach Signed-off-by: Stefan Roese --- arch/arm/mach-mvebu/Kconfig | 3 +++ board/gdsys/a38x/Kconfig | 12 ------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 3df124c6a8..e340a9b50e 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -148,6 +148,7 @@ config SYS_BOARD default "ds414" if TARGET_DS414 default "maxbcm" if TARGET_MAXBCM default "theadorable" if TARGET_THEADORABLE + default "a38x" if TARGET_CONTROLCENTERDC config SYS_CONFIG_NAME default "clearfog" if TARGET_CLEARFOG @@ -163,6 +164,7 @@ config SYS_CONFIG_NAME default "theadorable" if TARGET_THEADORABLE default "turris_omnia" if TARGET_TURRIS_OMNIA default "turris_mox" if TARGET_TURRIS_MOX + default "controlcenterdc" if TARGET_CONTROLCENTERDC config SYS_VENDOR default "Marvell" if TARGET_DB_MV784MP_GP @@ -176,6 +178,7 @@ config SYS_VENDOR default "Synology" if TARGET_DS414 default "CZ.NIC" if TARGET_TURRIS_OMNIA default "CZ.NIC" if TARGET_TURRIS_MOX + default "gdsys" if TARGET_CONTROLCENTERDC config SYS_SOC default "mvebu" diff --git a/board/gdsys/a38x/Kconfig b/board/gdsys/a38x/Kconfig index 3fdef64b59..ff11eb2371 100644 --- a/board/gdsys/a38x/Kconfig +++ b/board/gdsys/a38x/Kconfig @@ -1,17 +1,5 @@ if TARGET_CONTROLCENTERDC -config SYS_BOARD - default "a38x" - -config SYS_VENDOR - default "gdsys" - -config SYS_SOC - default "mvebu" - -config SYS_CONFIG_NAME - default "controlcenterdc" - menu "Controlcenter DC board options" choice From ad105f5f869443c6b37617ea55091511a2be1579 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Mon, 18 Jun 2018 21:56:24 +0300 Subject: [PATCH 03/18] mvebu: consolidate SPL boot device config symbols Use MVEBU_SPL_BOOT_DEVICE_* to select between SPI and MMC, instead of board specific symbols. This commit enables the boot device selection menu to all mvebu platforms, but it is only effective on Turris Omnia and gdsys Controlcenter DC platforms. A following commit will enable boot selection for other platforms. Signed-off-by: Baruch Siach Signed-off-by: Stefan Roese --- arch/arm/Kconfig | 1 - arch/arm/mach-mvebu/Kconfig | 11 ++++------- board/gdsys/a38x/Kconfig | 24 ------------------------ board/gdsys/a38x/Makefile | 4 ++-- include/configs/turris_omnia.h | 4 ++-- 5 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 board/gdsys/a38x/Kconfig diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a047552ed3..63ec02403a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1480,7 +1480,6 @@ source "board/freescale/ls1012ardb/Kconfig" source "board/freescale/ls1012afrdm/Kconfig" source "board/freescale/mx35pdk/Kconfig" source "board/freescale/s32v234evb/Kconfig" -source "board/gdsys/a38x/Kconfig" source "board/grinn/chiliboard/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig" diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index e340a9b50e..e1b70c54fc 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -183,21 +183,18 @@ config SYS_VENDOR config SYS_SOC default "mvebu" -if TARGET_TURRIS_OMNIA - choice - prompt "Turris Omnia boot method" + prompt "Boot method" -config TURRIS_OMNIA_SPL_BOOT_DEVICE_SPI +config MVEBU_SPL_BOOT_DEVICE_SPI bool "SPI NOR flash" -config TURRIS_OMNIA_SPL_BOOT_DEVICE_MMC +config MVEBU_SPL_BOOT_DEVICE_MMC bool "SDIO/MMC card" + select SPL_LIBDISK_SUPPORT endchoice -endif - config MVEBU_EFUSE bool "Enable eFuse support" default n diff --git a/board/gdsys/a38x/Kconfig b/board/gdsys/a38x/Kconfig deleted file mode 100644 index ff11eb2371..0000000000 --- a/board/gdsys/a38x/Kconfig +++ /dev/null @@ -1,24 +0,0 @@ -if TARGET_CONTROLCENTERDC - -menu "Controlcenter DC board options" - -choice - prompt "Select boot method" - -config SPL_BOOT_DEVICE_SPI - bool "SPI" - -config SPL_BOOT_DEVICE_MMC - bool "MMC" - select SPL_LIBDISK_SUPPORT - -endchoice - -#config SPL_BOOT_DEVICE -# int -# default 1 if SPL_BOOT_DEVICE_SPI -# default 2 if SPL_BOOT_DEVICE_MMC - -endmenu - -endif diff --git a/board/gdsys/a38x/Makefile b/board/gdsys/a38x/Makefile index 43fec2edbb..18ecbe5e79 100644 --- a/board/gdsys/a38x/Makefile +++ b/board/gdsys/a38x/Makefile @@ -13,10 +13,10 @@ obj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o extra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg KWB_REPLACE += BOOT_FROM -ifneq ($(CONFIG_SPL_BOOT_DEVICE_SPI),) +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),) KWB_CFG_BOOT_FROM=spi endif -ifneq ($(CONFIG_SPL_BOOT_DEVICE_MMC),) +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),) KWB_CFG_BOOT_FROM=sdio endif diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 9d4d0dfbb2..44d5016fbf 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -93,13 +93,13 @@ #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) #define CONFIG_SPL_DRIVERS_MISC_SUPPORT -#ifdef CONFIG_TURRIS_OMNIA_SPL_BOOT_DEVICE_SPI +#ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI /* SPL related SPI defines */ # define CONFIG_SYS_SPI_U_BOOT_OFFS 0x24000 # define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS #endif -#ifdef CONFIG_TURRIS_OMNIA_SPL_BOOT_DEVICE_MMC +#ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC /* SPL related MMC defines */ # define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10) # define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS From ca1a4c863232ddc6bc2463569dedfefe992ff418 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Mon, 18 Jun 2018 21:56:25 +0300 Subject: [PATCH 04/18] mvebu: select boot device at SoC level Move the gdsys Controlcenter DC specific build time kwbimage.cfg generation code into the mach-mvebu/ directory to be shared by all 32bit mvebu platforms. Remove board specific kwbimage.cfg files, and use the generated one instead. These files are all identical, with two exceptions. Clearfog and Helios4 use the sdio boot device, whereas all others use spi. Update the defconfigs for the exceptional boards to generate the same kwbimage.cfg as before. Signed-off-by: Baruch Siach Signed-off-by: Stefan Roese --- .../a38x => arch/arm/mach-mvebu}/.gitignore | 0 arch/arm/mach-mvebu/Makefile | 30 ++++++++++++++++++ arch/arm/mach-mvebu/include/mach/config.h | 4 +-- .../arm/mach-mvebu}/kwbimage.cfg.in | 0 board/CZ.NIC/turris_omnia/kwbimage.cfg | 12 ------- board/Marvell/db-88f6720/kwbimage.cfg | 12 ------- board/Marvell/db-88f6820-amc/kwbimage.cfg | 12 ------- board/Marvell/db-88f6820-gp/kwbimage.cfg | 12 ------- board/Marvell/db-mv784mp-gp/kwbimage.cfg | 12 ------- board/Synology/ds414/kwbimage.cfg | 12 ------- board/gdsys/a38x/Makefile | 31 ------------------- board/kobol/helios4/kwbimage.cfg | 13 -------- board/maxbcm/kwbimage.cfg | 12 ------- board/solidrun/clearfog/kwbimage.cfg | 12 ------- board/theadorable/kwbimage.cfg | 12 ------- configs/clearfog_defconfig | 2 +- configs/helios4_defconfig | 1 + 17 files changed, 34 insertions(+), 155 deletions(-) rename {board/gdsys/a38x => arch/arm/mach-mvebu}/.gitignore (100%) rename {board/gdsys/a38x => arch/arm/mach-mvebu}/kwbimage.cfg.in (100%) delete mode 100644 board/CZ.NIC/turris_omnia/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6720/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6820-amc/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6820-gp/kwbimage.cfg delete mode 100644 board/Marvell/db-mv784mp-gp/kwbimage.cfg delete mode 100644 board/Synology/ds414/kwbimage.cfg delete mode 100644 board/kobol/helios4/kwbimage.cfg delete mode 100644 board/maxbcm/kwbimage.cfg delete mode 100644 board/solidrun/clearfog/kwbimage.cfg delete mode 100644 board/theadorable/kwbimage.cfg diff --git a/board/gdsys/a38x/.gitignore b/arch/arm/mach-mvebu/.gitignore similarity index 100% rename from board/gdsys/a38x/.gitignore rename to arch/arm/mach-mvebu/.gitignore diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index ade7b87064..d907fac375 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -25,6 +25,36 @@ obj-$(CONFIG_ARMADA_375) += ../../../drivers/ddr/marvell/axp/xor.o obj-$(CONFIG_ARMADA_38X) += ../../../drivers/ddr/marvell/a38x/xor.o obj-$(CONFIG_ARMADA_XP) += ../../../drivers/ddr/marvell/axp/xor.o obj-$(CONFIG_MVEBU_EFUSE) += efuse.o + +extra-y += kwbimage.cfg + +KWB_REPLACE += BOOT_FROM +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),) + KWB_CFG_BOOT_FROM=spi +endif +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),) + KWB_CFG_BOOT_FROM=sdio +endif + +ifneq ($(CONFIG_SECURED_MODE_IMAGE),) +KWB_REPLACE += CSK_INDEX +KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX) + +KWB_REPLACE += SEC_BOOT_DEV +KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \ + $(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \ + $(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \ + ) + +KWB_REPLACE += SEC_FUSE_DUMP +KWB_CFG_SEC_FUSE_DUMP = a38x +endif + +$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \ + include/config/auto.conf + $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \ + <$< >$(dir $<)$(@F) + endif # CONFIG_SPL_BUILD obj-y += gpio.o obj-y += mbus.o diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h index 2acfd3314a..9f51411e43 100644 --- a/arch/arm/mach-mvebu/include/mach/config.h +++ b/arch/arm/mach-mvebu/include/mach/config.h @@ -32,12 +32,12 @@ #endif /* - * By default kwbimage.cfg from board specific folder is used + * By default the generated mvebu kwbimage.cfg is used * If for some board, different configuration file need to be used, * CONFIG_SYS_KWD_CONFIG should be defined in board specific header file */ #ifndef CONFIG_SYS_KWD_CONFIG -#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg +#define CONFIG_SYS_KWD_CONFIG arch/arm/mach-mvebu/kwbimage.cfg #endif /* CONFIG_SYS_KWD_CONFIG */ /* Add target to build it automatically upon "make" */ diff --git a/board/gdsys/a38x/kwbimage.cfg.in b/arch/arm/mach-mvebu/kwbimage.cfg.in similarity index 100% rename from board/gdsys/a38x/kwbimage.cfg.in rename to arch/arm/mach-mvebu/kwbimage.cfg.in diff --git a/board/CZ.NIC/turris_omnia/kwbimage.cfg b/board/CZ.NIC/turris_omnia/kwbimage.cfg deleted file mode 100644 index 1f748db37c..0000000000 --- a/board/CZ.NIC/turris_omnia/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese -# - -# 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 diff --git a/board/Marvell/db-88f6720/kwbimage.cfg b/board/Marvell/db-88f6720/kwbimage.cfg deleted file mode 100644 index 1f748db37c..0000000000 --- a/board/Marvell/db-88f6720/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese -# - -# 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 diff --git a/board/Marvell/db-88f6820-amc/kwbimage.cfg b/board/Marvell/db-88f6820-amc/kwbimage.cfg deleted file mode 100644 index 1f748db37c..0000000000 --- a/board/Marvell/db-88f6820-amc/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese -# - -# 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 diff --git a/board/Marvell/db-88f6820-gp/kwbimage.cfg b/board/Marvell/db-88f6820-gp/kwbimage.cfg deleted file mode 100644 index 1f748db37c..0000000000 --- a/board/Marvell/db-88f6820-gp/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese -# - -# 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 diff --git a/board/Marvell/db-mv784mp-gp/kwbimage.cfg b/board/Marvell/db-mv784mp-gp/kwbimage.cfg deleted file mode 100644 index 1f748db37c..0000000000 --- a/board/Marvell/db-mv784mp-gp/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese -# - -# 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 diff --git a/board/Synology/ds414/kwbimage.cfg b/board/Synology/ds414/kwbimage.cfg deleted file mode 100644 index 1f748db37c..0000000000 --- a/board/Synology/ds414/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese -# - -# 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 diff --git a/board/gdsys/a38x/Makefile b/board/gdsys/a38x/Makefile index 18ecbe5e79..32fffab467 100644 --- a/board/gdsys/a38x/Makefile +++ b/board/gdsys/a38x/Makefile @@ -7,36 +7,5 @@ obj-$(CONFIG_TARGET_CONTROLCENTERDC) += controlcenterdc.o hre.o spl.o keyprogram.o dt_helpers.o ifeq ($(CONFIG_SPL_BUILD),) - obj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o - -extra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg - -KWB_REPLACE += BOOT_FROM -ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),) - KWB_CFG_BOOT_FROM=spi -endif -ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),) - KWB_CFG_BOOT_FROM=sdio -endif - -ifneq ($(CONFIG_SECURED_MODE_IMAGE),) -KWB_REPLACE += CSK_INDEX -KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX) - -KWB_REPLACE += SEC_BOOT_DEV -KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \ - $(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \ - $(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \ - ) - -KWB_REPLACE += SEC_FUSE_DUMP -KWB_CFG_SEC_FUSE_DUMP = a38x -endif - -$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \ - include/config/auto.conf - $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \ - <$< >$(dir $<)$(@F) - endif diff --git a/board/kobol/helios4/kwbimage.cfg b/board/kobol/helios4/kwbimage.cfg deleted file mode 100644 index 035063bc90..0000000000 --- a/board/kobol/helios4/kwbimage.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2015 Stefan Roese -# - -# Armada 38x use version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM sdio - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/maxbcm/kwbimage.cfg b/board/maxbcm/kwbimage.cfg deleted file mode 100644 index 1f748db37c..0000000000 --- a/board/maxbcm/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese -# - -# 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 diff --git a/board/solidrun/clearfog/kwbimage.cfg b/board/solidrun/clearfog/kwbimage.cfg deleted file mode 100644 index f41d25a8a1..0000000000 --- a/board/solidrun/clearfog/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2015 Stefan Roese -# - -# Armada 38x use version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM sdio - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/theadorable/kwbimage.cfg b/board/theadorable/kwbimage.cfg deleted file mode 100644 index 4f3b7b23f3..0000000000 --- a/board/theadorable/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2015-2016 Stefan Roese -# - -# 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 diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig index 7a9ee51017..2164e20a3f 100644 --- a/configs/clearfog_defconfig +++ b/configs/clearfog_defconfig @@ -6,12 +6,12 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_CLEARFOG=y +CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=250000000 -CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog" CONFIG_DEBUG_UART=y CONFIG_DISTRO_DEFAULTS=y diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index 441b3752d1..f1eddaff5d 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -5,6 +5,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_HELIOS4=y +CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y From 72c4e67d08fe2389754b4ce874d76b1bbd9fef24 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Mon, 18 Jun 2018 21:56:26 +0300 Subject: [PATCH 05/18] mvebu: support UART boot image The kwboot utility can use the generated image to boot mvebu SoCs from UART. Signed-off-by: Baruch Siach Signed-off-by: Stefan Roese --- arch/arm/mach-mvebu/Kconfig | 3 +++ arch/arm/mach-mvebu/Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index e1b70c54fc..d1f71338ac 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -193,6 +193,9 @@ config MVEBU_SPL_BOOT_DEVICE_MMC bool "SDIO/MMC card" select SPL_LIBDISK_SUPPORT +config MVEBU_SPL_BOOT_DEVICE_UART + bool "UART" + endchoice config MVEBU_EFUSE diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index d907fac375..ee2eca9134 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -35,6 +35,9 @@ endif ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),) KWB_CFG_BOOT_FROM=sdio endif +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART),) + KWB_CFG_BOOT_FROM=uart +endif ifneq ($(CONFIG_SECURED_MODE_IMAGE),) KWB_REPLACE += CSK_INDEX From 4fe3f1bfdfeea6c3632f5a98eff8fbd6564dad75 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Mon, 18 Jun 2018 21:56:27 +0300 Subject: [PATCH 06/18] mvebu: clearfog: use kconfig symbols to select boot device This allows selection of the boot device at build time without source code modification. Signed-off-by: Baruch Siach Signed-off-by: Stefan Roese --- include/configs/clearfog.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h index 1141aee08b..7d56dfd86e 100644 --- a/include/configs/clearfog.h +++ b/include/configs/clearfog.h @@ -70,16 +70,6 @@ "initrd_high=0x10000000\0" /* SPL */ -/* - * Select the boot device here - * - * Currently supported are: - * SPL_BOOT_SPI_NOR_FLASH - Booting via SPI NOR flash - * SPL_BOOT_SDIO_MMC_CARD - Booting via SDIO/MMC card (partition 1) - */ -#define SPL_BOOT_SPI_NOR_FLASH 1 -#define SPL_BOOT_SDIO_MMC_CARD 2 -#define CONFIG_SPL_BOOT_DEVICE SPL_BOOT_SDIO_MMC_CARD /* Defines for SPL */ #define CONFIG_SPL_SIZE (140 << 10) @@ -96,13 +86,11 @@ #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) -#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH +#if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI) /* SPL related SPI defines */ #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS -#endif - -#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD +#elif defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) /* SPL related MMC defines */ #define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10) #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS From f596efb7499eceadf2940c35982df8cb44c3344b Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Tue, 7 Aug 2018 19:41:44 +1200 Subject: [PATCH 07/18] configs: kirkwood: ds109: switch to DM_I2C Enable DM_I2C and I2C_MVTSWI for the ds109 board. Signed-off-by: Chris Packham Signed-off-by: Stefan Roese --- configs/ds109_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/ds109_defconfig b/configs/ds109_defconfig index c9207433b3..fd10e6e3c3 100644 --- a/configs/ds109_defconfig +++ b/configs/ds109_defconfig @@ -18,6 +18,8 @@ CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_MVSATA_IDE=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_MVTWSI=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_BAR=y From 70222a6beb4d8ed570dfa281b1ba681fe76a7f8a Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Tue, 7 Aug 2018 19:41:45 +1200 Subject: [PATCH 08/18] configs: move RTC_MV config from mv-plug-common.h to boards To aid in migrating CONFIG_RTC_MV to Kconfig move the definition of it from mv-plug-common.h to the board config headers that nest it. Signed-off-by: Chris Packham Signed-off-by: Stefan Roese --- include/configs/dreamplug.h | 4 ++++ include/configs/ds109.h | 4 ++++ include/configs/guruplug.h | 4 ++++ include/configs/mv-plug-common.h | 7 ------- include/configs/sheevaplug.h | 4 ++++ 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h index 1c94bf9fa1..742232d2d6 100644 --- a/include/configs/dreamplug.h +++ b/include/configs/dreamplug.h @@ -27,6 +27,10 @@ */ #include "mv-plug-common.h" +#ifdef CONFIG_CMD_DATE +#define CONFIG_RTC_MV +#endif /* CONFIG_CMD_DATE */ + /* * Environment variables configurations */ diff --git a/include/configs/ds109.h b/include/configs/ds109.h index c06f0058de..f8d6637142 100644 --- a/include/configs/ds109.h +++ b/include/configs/ds109.h @@ -30,6 +30,10 @@ */ #include "mv-plug-common.h" +#ifdef CONFIG_CMD_DATE +#define CONFIG_RTC_MV +#endif /* CONFIG_CMD_DATE */ + /* * Environment variables configurations */ diff --git a/include/configs/guruplug.h b/include/configs/guruplug.h index 739ab320f6..3ce021abea 100644 --- a/include/configs/guruplug.h +++ b/include/configs/guruplug.h @@ -25,6 +25,10 @@ */ #include "mv-plug-common.h" +#ifdef CONFIG_CMD_DATE +#define CONFIG_RTC_MV +#endif /* CONFIG_CMD_DATE */ + /* * Environment variables configurations */ diff --git a/include/configs/mv-plug-common.h b/include/configs/mv-plug-common.h index 81c07a889a..f424e2cc6c 100644 --- a/include/configs/mv-plug-common.h +++ b/include/configs/mv-plug-common.h @@ -22,11 +22,4 @@ */ #include "mv-common.h" -/* - * RTC driver configuration - */ -#ifdef CONFIG_CMD_DATE -#define CONFIG_RTC_MV -#endif /* CONFIG_CMD_DATE */ - #endif /* _CONFIG_MARVELL_PLUG_H */ diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h index deec71734d..12e38b3f12 100644 --- a/include/configs/sheevaplug.h +++ b/include/configs/sheevaplug.h @@ -29,6 +29,10 @@ */ #include "mv-plug-common.h" +#ifdef CONFIG_CMD_DATE +#define CONFIG_RTC_MV +#endif /* CONFIG_CMD_DATE */ + /* * Environment variables configurations */ From b8ce90a8df43348bc7b74562aadcde0014f4d29a Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Tue, 7 Aug 2018 19:41:46 +1200 Subject: [PATCH 09/18] configs: kirkwood: Move RTC_MV to DM and Kconfig Now that there is DM support in the RTC_MV driver update board configs to use it. Signed-off-by: Chris Packham Signed-off-by: Stefan Roese --- configs/SBx81LIFKW_defconfig | 2 ++ configs/dns325_defconfig | 5 ++++- configs/dreamplug_defconfig | 5 ++++- configs/ds109_defconfig | 5 ++++- configs/goflexhome_defconfig | 5 ++++- configs/guruplug_defconfig | 5 ++++- configs/nas220_defconfig | 5 ++++- configs/sheevaplug_defconfig | 5 ++++- include/configs/SBx81LIFKW.h | 5 ----- include/configs/dns325.h | 7 ------- include/configs/dreamplug.h | 4 ---- include/configs/ds109.h | 4 ---- include/configs/goflexhome.h | 7 ------- include/configs/guruplug.h | 4 ---- include/configs/nas220.h | 7 ------- include/configs/sheevaplug.h | 4 ---- 16 files changed, 30 insertions(+), 49 deletions(-) diff --git a/configs/SBx81LIFKW_defconfig b/configs/SBx81LIFKW_defconfig index 348f861a14..c786120e7f 100644 --- a/configs/SBx81LIFKW_defconfig +++ b/configs/SBx81LIFKW_defconfig @@ -35,5 +35,7 @@ CONFIG_MV88E61XX_SWITCH=y CONFIG_MV88E61XX_CPU_PORT=10 CONFIG_MV88E61XX_PHY_PORTS=0x003 CONFIG_MV88E61XX_FIXED_PORTS=0x300 +CONFIG_DM_RTC=y +CONFIG_RTC_MV=y CONFIG_SPI=y CONFIG_KIRKWOOD_SPI=y diff --git a/configs/dns325_defconfig b/configs/dns325_defconfig index f0ed209928..d77f7766ee 100644 --- a/configs/dns325_defconfig +++ b/configs/dns325_defconfig @@ -4,6 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_DNS325=y CONFIG_IDENT_STRING="\nD-Link DNS-325" CONFIG_DEFAULT_DEVICE_TREE="kirkwood-dns325" +# CONFIG_SYS_MALLOC_F is not set CONFIG_BOOTDELAY=3 CONFIG_CONSOLE_MUX=y # CONFIG_DISPLAY_BOARDINFO is not set @@ -16,7 +17,6 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y -CONFIG_CMD_DATE=y CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_JFFS2=y @@ -26,10 +26,13 @@ CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_DM=y CONFIG_MVSATA_IDE=y # CONFIG_MMC is not set CONFIG_NETDEVICES=y CONFIG_MVGBE=y +CONFIG_DM_RTC=y +CONFIG_RTC_MV=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/dreamplug_defconfig b/configs/dreamplug_defconfig index 8090c9a377..d7428ae9cd 100644 --- a/configs/dreamplug_defconfig +++ b/configs/dreamplug_defconfig @@ -4,6 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_DREAMPLUG=y CONFIG_IDENT_STRING="\nMarvell-DreamPlug" CONFIG_DEFAULT_DEVICE_TREE="kirkwood-dreamplug" +# CONFIG_SYS_MALLOC_F is not set CONFIG_BOOTDELAY=3 # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_HUSH_PARSER=y @@ -15,19 +16,21 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y -CONFIG_CMD_DATE=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_DM=y CONFIG_MVSATA_IDE=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_MACRONIX=y CONFIG_NETDEVICES=y CONFIG_MVGBE=y +CONFIG_DM_RTC=y +CONFIG_RTC_MV=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_KIRKWOOD_SPI=y diff --git a/configs/ds109_defconfig b/configs/ds109_defconfig index fd10e6e3c3..6428614c93 100644 --- a/configs/ds109_defconfig +++ b/configs/ds109_defconfig @@ -3,6 +3,7 @@ CONFIG_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_DS109=y CONFIG_DEFAULT_DEVICE_TREE="kirkwood-ds109" +# CONFIG_SYS_MALLOC_F is not set CONFIG_HUSH_PARSER=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_IDE=y @@ -12,11 +13,11 @@ CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y -CONFIG_CMD_DATE=y CONFIG_CMD_FAT=y CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_DM=y CONFIG_MVSATA_IDE=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_MVTWSI=y @@ -26,6 +27,8 @@ CONFIG_SPI_FLASH_BAR=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_NETDEVICES=y CONFIG_MVGBE=y +CONFIG_DM_RTC=y +CONFIG_RTC_MV=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_KIRKWOOD_SPI=y diff --git a/configs/goflexhome_defconfig b/configs/goflexhome_defconfig index c0894c05ea..41d896a725 100644 --- a/configs/goflexhome_defconfig +++ b/configs/goflexhome_defconfig @@ -4,6 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_GOFLEXHOME=y CONFIG_IDENT_STRING="\nSeagate GoFlex Home" CONFIG_DEFAULT_DEVICE_TREE="kirkwood-goflexnet" +# CONFIG_SYS_MALLOC_F is not set CONFIG_BOOTDELAY=3 CONFIG_CONSOLE_MUX=y # CONFIG_DISPLAY_BOARDINFO is not set @@ -16,7 +17,6 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y -CONFIG_CMD_DATE=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y @@ -27,10 +27,13 @@ CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_DM=y CONFIG_MVSATA_IDE=y # CONFIG_MMC is not set CONFIG_NETDEVICES=y CONFIG_MVGBE=y +CONFIG_DM_RTC=y +CONFIG_RTC_MV=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/guruplug_defconfig b/configs/guruplug_defconfig index da3895d4db..d77922e2a7 100644 --- a/configs/guruplug_defconfig +++ b/configs/guruplug_defconfig @@ -4,6 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_GURUPLUG=y CONFIG_IDENT_STRING="\nMarvell-GuruPlug" CONFIG_DEFAULT_DEVICE_TREE="kirkwood-guruplug-server-plus" +# CONFIG_SYS_MALLOC_F is not set CONFIG_BOOTDELAY=3 # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_HUSH_PARSER=y @@ -16,7 +17,6 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y -CONFIG_CMD_DATE=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y @@ -27,10 +27,13 @@ CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_DM=y CONFIG_MVSATA_IDE=y # CONFIG_MMC is not set CONFIG_NETDEVICES=y CONFIG_MVGBE=y +CONFIG_DM_RTC=y +CONFIG_RTC_MV=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/nas220_defconfig b/configs/nas220_defconfig index ddf5689bf4..4ae69fe71a 100644 --- a/configs/nas220_defconfig +++ b/configs/nas220_defconfig @@ -4,6 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NAS220=y CONFIG_IDENT_STRING="\nNAS 220" CONFIG_DEFAULT_DEVICE_TREE="kirkwood-blackarmor-nas220" +# CONFIG_SYS_MALLOC_F is not set CONFIG_BOOTDELAY=3 # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_HUSH_PARSER=y @@ -16,7 +17,6 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y -CONFIG_CMD_DATE=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y @@ -27,10 +27,13 @@ CONFIG_EFI_PARTITION=y # CONFIG_PARTITION_UUIDS is not set CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_DM=y CONFIG_MVSATA_IDE=y # CONFIG_MMC is not set CONFIG_NETDEVICES=y CONFIG_MVGBE=y +CONFIG_DM_RTC=y +CONFIG_RTC_MV=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig index d27698fcce..b965ff442a 100644 --- a/configs/sheevaplug_defconfig +++ b/configs/sheevaplug_defconfig @@ -5,6 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_SHEEVAPLUG=y CONFIG_IDENT_STRING="\nMarvell-Sheevaplug" CONFIG_DEFAULT_DEVICE_TREE="kirkwood-sheevaplug" +# CONFIG_SYS_MALLOC_F is not set CONFIG_BOOTDELAY=3 # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_HUSH_PARSER=y @@ -18,7 +19,6 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y -CONFIG_CMD_DATE=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y @@ -29,9 +29,12 @@ CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_DM=y CONFIG_MVSATA_IDE=y CONFIG_NETDEVICES=y CONFIG_MVGBE=y +CONFIG_DM_RTC=y +CONFIG_RTC_MV=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/include/configs/SBx81LIFKW.h b/include/configs/SBx81LIFKW.h index bcc2c201d2..24712662d4 100644 --- a/include/configs/SBx81LIFKW.h +++ b/include/configs/SBx81LIFKW.h @@ -109,11 +109,6 @@ #define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */ #endif /* CONFIG_CMD_NET */ -/* - * Time settings - */ -#define CONFIG_RTC_MV - #define CONFIG_SYS_LOAD_ADDR 0x1000000 /* default location for tftp and bootm */ #endif /* _CONFIG_SBX81LIFKW_H */ diff --git a/include/configs/dns325.h b/include/configs/dns325.h index 0d52ffb4d7..8658c80fdc 100644 --- a/include/configs/dns325.h +++ b/include/configs/dns325.h @@ -54,13 +54,6 @@ #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET #endif -/* - * RTC driver configuration - */ -#ifdef CONFIG_CMD_DATE -#define CONFIG_RTC_MV -#endif - /* * Enable GPI0 support */ diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h index 742232d2d6..1c94bf9fa1 100644 --- a/include/configs/dreamplug.h +++ b/include/configs/dreamplug.h @@ -27,10 +27,6 @@ */ #include "mv-plug-common.h" -#ifdef CONFIG_CMD_DATE -#define CONFIG_RTC_MV -#endif /* CONFIG_CMD_DATE */ - /* * Environment variables configurations */ diff --git a/include/configs/ds109.h b/include/configs/ds109.h index f8d6637142..c06f0058de 100644 --- a/include/configs/ds109.h +++ b/include/configs/ds109.h @@ -30,10 +30,6 @@ */ #include "mv-plug-common.h" -#ifdef CONFIG_CMD_DATE -#define CONFIG_RTC_MV -#endif /* CONFIG_CMD_DATE */ - /* * Environment variables configurations */ diff --git a/include/configs/goflexhome.h b/include/configs/goflexhome.h index 29e104f3c6..1d69a4e518 100644 --- a/include/configs/goflexhome.h +++ b/include/configs/goflexhome.h @@ -93,11 +93,4 @@ #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET #endif /*CONFIG_MVSATA_IDE*/ -/* - * * RTC driver configuration - * */ -#ifdef CONFIG_CMD_DATE -#define CONFIG_RTC_MV -#endif /* CONFIG_CMD_DATE */ - #endif /* _CONFIG_GOFLEXHOME_H */ diff --git a/include/configs/guruplug.h b/include/configs/guruplug.h index 3ce021abea..739ab320f6 100644 --- a/include/configs/guruplug.h +++ b/include/configs/guruplug.h @@ -25,10 +25,6 @@ */ #include "mv-plug-common.h" -#ifdef CONFIG_CMD_DATE -#define CONFIG_RTC_MV -#endif /* CONFIG_CMD_DATE */ - /* * Environment variables configurations */ diff --git a/include/configs/nas220.h b/include/configs/nas220.h index b37705e26e..ca5cb2a838 100644 --- a/include/configs/nas220.h +++ b/include/configs/nas220.h @@ -107,13 +107,6 @@ * EFI partition */ -/* - * Date Time - */ -#ifdef CONFIG_CMD_DATE -#define CONFIG_RTC_MV -#endif /* CONFIG_CMD_DATE */ - #define CONFIG_KIRKWOOD_GPIO #endif /* _CONFIG_NAS220_H */ diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h index 12e38b3f12..deec71734d 100644 --- a/include/configs/sheevaplug.h +++ b/include/configs/sheevaplug.h @@ -29,10 +29,6 @@ */ #include "mv-plug-common.h" -#ifdef CONFIG_CMD_DATE -#define CONFIG_RTC_MV -#endif /* CONFIG_CMD_DATE */ - /* * Environment variables configurations */ From bf3eaa3e5c8213c128a2490bc969cdb724bb149d Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Thu, 14 Jun 2018 18:17:51 +0300 Subject: [PATCH 10/18] arm: mvebu: solidrun-microsom: update SPI flash compatible Add the "spi-flash" compatible string so that the generic sf_probe driver can probe the SPI flash on the SolidRun SOM. Signed-off-by: Baruch Siach Signed-off-by: Stefan Roese --- arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi index a2627223ce..74f58de85c 100644 --- a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi +++ b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi @@ -86,7 +86,7 @@ w25q32: spi-flash@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "w25q32", "jedec,spi-nor"; + compatible = "w25q32", "jedec,spi-nor", "spi-flash"; reg = <0>; /* Chip select 0 */ spi-max-frequency = <3000000>; status = "disabled"; From a4adb1f576e74351fad287742ca1e72f03c7ebc1 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Thu, 14 Jun 2018 18:17:52 +0300 Subject: [PATCH 11/18] arm: mvebu: clearfog: use the microsom .dtsi Use hardware description from the recently introduced microsom .dtsi file to reduce duplication. Signed-off-by: Baruch Siach Reviewed-by: Dennis Gilmore Tested-by: Dennis Gilmore Signed-off-by: Stefan Roese --- arch/arm/dts/armada-388-clearfog.dts | 63 +++------------------------- 1 file changed, 6 insertions(+), 57 deletions(-) diff --git a/arch/arm/dts/armada-388-clearfog.dts b/arch/arm/dts/armada-388-clearfog.dts index a0b566a5ae..1403600e5b 100644 --- a/arch/arm/dts/armada-388-clearfog.dts +++ b/arch/arm/dts/armada-388-clearfog.dts @@ -50,6 +50,7 @@ #include #include #include "armada-388.dtsi" +#include "armada-38x-solidrun-microsom.dtsi" / { model = "SolidRun Clearfog A1"; @@ -70,11 +71,6 @@ stdout-path = "serial0:115200n8"; }; - memory { - device_type = "memory"; - reg = <0x00000000 0x10000000>; /* 256 MB */ - }; - reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "3P3V"; @@ -84,11 +80,6 @@ }; soc { - ranges = ; - internal-regs { ethernet@30000 { mac-address = [00 50 43 02 02 02]; @@ -108,15 +99,6 @@ status = "okay"; }; - ethernet@70000 { - mac-address = [00 50 43 02 02 01]; - pinctrl-0 = <&ge0_rgmii_pins>; - pinctrl-names = "default"; - phy = <&phy_dedicated>; - phy-mode = "rgmii-id"; - status = "okay"; - }; - i2c@11000 { /* Is there anything on this? */ clock-frequency = <100000>; @@ -226,22 +208,6 @@ status = "okay"; }; - mdio@72004 { - pinctrl-0 = <&mdio_pins>; - pinctrl-names = "default"; - - phy_dedicated: ethernet-phy@0 { - /* - * Annoyingly, the marvell phy driver - * configures the LED register, rather - * than preserving reset-loaded setting. - * We undo that rubbish here. - */ - marvell,reg-init = <3 16 0 0x101e>; - reg = <0>; - }; - }; - pinctrl@18000 { clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins { marvell,pins = "mpp46"; @@ -260,12 +226,6 @@ marvell,pins = "mpp20"; marvell,function = "gpio"; }; - clearfog_sdhci_pins: clearfog-sdhci-pins { - marvell,pins = "mpp21", "mpp28", - "mpp37", "mpp38", - "mpp39", "mpp40"; - marvell,function = "sd0"; - }; clearfog_spi1_cs_pins: spi1-cs-pins { marvell,pins = "mpp55"; marvell,function = "spi1"; @@ -311,7 +271,7 @@ bus-width = <4>; cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; no-1-8-v; - pinctrl-0 = <&clearfog_sdhci_pins + pinctrl-0 = <µsom_sdhci_pins &clearfog_sdhci_cd_pins>; pinctrl-names = "default"; status = "okay"; @@ -319,13 +279,6 @@ wp-inverted; }; - serial@12000 { - pinctrl-0 = <&uart0_pins>; - pinctrl-names = "default"; - status = "okay"; - u-boot,dm-pre-reloc; - }; - serial@12100 { /* mikrobus uart */ pinctrl-0 = <&mikro_uart_pins>; @@ -342,14 +295,6 @@ pinctrl-0 = <&spi1_pins &clearfog_spi1_cs_pins &mikro_spi_pins>; pinctrl-names = "default"; status = "okay"; - - spi-flash@0 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "w25q32", "jedec,spi-nor", "spi-flash"; - reg = <0>; /* Chip select 0 */ - spi-max-frequency = <3000000>; - }; }; usb3@f8000 { @@ -457,6 +402,10 @@ }; }; +&w25q32 { + status = "okay"; +}; + /* +#define A38x_CUSTOMER_BOARD_1_MPP16_23 0x00400011 MPP18: gpio ? (pca9655 int?) From 334eebefc2334495e3b264189aec446b1f817993 Mon Sep 17 00:00:00 2001 From: Jon Nettleton Date: Thu, 14 Jun 2018 18:17:53 +0300 Subject: [PATCH 12/18] arm: mvebu: Better align Clearfog dts file with Linux kernel This makes changes so the u-boot dts file is structured more similar to the mainline linux dtsi file. It provides a minimal common dts that can work for most boards based on the ClearFog platform. Ethernet support is only supported for eth0 however all devices are left enabled so u-boot can generate and provide mac addresses for all of the network interfaces. Signed-off-by: Jon Nettleton [baruch: rebase on recent changes] Signed-off-by: Baruch Siach Reviewed-by: Dennis Gilmore Tested-by: Dennis Gilmore Signed-off-by: Stefan Roese --- arch/arm/dts/armada-388-clearfog.dts | 386 +++++++++++---------------- 1 file changed, 151 insertions(+), 235 deletions(-) diff --git a/arch/arm/dts/armada-388-clearfog.dts b/arch/arm/dts/armada-388-clearfog.dts index 1403600e5b..16a47d59e6 100644 --- a/arch/arm/dts/armada-388-clearfog.dts +++ b/arch/arm/dts/armada-388-clearfog.dts @@ -81,174 +81,6 @@ soc { internal-regs { - ethernet@30000 { - mac-address = [00 50 43 02 02 02]; - phy-mode = "sgmii"; - status = "okay"; - - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - - ethernet@34000 { - mac-address = [00 50 43 02 02 03]; - managed = "in-band-status"; - phy-mode = "sgmii"; - status = "okay"; - }; - - i2c@11000 { - /* Is there anything on this? */ - clock-frequency = <100000>; - pinctrl-0 = <&i2c0_pins>; - pinctrl-names = "default"; - status = "okay"; - - /* - * PCA9655 GPIO expander, up to 1MHz clock. - * 0-CON3 CLKREQ# - * 1-CON3 PERST# - * 2-CON2 PERST# - * 3-CON3 W_DISABLE - * 4-CON2 CLKREQ# - * 5-USB3 overcurrent - * 6-USB3 power - * 7-CON2 W_DISABLE - * 8-JP4 P1 - * 9-JP4 P4 - * 10-JP4 P5 - * 11-m.2 DEVSLP - * 12-SFP_LOS - * 13-SFP_TX_FAULT - * 14-SFP_TX_DISABLE - * 15-SFP_MOD_DEF0 - */ - expander0: gpio-expander@20 { - /* - * This is how it should be: - * compatible = "onnn,pca9655", - * "nxp,pca9555"; - * but you can't do this because of - * the way I2C works. - */ - compatible = "nxp,pca9555"; - gpio-controller; - #gpio-cells = <2>; - reg = <0x20>; - - pcie1_0_clkreq { - gpio-hog; - gpios = <0 GPIO_ACTIVE_LOW>; - input; - line-name = "pcie1.0-clkreq"; - }; - pcie1_0_w_disable { - gpio-hog; - gpios = <3 GPIO_ACTIVE_LOW>; - output-low; - line-name = "pcie1.0-w-disable"; - }; - pcie2_0_clkreq { - gpio-hog; - gpios = <4 GPIO_ACTIVE_LOW>; - input; - line-name = "pcie2.0-clkreq"; - }; - pcie2_0_w_disable { - gpio-hog; - gpios = <7 GPIO_ACTIVE_LOW>; - output-low; - line-name = "pcie2.0-w-disable"; - }; - usb3_ilimit { - gpio-hog; - gpios = <5 GPIO_ACTIVE_LOW>; - input; - line-name = "usb3-current-limit"; - }; - usb3_power { - gpio-hog; - gpios = <6 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "usb3-power"; - }; - m2_devslp { - gpio-hog; - gpios = <11 GPIO_ACTIVE_HIGH>; - output-low; - line-name = "m.2 devslp"; - }; - }; - - /* The MCP3021 is 100kHz clock only */ - mikrobus_adc: mcp3021@4c { - compatible = "microchip,mcp3021"; - reg = <0x4c>; - }; - - /* Also something at 0x64 */ - }; - - i2c@11100 { - /* - * Routed to SFP, mikrobus, and PCIe. - * SFP limits this to 100kHz, and requires - * an AT24C01A/02/04 with address pins tied - * low, which takes addresses 0x50 and 0x51. - * Mikrobus doesn't specify beyond an I2C - * bus being present. - * PCIe uses ARP to assign addresses, or - * 0x63-0x64. - */ - clock-frequency = <100000>; - pinctrl-0 = <&clearfog_i2c1_pins>; - pinctrl-names = "default"; - status = "okay"; - }; - - pinctrl@18000 { - clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins { - marvell,pins = "mpp46"; - marvell,function = "ref"; - }; - clearfog_dsa0_pins: clearfog-dsa0-pins { - marvell,pins = "mpp23", "mpp41"; - marvell,function = "gpio"; - }; - clearfog_i2c1_pins: i2c1-pins { - /* SFP, PCIe, mSATA, mikrobus */ - marvell,pins = "mpp26", "mpp27"; - marvell,function = "i2c1"; - }; - clearfog_sdhci_cd_pins: clearfog-sdhci-cd-pins { - marvell,pins = "mpp20"; - marvell,function = "gpio"; - }; - clearfog_spi1_cs_pins: spi1-cs-pins { - marvell,pins = "mpp55"; - marvell,function = "spi1"; - }; - mikro_pins: mikro-pins { - /* int: mpp22 rst: mpp29 */ - marvell,pins = "mpp22", "mpp29"; - marvell,function = "gpio"; - }; - mikro_spi_pins: mikro-spi-pins { - marvell,pins = "mpp43"; - marvell,function = "spi1"; - }; - mikro_uart_pins: mikro-uart-pins { - marvell,pins = "mpp24", "mpp25"; - marvell,function = "ua1"; - }; - rear_button_pins: rear-button-pins { - marvell,pins = "mpp34"; - marvell,function = "gpio"; - }; - }; - rtc@a3800 { /* * If the rtc doesn't work, run "date reset" @@ -297,7 +129,8 @@ status = "okay"; }; - usb3@f8000 { + usb0: usb3@f8000 { + /* CON7, USB-A port on back of device */ status = "okay"; }; }; @@ -321,72 +154,6 @@ }; }; - sfp: sfp { - compatible = "sff,sfp"; - i2c-bus = <&i2c1>; - los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>; - moddef0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>; - sfp,ethernet = <ð2>; - tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>; - tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>; - }; - - dsa@0 { - compatible = "marvell,dsa"; - dsa,ethernet = <ð1>; - dsa,mii-bus = <&mdio>; - pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>; - pinctrl-names = "default"; - #address-cells = <2>; - #size-cells = <0>; - - switch@0 { - #address-cells = <1>; - #size-cells = <0>; - reg = <4 0>; - - port@0 { - reg = <0>; - label = "lan1"; - }; - - port@1 { - reg = <1>; - label = "lan2"; - }; - - port@2 { - reg = <2>; - label = "lan3"; - }; - - port@3 { - reg = <3>; - label = "lan4"; - }; - - port@4 { - reg = <4>; - label = "lan5"; - }; - - port@5 { - reg = <5>; - label = "cpu"; - }; - - port@6 { - /* 88E1512 external phy */ - reg = <6>; - label = "lan6"; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - }; - }; - gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&rear_button_pins>; @@ -406,6 +173,155 @@ status = "okay"; }; +ð1 { + managed = "in-band-status"; + phy-mode = "sgmii"; + status = "okay"; +}; + +ð2 { + phy-mode = "sgmii"; + status = "okay"; +}; + +&i2c0 { + clock-frequency = <400000>; + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + status = "okay"; + + /* + * PCA9655 GPIO expander, up to 1MHz clock. + * 0-CON3 CLKREQ# + * 1-CON3 PERST# + * 2-CON2 PERST# + * 3-CON3 W_DISABLE + * 4-CON2 CLKREQ# + * 5-USB3 overcurrent + * 6-USB3 power + * 7-CON2 W_DISABLE + * 8-JP4 P1 + * 9-JP4 P4 + * 10-JP4 P5 + * 11-m.2 DEVSLP + * 12-SFP_LOS + * 13-SFP_TX_FAULT + * 14-SFP_TX_DISABLE + * 15-SFP_MOD_DEF0 + */ + expander0: gpio-expander@20 { + /* + * This is how it should be: + * compatible = "onnn,pca9655", + * "nxp,pca9555"; + * but you can't do this because of + * the way I2C works. + */ + compatible = "nxp,pca9555"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x20>; + + pcie1_0_clkreq { + gpio-hog; + gpios = <0 GPIO_ACTIVE_LOW>; + input; + line-name = "pcie1.0-clkreq"; + }; + pcie1_0_w_disable { + gpio-hog; + gpios = <3 GPIO_ACTIVE_LOW>; + output-low; + line-name = "pcie1.0-w-disable"; + }; + pcie2_0_clkreq { + gpio-hog; + gpios = <4 GPIO_ACTIVE_LOW>; + input; + line-name = "pcie2.0-clkreq"; + }; + pcie2_0_w_disable { + gpio-hog; + gpios = <7 GPIO_ACTIVE_LOW>; + output-low; + line-name = "pcie2.0-w-disable"; + }; + usb3_ilimit { + gpio-hog; + gpios = <5 GPIO_ACTIVE_LOW>; + input; + line-name = "usb3-current-limit"; + }; + usb3_power { + gpio-hog; + gpios = <6 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "usb3-power"; + }; + m2_devslp { + gpio-hog; + gpios = <11 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "m.2 devslp"; + }; + }; + + mikrobus_adc: mcp3021@4c { + compatible = "microchip,mcp3021"; + reg = <0x4c>; + }; +}; + +&i2c1 { + /* + * Routed to SFP, mikrobus, and PCIe. + * SFP limits this to 100kHz, and requires + * an AT24C01A/02/04 with address pins tied + * low, which takes addresses 0x50 and 0x51. + * Mikrobus doesn't specify beyond an I2C + * bus being present. + * PCIe uses ARP to assign addresses, or + * 0x63-0x64. + */ + clock-frequency = <100000>; + pinctrl-0 = <&clearfog_i2c1_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pinctrl { + clearfog_i2c1_pins: i2c1-pins { + /* SFP, PCIe, mSATA, mikrobus */ + marvell,pins = "mpp26", "mpp27"; + marvell,function = "i2c1"; + }; + clearfog_sdhci_cd_pins: clearfog-sdhci-cd-pins { + marvell,pins = "mpp20"; + marvell,function = "gpio"; + }; + clearfog_spi1_cs_pins: spi1-cs-pins { + marvell,pins = "mpp55"; + marvell,function = "spi1"; + }; + mikro_pins: mikro-pins { + /* int: mpp22 rst: mpp29 */ + marvell,pins = "mpp22", "mpp29"; + marvell,function = "gpio"; + }; + mikro_spi_pins: mikro-spi-pins { + marvell,pins = "mpp43"; + marvell,function = "spi1"; + }; + mikro_uart_pins: mikro-uart-pins { + marvell,pins = "mpp24", "mpp25"; + marvell,function = "ua1"; + }; + rear_button_pins: rear-button-pins { + marvell,pins = "mpp34"; + marvell,function = "gpio"; + }; +}; + /* +#define A38x_CUSTOMER_BOARD_1_MPP16_23 0x00400011 MPP18: gpio ? (pca9655 int?) From 69601ce003e4066f4394ddccc48ab6aabc0d314a Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Thu, 14 Jun 2018 18:17:54 +0300 Subject: [PATCH 13/18] arm: mvebu: helios4: remove duplicate sdhci pins node The same pinctrl node appears in the solidrun-microsom dtsi. Use that instead. Cc: Dennis Gilmore Signed-off-by: Baruch Siach Reviewed-by: Dennis Gilmore Tested-by: Dennis Gilmore Signed-off-by: Stefan Roese --- arch/arm/dts/armada-388-helios4.dts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/arm/dts/armada-388-helios4.dts b/arch/arm/dts/armada-388-helios4.dts index 049d322964..a154e0f4f4 100644 --- a/arch/arm/dts/armada-388-helios4.dts +++ b/arch/arm/dts/armada-388-helios4.dts @@ -248,7 +248,7 @@ bus-width = <4>; cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; no-1-8-v; - pinctrl-0 = <&helios_sdhci_pins + pinctrl-0 = <µsom_sdhci_pins &helios_sdhci_cd_pins>; pinctrl-names = "default"; status = "okay"; @@ -286,12 +286,6 @@ marvell,pins = "mpp20"; marvell,function = "gpio"; }; - helios_sdhci_pins: helios-sdhci-pins { - marvell,pins = "mpp21", "mpp28", - "mpp37", "mpp38", - "mpp39", "mpp40"; - marvell,function = "sd0"; - }; helios_led_pins: helios-led-pins { marvell,pins = "mpp24", "mpp25", "mpp49", "mpp50", From 14deee2081cca5e41e14883c6006e2e74b165cd7 Mon Sep 17 00:00:00 2001 From: Jon Nettleton Date: Thu, 21 Jun 2018 12:35:49 +0300 Subject: [PATCH 14/18] arm: mvebu: clearfog: add u-boot, dm-spl tag for spi This is required so SPL and u-boot can boot from spi flash devices that use the dm drivers. Signed-off-by: Jon Nettleton [baruch: use -u-boot.dtsi] Signed-off-by: Baruch Siach Reviewed-by: Stefan Roese Signed-off-by: Stefan Roese --- arch/arm/dts/armada-388-clearfog-u-boot.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 arch/arm/dts/armada-388-clearfog-u-boot.dtsi diff --git a/arch/arm/dts/armada-388-clearfog-u-boot.dtsi b/arch/arm/dts/armada-388-clearfog-u-boot.dtsi new file mode 100644 index 0000000000..f31691ee94 --- /dev/null +++ b/arch/arm/dts/armada-388-clearfog-u-boot.dtsi @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ + +&spi1 { + u-boot,dm-spl; + + spi-flash@0 { + u-boot,dm-spl; + }; +}; From a6477f7cbc56126d7a946115fb06bfed6b3565ba Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Mon, 25 Jun 2018 22:34:57 +1200 Subject: [PATCH 15/18] ARM: kirkwood: add SBx81LIFXCAT board This is a series of line cards for Allied Telesis's SBx8100 chassis switch. The CPU block is common to the SBx81GP24 and SBx81GT24 cards cards collectively referred to as SBx81LIFXCAT in u-boot. Signed-off-by: Chris Packham Signed-off-by: Stefan Roese --- arch/arm/dts/kirkwood-atl-sbx81lifxcat.dts | 145 ++++++++++++++++++ arch/arm/mach-kirkwood/Kconfig | 4 + board/alliedtelesis/SBx81LIFXCAT/Kconfig | 12 ++ board/alliedtelesis/SBx81LIFXCAT/MAINTAINERS | 7 + board/alliedtelesis/SBx81LIFXCAT/Makefile | 7 + board/alliedtelesis/SBx81LIFXCAT/kwbimage.cfg | 49 ++++++ .../alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c | 134 ++++++++++++++++ configs/SBx81LIFXCAT_defconfig | 44 ++++++ include/configs/SBx81LIFXCAT.h | 114 ++++++++++++++ 9 files changed, 516 insertions(+) create mode 100644 arch/arm/dts/kirkwood-atl-sbx81lifxcat.dts create mode 100644 board/alliedtelesis/SBx81LIFXCAT/Kconfig create mode 100644 board/alliedtelesis/SBx81LIFXCAT/MAINTAINERS create mode 100644 board/alliedtelesis/SBx81LIFXCAT/Makefile create mode 100644 board/alliedtelesis/SBx81LIFXCAT/kwbimage.cfg create mode 100644 board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c create mode 100644 configs/SBx81LIFXCAT_defconfig create mode 100644 include/configs/SBx81LIFXCAT.h diff --git a/arch/arm/dts/kirkwood-atl-sbx81lifxcat.dts b/arch/arm/dts/kirkwood-atl-sbx81lifxcat.dts new file mode 100644 index 0000000000..c234449936 --- /dev/null +++ b/arch/arm/dts/kirkwood-atl-sbx81lifxcat.dts @@ -0,0 +1,145 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "kirkwood.dtsi" +#include "kirkwood-98dx4122.dtsi" + +/ { + model = "Allied Telesis SBx81LIFXCAT Board"; + compatible = "atl,SBx8LIFXCAT", "marvell,kirkwood-98DX4122", + "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x08000000>; /* 128 MB */ + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + stdout-path = &uart0; + }; + + aliases { + ethernet0 = ð0; + i2c0 = &i2c0; + spi0 = &spi0; + }; + + dsa { + compatible = "marvell,dsa"; + #address-cells = <2>; + #size-cells = <0>; + dsa,ethernet = <ð0>; + dsa,mii-bus = <&mdio>; + status = "okay"; + + switch@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1 0>; + + port@0 { + reg = <0>; + label = "internal0"; + }; + port@1 { + reg = <1>; + label = "internal1"; + }; + port@8 { + reg = <8>; + label = "internal8"; + phy-mode = "rgmii-id"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + port@9 { + reg = <9>; + label = "internal9"; + phy-mode = "rgmii-id"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + port@10 { + reg = <10>; + label = "cpu"; + }; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + ledn { + label = "status:ledn"; + gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; + }; + + ledp { + label = "status:ledp"; + gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "st,m25p128", "jedec,spi-nor", "spi-flash"; + reg = <0>; + spi-max-frequency = <50000000>; + mode = <0>; + + partition@u-boot { + reg = <0x00000000 0x00c00000>; + label = "u-boot"; + }; + partition@u-boot-env { + reg = <0x00c00000 0x00040000>; + label = "u-boot-env"; + }; + partition@unused { + reg = <0x00100000 0x00f00000>; + label = "unused"; + }; + }; +}; + +&i2c0 { + status = "okay"; + + eeprom@52 { + compatible = "atmel,24c04"; + reg = <0x52>; + }; + + gpio3: gpio@76 { + #gpio-cells = <2>; + compatible = "nxp,pca9539"; + reg = <0x76>; + }; +}; + +&uart0 { + status = "okay"; +}; + +&mdio { + status = "okay"; +}; + +ð0 { + status = "okay"; + + ethernet0-port@0 { + speed = <1000>; + duplex = <1>; + }; +}; diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 5a5a63cea7..3b860c4f55 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -62,6 +62,9 @@ config TARGET_NSA310S config TARGET_SBx81LIFKW bool "Allied Telesis SBx81GS24/SBx81GT40/SBx81XS6/SBx81XS16" +config TARGET_SBx81LIFXCAT + bool "Allied Telesis SBx81GP24/SBx81GT24" + endchoice config SYS_SOC @@ -85,5 +88,6 @@ source "board/Seagate/goflexhome/Kconfig" source "board/Seagate/nas220/Kconfig" source "board/zyxel/nsa310s/Kconfig" source "board/alliedtelesis/SBx81LIFKW/Kconfig" +source "board/alliedtelesis/SBx81LIFXCAT/Kconfig" endif diff --git a/board/alliedtelesis/SBx81LIFXCAT/Kconfig b/board/alliedtelesis/SBx81LIFXCAT/Kconfig new file mode 100644 index 0000000000..524c290089 --- /dev/null +++ b/board/alliedtelesis/SBx81LIFXCAT/Kconfig @@ -0,0 +1,12 @@ +if TARGET_SBx81LIFXCAT + +config SYS_BOARD + default "SBx81LIFXCAT" + +config SYS_VENDOR + default "alliedtelesis" + +config SYS_CONFIG_NAME + default "SBx81LIFXCAT" + +endif diff --git a/board/alliedtelesis/SBx81LIFXCAT/MAINTAINERS b/board/alliedtelesis/SBx81LIFXCAT/MAINTAINERS new file mode 100644 index 0000000000..6b722ded25 --- /dev/null +++ b/board/alliedtelesis/SBx81LIFXCAT/MAINTAINERS @@ -0,0 +1,7 @@ +SBx81LIFXCAT BOARD +M: Chris Packham +S: Maintained +F: board/alliedtelesis/SBx81LIFXCAT/ +F: include/configs/SBx81LIFXCAT +F: configs/SBx81LIFXCAT_defconfig +F: arch/arm/dts/kirkwood-atl-sbx81lifxcat.dts diff --git a/board/alliedtelesis/SBx81LIFXCAT/Makefile b/board/alliedtelesis/SBx81LIFXCAT/Makefile new file mode 100644 index 0000000000..f21c8ef9d6 --- /dev/null +++ b/board/alliedtelesis/SBx81LIFXCAT/Makefile @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2010, 2018 +# Allied Telesis +# + +obj-y += sbx81lifxcat.o diff --git a/board/alliedtelesis/SBx81LIFXCAT/kwbimage.cfg b/board/alliedtelesis/SBx81LIFXCAT/kwbimage.cfg new file mode 100644 index 0000000000..53d4812f34 --- /dev/null +++ b/board/alliedtelesis/SBx81LIFXCAT/kwbimage.cfg @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2018 Allied Telesis +# +# Refer docs/README.kwimage for more details about how-to configure +# and create kirkwood boot image +# + +# Boot Media configurations +BOOT_FROM spi # Boot from SPI flash + +# SOC registers configuration using bootrom header extension +# Maximum KWBIMAGE_MAX_CONFIG configurations allowed +DATA 0xffd100e0 0x1b1b1b1b +DATA 0xffd20134 0xffffffff +DATA 0xffd20138 0x009fffff +DATA 0xffd20154 0x00000000 +DATA 0xffd2014c 0x00000000 +DATA 0xffd20148 0x00000001 + +# Dram initalization for 1 x x16 +# DDR II Micron part number MT47H64M16HR-3 +# MClk 333MHz, Size 128MB, ECC disable +# +DATA 0xffd01400 0x43000618 +DATA 0xffd01404 0x38543000 +DATA 0xffd01408 0x23125441 +DATA 0xffd0140c 0x00000832 +DATA 0xffd01410 0x0000000D +DATA 0xffd01414 0x00000000 +DATA 0xffd01418 0x00000000 +DATA 0xffd0141c 0x00000652 +DATA 0xffd01420 0x00000042 +DATA 0xffd01424 0x0000F0FF +DATA 0xffd01428 0x00074410 +DATA 0xffd0147C 0x00007441 +DATA 0xffd01500 0x00000000 # SDRAM CS[0] Base address at 0x00000000 +DATA 0xffd01504 0x07FFFFF1 # SDRAM CS[0] Size 128MiB +DATA 0xffd01508 0x10000000 +DATA 0xffd0150c 0x00FFFFF4 # SDRAM CS[1] Size, window disabled +DATA 0xffd01514 0x00FFFFF8 # SDRAM CS[2] Size, window disabled +DATA 0xffd0151c 0x00FFFFFC # SDRAM CS[3] Size, window disabled +DATA 0xffd01494 0x84210000 +DATA 0xffd01498 0x00000000 +DATA 0xffd0149c 0x0000F80F +DATA 0xffd01480 0x00000001 + +# End of Header extension +DATA 0x0 0x0 diff --git a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c new file mode 100644 index 0000000000..c584fc0e98 --- /dev/null +++ b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c @@ -0,0 +1,134 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2010, 2018 + * Allied Telesis + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SBX81LIFXCAT_OE_LOW (~0) +#define SBX81LIFXCAT_OE_HIGH (~BIT(11)) +#define SBX81LIFXCAT_OE_VAL_LOW (0) +#define SBX81LIFXCAT_OE_VAL_HIGH (BIT(11)) + +DECLARE_GLOBAL_DATA_PTR; + +int board_early_init_f(void) +{ + /* + * default gpio configuration + * There are maximum 64 gpios controlled through 2 sets of registers + * the below configuration configures mainly initial LED status + */ + mvebu_config_gpio(SBX81LIFXCAT_OE_VAL_LOW, + SBX81LIFXCAT_OE_VAL_HIGH, + SBX81LIFXCAT_OE_LOW, SBX81LIFXCAT_OE_HIGH); + + /* Multi-Purpose Pins Functionality configuration */ + static const u32 kwmpp_config[] = { + MPP0_SPI_SCn, + MPP1_SPI_MOSI, + MPP2_SPI_SCK, + MPP3_SPI_MISO, + MPP4_NF_IO6, + MPP5_NF_IO7, + MPP6_SYSRST_OUTn, + MPP7_GPO, + MPP8_TW_SDA, + MPP9_TW_SCK, + MPP10_UART0_TXD, + MPP11_UART0_RXD, + MPP12_GPO, + MPP13_UART1_TXD, + MPP14_UART1_RXD, + MPP15_GPIO, + MPP16_GPIO, + MPP17_GPIO, + MPP18_NF_IO0, + MPP19_NF_IO1, + MPP20_GE1_0, + MPP21_GE1_1, + MPP22_GE1_2, + MPP23_GE1_3, + MPP24_GE1_4, + MPP25_GE1_5, + MPP26_GE1_6, + MPP27_GE1_7, + MPP28_GE1_8, + MPP29_GE1_9, + MPP30_GE1_10, + MPP31_GE1_11, + MPP32_GE1_12, + MPP33_GE1_13, + 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) +{ + /* address of boot parameters */ + 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 + +#ifdef CONFIG_MV88E61XX_SWITCH +int mv88e61xx_hw_reset(struct phy_device *phydev) +{ + phydev->advertising = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full; + + return 0; +} +#endif + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r(void) +{ + struct udevice *dev; + int ret; + + ret = led_get_by_label("status:ledp", &dev); + if (!ret) + led_set_state(dev, LEDST_ON); + + ret = led_get_by_label("status:ledn", &dev); + if (!ret) + led_set_state(dev, LEDST_OFF); + + return 0; +} +#endif diff --git a/configs/SBx81LIFXCAT_defconfig b/configs/SBx81LIFXCAT_defconfig new file mode 100644 index 0000000000..89921a5c0d --- /dev/null +++ b/configs/SBx81LIFXCAT_defconfig @@ -0,0 +1,44 @@ +CONFIG_ARM=y +CONFIG_KIRKWOOD=y +CONFIG_SYS_TEXT_BASE=0x00600000 +CONFIG_TARGET_SBx81LIFXCAT=y +CONFIG_IDENT_STRING="\nSBx81LIFXCAT" +CONFIG_DEFAULT_DEVICE_TREE="kirkwood-atl-sbx81lifxcat" +# CONFIG_SYS_MALLOC_F is not set +CONFIG_BOOTDELAY=3 +CONFIG_SILENT_CONSOLE=y +CONFIG_SILENT_U_BOOT_ONLY=y +CONFIG_HUSH_PARSER=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y +CONFIG_CMD_SF=y +CONFIG_CMD_DHCP=y +CONFIG_BOOTP_NTPSERVER=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_SNTP=y +# CONFIG_CMD_LED is not set +CONFIG_OF_CONTROL=y +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_DM=y +CONFIG_DM_GPIO=y +CONFIG_DM_PCA953X=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_MVTWSI=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_PCA954x=y +CONFIG_LED=y +CONFIG_LED_GPIO=y +# CONFIG_MMC is not set +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_STMICRO=y +# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_PHYLIB=y +CONFIG_MV88E61XX_SWITCH=y +CONFIG_MV88E61XX_CPU_PORT=10 +CONFIG_MV88E61XX_PHY_PORTS=0x003 +CONFIG_MV88E61XX_FIXED_PORTS=0x300 +CONFIG_MV88E61XX_RGMII_DELAY=y +CONFIG_SPI=y +CONFIG_KIRKWOOD_SPI=y diff --git a/include/configs/SBx81LIFXCAT.h b/include/configs/SBx81LIFXCAT.h new file mode 100644 index 0000000000..0491832fee --- /dev/null +++ b/include/configs/SBx81LIFXCAT.h @@ -0,0 +1,114 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2016 Allied Telesis + */ + +#ifndef _CONFIG_SBX81LIFXCAT_H +#define _CONFIG_SBX81LIFXCAT_H + +/* + * High Level Configuration Options (easy to change) + */ +#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */ +#define CONFIG_KW88F6281 1 /* SOC Name */ +#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ +#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg +#define CONFIG_BUILD_TARGET "u-boot.kwb" + +/* additions for new ARM relocation support */ +#define CONFIG_SYS_SDRAM_BASE 0x00000000 + +#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */ +#define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */ +#define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0 */ +#define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */ +#define CONFIG_KIRKWOOD_GPIO 1 + +#define CONFIG_MISC_INIT_R /* call misc_init_r */ + +/* + * NS16550 Configuration + */ +#define CONFIG_SYS_NS16550 +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE (-4) +#define CONFIG_SYS_NS16550_CLK CONFIG_SYS_TCLK +#define CONFIG_SYS_NS16550_COM1 KW_UART0_BASE + +/* + * Serial Port configuration + * The following definitions let you select what serial you want to use + * for your console driver. + */ + +#define CONFIG_CONS_INDEX 1 /*Console on UART0 */ + +/* + * For booting Linux, the board info and command line data + * have to be in the first 8 MB of memory, since this is + * the maximum mapped by the Linux kernel during initialization. + */ +#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ +#define CONFIG_INITRD_TAG 1 /* enable INITRD tag */ +#define CONFIG_SETUP_MEMORY_TAGS 1 /* enable memory tag */ + +#define MTDPARTS_DEFAULT "mtdparts=spi0.0:768K(boot)ro,256K(boot-env),14M(user),1M(errlog)" +#define MTDPARTS_MTDOOPS "errlog" +#define CONFIG_DOS_PARTITION + +/* + * Environment variables configurations + */ +#define CONFIG_ENV_SPI_BUS 0 +#define CONFIG_ENV_SPI_CS 0 +#define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */ +#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE +#define CONFIG_ENV_SECT_SIZE 0x40000 /* 256K */ +#define CONFIG_ENV_SIZE 0x02000 +#define CONFIG_ENV_OFFSET 0xc0000 /* env starts here - 768K */ + +/* + * U-Boot bootcode configuration + */ + +#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for monitor */ +#define CONFIG_SYS_MALLOC_LEN (4 << 20) /* Reserve 4.0 MB for malloc */ + +/* + * For booting Linux, the board info and command line data + * have to be in the first 8 MB of memory, since this is + * the maximum mapped by the Linux kernel during initialization. + */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Mem map for Linux*/ + +/* size in bytes reserved for initial data */ + +#include +/* There is no PHY directly connected so don't ask it for link status */ +#undef CONFIG_SYS_FAULT_ECHO_LINK_DOWN + +/* + * Other required minimal configurations + */ +#define CONFIG_ARCH_CPU_INIT /* call arch_cpu_init() */ +#define CONFIG_NR_DRAM_BANKS 4 +#define CONFIG_SYS_MEMTEST_START 0x00400000 /* 4M */ +#define CONFIG_SYS_MEMTEST_END 0x007fffff /*(_8M -1) */ +#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */ + +/* + * Ethernet Driver configuration + */ +#ifdef CONFIG_CMD_NET +#define CONFIG_NETCONSOLE /* include NetConsole support */ +#define CONFIG_NET_MULTI /* specify more that one ports available */ +#define CONFIG_MII /* expose smi over miiphy interface */ +#define CONFIG_MVGBE /* Enable kirkwood Gbe Controller Driver */ +#define CONFIG_MVGBE_PORTS {1, 0} /* enable a single port */ +#define CONFIG_PHY_BASE_ADR 0x01 +#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */ +#endif /* CONFIG_CMD_NET */ + +#define CONFIG_SYS_LOAD_ADDR 0x1000000 /* default location for tftp and bootm */ + +#endif /* _CONFIG_SBX81LIFXCAT_H */ From 3475a71d4e7696865ebc710e56621b04d56a621e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 3 Jul 2018 12:10:30 -0400 Subject: [PATCH 16/18] tools: kwboot: unbreak terminal-only mode Commit 84899e2 ("tools/kwboot: Sync with latest barebox version to support Armada XP") accidently broke the terminal-only mode (-t) by removing the test on the bootmsg. Thus even when trying to use kwboot as a plain terminal, it asks to reboot the target. This commit simply reintroduces the lost test so that it is possible again to use kwboot to attach to the target system's console. Signed-off-by: Willy Tarreau Signed-off-by: Stefan Roese --- tools/kwboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 8a421cda4e..0a77060288 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -821,7 +821,7 @@ main(int argc, char **argv) perror("debugmsg"); goto out; } - } else { + } else if (bootmsg) { rc = kwboot_bootmsg(tty, bootmsg); if (rc) { perror("bootmsg"); From 4469bd7b53acea642915e2bf0e3cb5dfa378a47e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 3 Jul 2018 12:10:31 -0400 Subject: [PATCH 17/18] tools: kwboot: properly quit when read() returns 0 When kwboot is attached to a terminal which disappears such as one connected via an unplugged USB cable, read() returns 0, making kwboot loop until a key is pressed in the terminal. The only case where read() may return 0 here is when the terminal is closed anyway, so let's properly handle this one and report is similar to other errors. Signed-off-by: Willy Tarreau Signed-off-by: Stefan Roese --- tools/kwboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 0a77060288..50ae2b4b77 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -182,7 +182,7 @@ kwboot_tty_recv(int fd, void *buf, size_t len, int timeo) } n = read(fd, buf, len); - if (n < 0) + if (n <= 0) goto out; buf = (char *)buf + n; @@ -466,7 +466,7 @@ kwboot_term_pipe(int in, int out, char *quit, int *s) char _buf[128], *buf = _buf; nin = read(in, buf, sizeof(buf)); - if (nin < 0) + if (nin <= 0) return -1; if (quit) { From 79a0188679df53862e06fd7c8fecb7f3d7d44502 Mon Sep 17 00:00:00 2001 From: Vladimir Vid Date: Fri, 13 Jul 2018 11:56:00 +0200 Subject: [PATCH 18/18] arm64: a37xx: add CONFIG_MTD_DEVICE and CONFIG_MTD_PARTITIONS CONFIG_MTD_DEVICE is required for the mtdparts command and but it is missing from the mvebu_armada-37xx.h CONFIG_MTD_PARTITIONS is needed for the ubi support. Some of the Marvell based devices may require this as well. Signed-off-by: Vladimir Vid Signed-off-by: Luka Perkov Signed-off-by: Stefan Roese --- include/configs/mvebu_armada-37xx.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h index d1331096f2..5015bc74bb 100644 --- a/include/configs/mvebu_armada-37xx.h +++ b/include/configs/mvebu_armada-37xx.h @@ -66,6 +66,8 @@ #define CONFIG_SF_DEFAULT_SPEED 1000000 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 #define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define CONFIG_MTD_PARTITIONS /* required for UBI partition support */ /* Environment in SPI NOR flash */ #define CONFIG_ENV_OFFSET 0x180000 /* as Marvell U-Boot version */