From patchwork Mon Jan 13 14:34:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Brunck X-Patchwork-Id: 239577 List-Id: U-Boot discussion From: holger.brunck at ch.abb.com (Holger Brunck) Date: Mon, 13 Jan 2020 15:34:01 +0100 Subject: [PATCH 1/3] arm/km: add support for SUSE2 Message-ID: <20200113143403.9408-1-holger.brunck@ch.abb.com> This board is similar to SUV31, but the FPGA is reset concept is quite different. Signed-off-by: Holger Brunck CC: Valentin Longchamp CC: Stefan Roese Reviewed-by: Stefan Roese --- board/keymile/km_arm/Kconfig | 12 +++++++ board/keymile/km_arm/MAINTAINERS | 1 + board/keymile/km_arm/fpga_config.c | 15 ++++++-- configs/kmsuse2_defconfig | 58 ++++++++++++++++++++++++++++++ include/configs/km_kirkwood.h | 8 +++++ scripts/config_whitelist.txt | 1 + 6 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 configs/kmsuse2_defconfig diff --git a/board/keymile/km_arm/Kconfig b/board/keymile/km_arm/Kconfig index be6b162815..4b21db8573 100644 --- a/board/keymile/km_arm/Kconfig +++ b/board/keymile/km_arm/Kconfig @@ -7,6 +7,18 @@ config KM_FPGA_CONFIG help Include capability to change FPGA configuration. +config KM_FPGA_FORCE_CONFIG + bool "FPGA reconfiguration" + default n + help + If yes we force to reconfigure the FPGA always + +config KM_FPGA_NO_RESET + bool "FPGA skip reset" + default n + help + If yes we skip triggering a reset of the FPGA + config KM_ENV_IS_IN_SPI_NOR bool "Environment in SPI NOR" default n diff --git a/board/keymile/km_arm/MAINTAINERS b/board/keymile/km_arm/MAINTAINERS index 17926017c3..538f90f48b 100644 --- a/board/keymile/km_arm/MAINTAINERS +++ b/board/keymile/km_arm/MAINTAINERS @@ -9,4 +9,5 @@ F: configs/km_kirkwood_pci_defconfig F: configs/kmcoge5un_defconfig F: configs/kmnusa_defconfig F: configs/kmsugp1_defconfig +F: configs/kmsuse2_defconfig F: configs/kmsuv31_defconfig diff --git a/board/keymile/km_arm/fpga_config.c b/board/keymile/km_arm/fpga_config.c index 051e167fd5..99bea009fa 100644 --- a/board/keymile/km_arm/fpga_config.c +++ b/board/keymile/km_arm/fpga_config.c @@ -82,6 +82,7 @@ static int boco_set_bits(u8 reg, u8 flags) #define FPGA_INIT_B 0x10 #define FPGA_DONE 0x20 +#ifndef CONFIG_KM_FPGA_FORCE_CONFIG static int fpga_done(void) { int ret = 0; @@ -100,13 +101,16 @@ static int fpga_done(void) return regval & FPGA_DONE ? 1 : 0; } +#endif /* CONFIG_KM_FPGA_FORCE_CONFIG */ -int skip; +static int skip; int trigger_fpga_config(void) { int ret = 0; + skip = 0; +#ifndef CONFIG_KM_FPGA_FORCE_CONFIG /* if the FPGA is already configured, we do not want to * reconfigure it */ skip = 0; @@ -115,6 +119,7 @@ int trigger_fpga_config(void) skip = 1; return 0; } +#endif /* CONFIG_KM_FPGA_FORCE_CONFIG */ if (check_boco2()) { /* we have a BOCO2, this has to be triggered here */ @@ -188,7 +193,13 @@ int wait_for_fpga_config(void) return 0; } -#if defined(KM_PCIE_RESET_MPP7) +#if defined(CONFIG_KM_FPGA_NO_RESET) +int fpga_reset(void) +{ + /* no dedicated reset pin for FPGA */ + return 0; +} +#elif defined(KM_PCIE_RESET_MPP7) #define KM_PEX_RST_GPIO_PIN 7 int fpga_reset(void) diff --git a/configs/kmsuse2_defconfig b/configs/kmsuse2_defconfig new file mode 100644 index 0000000000..e6726ebd0c --- /dev/null +++ b/configs/kmsuse2_defconfig @@ -0,0 +1,58 @@ +CONFIG_ARM=y +CONFIG_SYS_DCACHE_OFF=y +CONFIG_ARCH_CPU_INIT=y +CONFIG_KIRKWOOD=y +CONFIG_SYS_TEXT_BASE=0x07d00000 +CONFIG_TARGET_KM_KIRKWOOD=y +CONFIG_KM_FPGA_CONFIG=y +CONFIG_KM_FPGA_FORCE_CONFIG=y +CONFIG_KM_FPGA_NO_RESET=y +CONFIG_KM_ENV_IS_IN_SPI_NOR=y +CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_OFFSET=0xC0000 +CONFIG_ENV_SECT_SIZE=0x10000 +CONFIG_IDENT_STRING="\nABB SUSE2" +CONFIG_SYS_EXTRA_OPTIONS="KM_SUSE2" +CONFIG_MISC_INIT_R=y +CONFIG_VERSION_VARIABLE=y +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_HUSH_PARSER=y +CONFIG_AUTOBOOT_KEYED=y +CONFIG_AUTOBOOT_PROMPT="Hit key to stop autoboot in %2ds\n" +CONFIG_AUTOBOOT_STOP_STR=" " +CONFIG_CMD_ASKENV=y +CONFIG_CMD_GREPENV=y +CONFIG_CMD_EEPROM=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_I2C=y +CONFIG_CMD_NAND=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_JFFS2=y +CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" +CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:-(ubi0);" +CONFIG_CMD_UBI=y +# CONFIG_CMD_UBIFS is not set +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="kirkwood-km_kirkwood" +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y +CONFIG_ENV_OFFSET_REDUND=0xD0000 +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y +CONFIG_BOOTCOUNT_BOOTLIMIT=3 +# CONFIG_MMC is not set +CONFIG_MTD=y +CONFIG_MTD_RAW_NAND=y +CONFIG_SF_DEFAULT_SPEED=8100000 +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_MVGBE=y +CONFIG_MII=y +CONFIG_SYS_NS16550=y +CONFIG_SPI=y +CONFIG_KIRKWOOD_SPI=y +CONFIG_BCH=y diff --git a/include/configs/km_kirkwood.h b/include/configs/km_kirkwood.h index 064097a631..ea24964f54 100644 --- a/include/configs/km_kirkwood.h +++ b/include/configs/km_kirkwood.h @@ -65,6 +65,14 @@ #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_128M16_1.cfg #define CONFIG_KM_UBI_PART_BOOT_OPTS ",2048" #define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE + +/* KM_SUSE2 */ +#elif defined(CONFIG_KM_SUSE2) +#define CONFIG_HOSTNAME "kmsuse2" +#undef CONFIG_SYS_KWD_CONFIG +#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_128M16_1.cfg +#define CONFIG_KM_UBI_PART_BOOT_OPTS ",2048" +#define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE #else #error ("Board unsupported") #endif diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index cd154738a4..4524350403 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -943,6 +943,7 @@ CONFIG_KM_NEW_ENV CONFIG_KM_NUSA CONFIG_KM_ROOTFSSIZE CONFIG_KM_SUGP1 +CONFIG_KM_SUSE2 CONFIG_KM_SUV31 CONFIG_KM_UBI_LINUX_MTD CONFIG_KM_UBI_PARTITION_NAME_APP From patchwork Mon Jan 13 14:34:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Brunck X-Patchwork-Id: 239576 List-Id: U-Boot discussion From: holger.brunck at ch.abb.com (Holger Brunck) Date: Mon, 13 Jan 2020 15:34:02 +0100 Subject: [PATCH 2/3] arm/km: remove unmaintained board SUGP1 In-Reply-To: <20200113143403.9408-1-holger.brunck@ch.abb.com> References: <20200113143403.9408-1-holger.brunck@ch.abb.com> Message-ID: <20200113143403.9408-2-holger.brunck@ch.abb.com> This target is out of maintenance and can be removed. Signed-off-by: Holger Brunck CC: Valentin Longchamp CC: Stefan Roese Reviewed-by: Stefan Roese --- board/keymile/km_arm/MAINTAINERS | 1 - board/keymile/km_arm/fpga_config.c | 23 ------------ board/keymile/km_arm/km_arm.c | 4 --- configs/kmsugp1_defconfig | 57 ------------------------------ include/configs/km_kirkwood.h | 9 ++--- scripts/config_whitelist.txt | 1 - 6 files changed, 2 insertions(+), 93 deletions(-) delete mode 100644 configs/kmsugp1_defconfig diff --git a/board/keymile/km_arm/MAINTAINERS b/board/keymile/km_arm/MAINTAINERS index 538f90f48b..45c0b5651d 100644 --- a/board/keymile/km_arm/MAINTAINERS +++ b/board/keymile/km_arm/MAINTAINERS @@ -8,6 +8,5 @@ F: configs/km_kirkwood_128m16_defconfig F: configs/km_kirkwood_pci_defconfig F: configs/kmcoge5un_defconfig F: configs/kmnusa_defconfig -F: configs/kmsugp1_defconfig F: configs/kmsuse2_defconfig F: configs/kmsuv31_defconfig diff --git a/board/keymile/km_arm/fpga_config.c b/board/keymile/km_arm/fpga_config.c index 99bea009fa..8bb0470bc3 100644 --- a/board/keymile/km_arm/fpga_config.c +++ b/board/keymile/km_arm/fpga_config.c @@ -199,29 +199,6 @@ int fpga_reset(void) /* no dedicated reset pin for FPGA */ return 0; } -#elif defined(KM_PCIE_RESET_MPP7) - -#define KM_PEX_RST_GPIO_PIN 7 -int fpga_reset(void) -{ - if (!check_boco2()) { - /* we do not have BOCO2, this is not really used */ - return 0; - } - - printf("PCIe reset through GPIO7: "); - /* apply PCIe reset via GPIO */ - kw_gpio_set_valid(KM_PEX_RST_GPIO_PIN, 1); - kw_gpio_direction_output(KM_PEX_RST_GPIO_PIN, 1); - kw_gpio_set_value(KM_PEX_RST_GPIO_PIN, 0); - udelay(1000*10); - kw_gpio_set_value(KM_PEX_RST_GPIO_PIN, 1); - - printf(" done\n"); - - return 0; -} - #else #define PRST1 0x4 diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index 7aa9fa7fca..6547f5f9c4 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -68,11 +68,7 @@ static const u32 kwmpp_config[] = { MPP4_NF_IO6, MPP5_NF_IO7, MPP6_SYSRST_OUTn, -#if defined(KM_PCIE_RESET_MPP7) - MPP7_GPO, -#else MPP7_PEX_RST_OUTn, -#endif #if defined(CONFIG_SYS_I2C_SOFT) MPP8_GPIO, /* SDA */ MPP9_GPIO, /* SCL */ diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig deleted file mode 100644 index 54780fcd20..0000000000 --- a/configs/kmsugp1_defconfig +++ /dev/null @@ -1,57 +0,0 @@ -CONFIG_ARM=y -CONFIG_SYS_DCACHE_OFF=y -CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y -CONFIG_SYS_TEXT_BASE=0x07d00000 -CONFIG_TARGET_KM_KIRKWOOD=y -CONFIG_KM_FPGA_CONFIG=y -CONFIG_KM_ENV_IS_IN_SPI_NOR=y -CONFIG_KM_PIGGY4_88E6352=y -CONFIG_ENV_SIZE=0x2000 -CONFIG_ENV_OFFSET=0xC0000 -CONFIG_ENV_SECT_SIZE=0x10000 -CONFIG_IDENT_STRING="\nKeymile SUGP1" -CONFIG_SYS_EXTRA_OPTIONS="KM_SUGP1" -CONFIG_MISC_INIT_R=y -CONFIG_VERSION_VARIABLE=y -# CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_HUSH_PARSER=y -CONFIG_AUTOBOOT_KEYED=y -CONFIG_AUTOBOOT_PROMPT="Hit key to stop autoboot in %2ds\n" -CONFIG_AUTOBOOT_STOP_STR=" " -CONFIG_CMD_ASKENV=y -CONFIG_CMD_GREPENV=y -CONFIG_CMD_EEPROM=y -# CONFIG_CMD_FLASH is not set -CONFIG_CMD_I2C=y -CONFIG_CMD_NAND=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MII=y -CONFIG_CMD_PING=y -CONFIG_CMD_JFFS2=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" -CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:-(ubi0);" -CONFIG_CMD_UBI=y -# CONFIG_CMD_UBIFS is not set -CONFIG_OF_CONTROL=y -CONFIG_DEFAULT_DEVICE_TREE="kirkwood-km_kirkwood" -CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_ENV_OFFSET_REDUND=0xD0000 -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_BOOTCOUNT_LIMIT=y -CONFIG_BOOTCOUNT_RAM=y -CONFIG_BOOTCOUNT_BOOTLIMIT=3 -# CONFIG_MMC is not set -CONFIG_MTD=y -CONFIG_MTD_RAW_NAND=y -CONFIG_SF_DEFAULT_SPEED=8100000 -CONFIG_SPI_FLASH_STMICRO=y -CONFIG_MV88E6352_SWITCH=y -CONFIG_MVGBE=y -CONFIG_MII=y -CONFIG_SYS_NS16550=y -CONFIG_SPI=y -CONFIG_KIRKWOOD_SPI=y -CONFIG_BCH=y diff --git a/include/configs/km_kirkwood.h b/include/configs/km_kirkwood.h index ea24964f54..37f9aa0058 100644 --- a/include/configs/km_kirkwood.h +++ b/include/configs/km_kirkwood.h @@ -38,15 +38,10 @@ #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_128M16_1.cfg #define CONFIG_KM_DISABLE_PCIE -/* KM_NUSA / KM_SUGP1 */ -#elif defined(CONFIG_KM_NUSA) || defined(CONFIG_KM_SUGP1) +/* KM_NUSA */ +#elif defined(CONFIG_KM_NUSA) -# if defined(CONFIG_KM_NUSA) #define CONFIG_HOSTNAME "kmnusa" -# elif defined(CONFIG_KM_SUGP1) -#define CONFIG_HOSTNAME "kmsugp1" -#define KM_PCIE_RESET_MPP7 -#endif #undef CONFIG_SYS_KWD_CONFIG #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_128M16_1.cfg diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 4524350403..e83cca3ae1 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -942,7 +942,6 @@ CONFIG_KM_KIRKWOOD_PCI CONFIG_KM_NEW_ENV CONFIG_KM_NUSA CONFIG_KM_ROOTFSSIZE -CONFIG_KM_SUGP1 CONFIG_KM_SUSE2 CONFIG_KM_SUV31 CONFIG_KM_UBI_LINUX_MTD From patchwork Mon Jan 13 14:34:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Brunck X-Patchwork-Id: 239578 List-Id: U-Boot discussion From: holger.brunck at ch.abb.com (Holger Brunck) Date: Mon, 13 Jan 2020 15:34:03 +0100 Subject: [PATCH 3/3] arm/km: remove unmaintained board kmsuv31 In-Reply-To: <20200113143403.9408-1-holger.brunck@ch.abb.com> References: <20200113143403.9408-1-holger.brunck@ch.abb.com> Message-ID: <20200113143403.9408-3-holger.brunck@ch.abb.com> This target is out of maintenance and can be removed. Signed-off-by: Holger Brunck CC: Valentin Longchamp CC: Stefan Roese Reviewed-by: Stefan Roese --- board/keymile/km_arm/MAINTAINERS | 1 - configs/kmsuv31_defconfig | 55 -------------------------------- include/configs/km_kirkwood.h | 8 ----- scripts/config_whitelist.txt | 1 - 4 files changed, 65 deletions(-) delete mode 100644 configs/kmsuv31_defconfig diff --git a/board/keymile/km_arm/MAINTAINERS b/board/keymile/km_arm/MAINTAINERS index 45c0b5651d..3eeb509060 100644 --- a/board/keymile/km_arm/MAINTAINERS +++ b/board/keymile/km_arm/MAINTAINERS @@ -9,4 +9,3 @@ F: configs/km_kirkwood_pci_defconfig F: configs/kmcoge5un_defconfig F: configs/kmnusa_defconfig F: configs/kmsuse2_defconfig -F: configs/kmsuv31_defconfig diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig deleted file mode 100644 index 679502b626..0000000000 --- a/configs/kmsuv31_defconfig +++ /dev/null @@ -1,55 +0,0 @@ -CONFIG_ARM=y -CONFIG_SYS_DCACHE_OFF=y -CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y -CONFIG_SYS_TEXT_BASE=0x07d00000 -CONFIG_TARGET_KM_KIRKWOOD=y -CONFIG_KM_FPGA_CONFIG=y -CONFIG_KM_ENV_IS_IN_SPI_NOR=y -CONFIG_ENV_SIZE=0x2000 -CONFIG_ENV_OFFSET=0xC0000 -CONFIG_ENV_SECT_SIZE=0x10000 -CONFIG_IDENT_STRING="\nKeymile SUV31" -CONFIG_SYS_EXTRA_OPTIONS="KM_SUV31" -CONFIG_MISC_INIT_R=y -CONFIG_VERSION_VARIABLE=y -# CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_HUSH_PARSER=y -CONFIG_AUTOBOOT_KEYED=y -CONFIG_AUTOBOOT_PROMPT="Hit key to stop autoboot in %2ds\n" -CONFIG_AUTOBOOT_STOP_STR=" " -CONFIG_CMD_ASKENV=y -CONFIG_CMD_GREPENV=y -CONFIG_CMD_EEPROM=y -# CONFIG_CMD_FLASH is not set -CONFIG_CMD_I2C=y -CONFIG_CMD_NAND=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MII=y -CONFIG_CMD_PING=y -CONFIG_CMD_JFFS2=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" -CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:-(ubi0);" -CONFIG_CMD_UBI=y -# CONFIG_CMD_UBIFS is not set -CONFIG_OF_CONTROL=y -CONFIG_DEFAULT_DEVICE_TREE="kirkwood-km_kirkwood" -CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_ENV_OFFSET_REDUND=0xD0000 -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_BOOTCOUNT_LIMIT=y -CONFIG_BOOTCOUNT_RAM=y -CONFIG_BOOTCOUNT_BOOTLIMIT=3 -# CONFIG_MMC is not set -CONFIG_MTD=y -CONFIG_MTD_RAW_NAND=y -CONFIG_SF_DEFAULT_SPEED=8100000 -CONFIG_SPI_FLASH_STMICRO=y -CONFIG_MVGBE=y -CONFIG_MII=y -CONFIG_SYS_NS16550=y -CONFIG_SPI=y -CONFIG_KIRKWOOD_SPI=y -CONFIG_BCH=y diff --git a/include/configs/km_kirkwood.h b/include/configs/km_kirkwood.h index 37f9aa0058..82c2a12922 100644 --- a/include/configs/km_kirkwood.h +++ b/include/configs/km_kirkwood.h @@ -53,14 +53,6 @@ #define CONFIG_HOSTNAME "kmcoge5un" #define CONFIG_KM_DISABLE_PCIE -/* KM_SUV31 */ -#elif defined(CONFIG_KM_SUV31) -#define CONFIG_HOSTNAME "kmsuv31" -#undef CONFIG_SYS_KWD_CONFIG -#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_128M16_1.cfg -#define CONFIG_KM_UBI_PART_BOOT_OPTS ",2048" -#define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE - /* KM_SUSE2 */ #elif defined(CONFIG_KM_SUSE2) #define CONFIG_HOSTNAME "kmsuse2" diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index e83cca3ae1..7667beabad 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -943,7 +943,6 @@ CONFIG_KM_NEW_ENV CONFIG_KM_NUSA CONFIG_KM_ROOTFSSIZE CONFIG_KM_SUSE2 -CONFIG_KM_SUV31 CONFIG_KM_UBI_LINUX_MTD CONFIG_KM_UBI_PARTITION_NAME_APP CONFIG_KM_UBI_PARTITION_NAME_BOOT