Add support for IBM Genesis3
Subsystems (3)
v3 cover Add support for IBM Genesis3
v3:
- Drop FIRMWARE_2ND_BOOT patch
- Include reference board DTS instead of copying it
- Rename DTS to ast2500-<boardname>
- Describe defconfig changes in commit message
v2:
- Fix whitespace and compatible in DTS
- Remove board stub
- Improve commit message
- Rewrite FIRMWARE_2ND_BOOT support
- Update defconfig
Patrick Rudolph (3):
arm/dts: Add Genesis3 board
arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1
configs: Add IBM Genesis3 defconfig
arch/arm/dts/Makefile | 1 + arch/arm/dts/ast2500-ibm-genesis3.dts | 28 ++++++++++ arch/arm/mach-aspeed/ast2500/Kconfig | 6 +++ configs/ibm_genesis3_defconfig | 74 +++++++++++++++++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 arch/arm/dts/ast2500-ibm-genesis3.dts create mode 100644 configs/ibm_genesis3_defconfig
Signature · 1 line
2.35.3
PATCH v3 1/3 arm/dts: Add Genesis3 board
Add devicetree source file. It uses the evb-ast2500 board files.
--- arch/arm/dts/Makefile | 1 + arch/arm/dts/ast2500-ibm-genesis3.dts | 28 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 arch/arm/dts/ast2500-ibm-genesis3.dts
arch/arm/dts/Makefile +1 -0
@@ -677,6 +677,7 @@ dtb-$(CONFIG_ARCH_BCM6858) += \ dtb-$(CONFIG_ARCH_ASPEED) += \ ast2400-evb.dtb \ ast2500-evb.dtb \ + ast2500-ibm-genesis3.dtb \ ast2600a0-evb.dtb \ ast2600a1-evb.dtb \ ast2600-bletchley.dtb \
arch/arm/dts/ast2500-ibm-genesis3.dts new file +28 -0
@@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * IBM Genesis3 + * + * Copyright (C) 2022 9elements GmbH + */ + +#include "ast2500-evb.dts" + +/ { + model = "IBM Genesis3"; + compatible = "ibm,genesis3-bmc", "aspeed,ast2500"; +}; + +&spi1 { + status = "disabled"; +}; + +&fmc { + flash@0 { + compatible = "spi-flash", "spansion,s25fl256l"; + }; + + flash@1 { + compatible = "spi-flash", "spansion,s25fl256l"; + }; +}; +
Signature · 1 line
2.35.3
Re: [PATCH u-boot v2019.04-aspeed-openbmc v3 1/3] arm/dts: Add Genesis3 board
Quoted 14 lines · Patrick Rudolph
Add devicetree source file. It uses the evb-ast2500 board files.
Signed-off-by Patrick Rudolph <[email protected]>--- arch/arm/dts/Makefile | 1 + arch/arm/dts/ast2500-ibm-genesis3.dts | 28 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 arch/arm/dts/ast2500-ibm-genesis3.dtsarch/arm/dts/Makefile +0
-0
arch/arm/dts/Makefile dtb-$(CONFIG_ARCH_BCM6858) += \ · line 680
Quoted 4 lines
arch/arm/dts/Makefile +1
-0@@ -677,6 +677,7 @@ dtb-$(CONFIG_ARCH_BCM6858) += \ dtb-$(CONFIG_ARCH_ASPEED) += \ ast2400-evb.dtb \ ast2500-evb.dtb \ + ast2500-ibm-genesis3.dtb \
It looks like (with the exception of ast2600-intel.dts, which is an odd one out that I'd think we wouldn't want to emulate) the existing convention is to name these as just 'ast2x00-systemname' (without the vendor name), so it'd be nice to follow that pattern.
Also, this patch is now a bit out of date w.r.t. the current v2019.04-aspeed-openbmc branch and no longer applies cleanly; rebasing onto the current upstream branch would make it a bit more convenient (not that it's a terribly complex merge conflict).
Quoted 20 lines
arch/arm/dts/Makefile +0
-0ast2600a0-evb.dtb \ ast2600a1-evb.dtb \ ast2600-bletchley.dtb \arch/arm/dts/ast2500-ibm-genesis3.dts new file +11
-0@@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * IBM Genesis3 + * + * Copyright (C) 2022 9elements GmbH + */ + +#include "ast2500-evb.dts" + +/ { + model = "IBM Genesis3";
arch/arm/dts/ast2500-ibm-genesis3.dts line 21
Quoted 10 lines
arch/arm/dts/ast2500-ibm-genesis3.dts new file +10
-0+ compatible = "ibm,genesis3-bmc", "aspeed,ast2500"; +}; + +&spi1 { + status = "disabled"; +}; + +&fmc { + flash@0 { + compatible = "spi-flash", "spansion,s25fl256l";
The usual approach with compatible strings is to go from more specific to more generic (so that you get whatever available driver support is most appropriately tailored to the precise hardware in question) -- these should probably be in the opposite order.
arch/arm/dts/ast2500-ibm-genesis3.dts line 25
Quoted 4 lines
arch/arm/dts/ast2500-ibm-genesis3.dts new file +4
-0+ }; + + flash@1 { + compatible = "spi-flash", "spansion,s25fl256l";
...and likewise here of course.
Quoted 6 lines
arch/arm/dts/ast2500-ibm-genesis3.dts new file +3
-0+ }; +}; +Signature · 1 line
2.35.3
PATCH v3 2/3 arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1
In reply to Patrick RudolphUpdate the Kconfig and allow a board to use CONFIG_DRAM_UART_TO_UART1. The platform code already uses this Kconfig symbol, but it always evaluated to false.
This is required on IBM/Genesis3 as it uses RDX1/TDX1 as debug uart.
--- arch/arm/mach-aspeed/ast2500/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-aspeed/ast2500/Kconfig +6 -0
@@ -17,6 +17,12 @@ config TARGET_EVB_AST2500 20 pin JTAG, pinouts for 14 I2Cs, 3 SPIs and eSPI, 8 PWMs. endchoice +config DRAM_UART_TO_UART1 + bool + prompt "Route debug UART to UART1" + help + Route debug UART to TXD1/RXD1 pins. + source "board/aspeed/evb_ast2500/Kconfig" endif
Signature · 1 line
2.35.3
Re: [PATCH u-boot v2019.04-aspeed-openbmc v3 2/3] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1
Quoted 16 lines · Patrick Rudolph
Update the
Kconfigand allow a board to useCONFIG_DRAM_UART_TO_UART1. The platform code already uses thisKconfigsymbol, but it always evaluated to false.
This is required on IBM/Genesis3 as it uses RDX1/TDX1 as debug uart.Signed-off-by Patrick Rudolph <[email protected]>Reviewed-by Joel Stanley <[email protected]>--- arch/arm/mach-aspeed/ast2500/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm/mach-aspeed/ast2500/Kconfig +0
-0
arch/arm/mach-aspeed/ast2500/Kconfig config TARGET_EVB_AST2500 · line 25
Quoted 9 lines
arch/arm/mach-aspeed/ast2500/Kconfig +6
-0@@ -17,6 +17,12 @@ config TARGET_EVB_AST2500 20 pin JTAG, pinouts for 14 I2Cs, 3 SPIs and eSPI, 8 PWMs. endchoice +config DRAM_UART_TO_UART1 + bool + prompt "Route debug UART to UART1" + help + Route debug UART to TXD1/RXD1 pins. +
Given that the debug UART is now disabled by default and only available via a combination of CONFIG_ASPEED_ALLOW_DANGEROUS_BACKDOORS=y and CONFIG_ASPEED_ENABLE_DEBUG_UART=y, I'd suggest moving this to arch/arm/mach-aspeed/Kconfig in the ASPEED_ALLOW_DANGEROUS_BACKDOORS 'if' block, perhaps in a nested 'if' block conditional on ASPEED_ENABLE_DEBUG_UART.
Also, I realize that name comes from previously existing code in platform.S, but it's not exactly the clearest, most descriptive name in the world (it's the debug UART, what's it go to do with DRAM?). If we're going to promote it to a Kconfig option I think it'd be nice to improve the naming somewhat, perhaps just s/DRAM/DEBUG/.
Quoted 6 lines
arch/arm/mach-aspeed/ast2500/Kconfig +0
-0source "board/aspeed/evb_ast2500/Kconfig" endifSignature · 1 line
2.35.3
Re: [PATCH u-boot v2019.04-aspeed-openbmc v3 2/3] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1
Quoted 34 lines · Zev Weiss
Quoted 16 lines · Patrick Rudolph
Update the
Kconfigand allow a board to useCONFIG_DRAM_UART_TO_UART1. The platform code already uses thisKconfigsymbol, but it always evaluated to false.
This is required on IBM/Genesis3 as it uses RDX1/TDX1 as debug uart.Signed-off-by Patrick Rudolph <[email protected]>Reviewed-by Joel Stanley <[email protected]>--- arch/arm/mach-aspeed/ast2500/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm/mach-aspeed/ast2500/Kconfig +0
-0arch/arm/mach-aspeed/ast2500/Kconfig config TARGET_EVB_AST2500 · line 25
Quoted 9 lines
arch/arm/mach-aspeed/ast2500/Kconfig +6
-0@@ -17,6 +17,12 @@ config TARGET_EVB_AST2500 20 pin JTAG, pinouts for 14 I2Cs, 3 SPIs and eSPI, 8 PWMs. endchoice +config DRAM_UART_TO_UART1 + bool + prompt "Route debug UART to UART1" + help + Route debug UART to TXD1/RXD1 pins. +Given that the debug UART is now disabled by default and only available via a combination of
CONFIG_ASPEED_ALLOW_DANGEROUS_BACKDOORS=yandCONFIG_ASPEED_ENABLE_DEBUG_UART=y, I'd suggest moving this toarch/arm/mach-aspeed/Kconfigin theASPEED_ALLOW_DANGEROUS_BACKDOORS'if' block, perhaps in a nested 'if' block conditional onASPEED_ENABLE_DEBUG_UART.
Quoted 5 lines
Also, I realize that name comes from previously existing code in
platform.S, but it's not exactly the clearest, most descriptive name in the world (it's the debug UART, what's it go to do with DRAM?). If we're going to promote it to aKconfigoption I think it'd be nice to improve the naming somewhat, perhaps just s/DRAM/DEBUG/.
Or actually s/DRAM/ASPEED_DEBUG/, since Kconfig symbols are a global namespace and DEBUG_UART_TO_UART1 would be a bit overly generic, IMO.
Quoted 7 lines
Quoted 7 lines
arch/arm/mach-aspeed/ast2500/Kconfig +0
-0source "board/aspeed/evb_ast2500/Kconfig" endifSignature · 1 line
2.35.3
PATCH v3 3/3 configs: Add IBM Genesis3 defconfig
In reply to Patrick RudolphUse the evb-ast2500_defconfig as reference to add support for the IBM genesis3 board.
Changes compared to evb-ast2500_defconfig are:
- Route debug uart to TXD1/RXD1
- Disable MMC and I2C support
- Use DTB ast2500-ibm-genesis3
--- configs/ibm_genesis3_defconfig | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 configs/ibm_genesis3_defconfig
configs/ibm_genesis3_defconfig new file +74 -0
@@ -0,0 +1,74 @@ +CONFIG_SPI_BOOT=y +CONFIG_FIT_VERBOSE=y +CONFIG_LOG=y +CONFIG_BOOTCOMMAND="bootm 20080000" +CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw earlycon" +# CONFIG_SYS_I2C_ASPEED is not set +CONFIG_ASPEED_AHBC=y +CONFIG_ARM=y +CONFIG_ARCH_ASPEED=y +CONFIG_SYS_TEXT_BASE=0x0 +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x60000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_FIT=y +CONFIG_USE_BOOTARGS=y +CONFIG_USE_BOOTCOMMAND=y +CONFIG_PRE_CONSOLE_BUFFER=y +CONFIG_PRE_CON_BUF_ADDR=0x1e720000 +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y +CONFIG_HUSH_PARSER=y +# CONFIG_AUTO_COMPLETE is not set +CONFIG_SYS_PROMPT="ast# " +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_XIMG is not set +CONFIG_CMD_MEMTEST=y +CONFIG_SYS_ALT_MEMTEST=y +CONFIG_CMD_CLK=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_SF=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_DEFAULT_DEVICE_TREE="ast2500-ibm-genesis3" +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_USE_ENV_SPI_BUS=y +CONFIG_ENV_SPI_BUS=0 +CONFIG_USE_ENV_SPI_CS=y +CONFIG_ENV_SPI_CS=0 +CONFIG_USE_ENV_SPI_MAX_HZ=y +CONFIG_ENV_SPI_MAX_HZ=50000000 +CONFIG_SF_DEFAULT_SPEED=50000000 +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_REGMAP=y +CONFIG_CLK=y +CONFIG_DM_GPIO=y +CONFIG_ASPEED_GPIO=y +# CONFIG_DM_I2C is not set +CONFIG_MISC=y +# CONFIG_DM_MMC is not set +# CONFIG_MMC is not set +# CONFIG_CMD_MMC is not set +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_SDHCI_ASPEED is not set +# CONFIG_MMC_HW_PARTITIONING is not set +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_DM_ETH=y +CONFIG_FTGMAC100=y +# CONFIG_PHY is not set +CONFIG_PINCTRL=y +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_SYSRESET=y +CONFIG_TIMER=y +CONFIG_WDT=y +CONFIG_WDT_ASPEED=y +# CONFIG_EFI_LOADER is not set +CONFIG_DRAM_UART_TO_UART1=y +CONFIG_FIRMWARE_2ND_BOOT=y
Signature · 1 line
2.35.3
Re: [PATCH u-boot v2019.04-aspeed-openbmc v3 3/3] configs: Add IBM Genesis3 defconfig
Quoted 8 lines · Patrick Rudolph
Use the evb-ast2500_defconfig as reference to add support for the IBM genesis3 board.
Changes compared to evb-ast2500_defconfig are:
- Route debug uart to TXD1/RXD1
- Disable MMC and I2C support
- Use DTB ast2500-ibm-genesis3
Quoted 6 lines
Signed-off-by Patrick Rudolph <[email protected]>--- configs/ibm_genesis3_defconfig | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 configs/ibm_genesis3_defconfig
As Joel mentioned in another thread earlier, having a bunch of system-specific defconfigs accumulating doesn't seem ideal; maybe just put whatever system-specific stuff genesis3 needs into an add-on *.cfg via a bbappend in an openbmc meta layer?
Quoted 83 lines
configs/ibm_genesis3_defconfig new file +74
-0@@ -0,0 +1,74 @@ +CONFIG_SPI_BOOT=y +CONFIG_FIT_VERBOSE=y +CONFIG_LOG=y +CONFIG_BOOTCOMMAND="bootm 20080000" +CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw earlycon" +# CONFIG_SYS_I2C_ASPEED is not set +CONFIG_ASPEED_AHBC=y +CONFIG_ARM=y +CONFIG_ARCH_ASPEED=y +CONFIG_SYS_TEXT_BASE=0x0 +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x60000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_FIT=y +CONFIG_USE_BOOTARGS=y +CONFIG_USE_BOOTCOMMAND=y +CONFIG_PRE_CONSOLE_BUFFER=y +CONFIG_PRE_CON_BUF_ADDR=0x1e720000 +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y +CONFIG_HUSH_PARSER=y +# CONFIG_AUTO_COMPLETE is not set +CONFIG_SYS_PROMPT="ast# " +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_XIMG is not set +CONFIG_CMD_MEMTEST=y +CONFIG_SYS_ALT_MEMTEST=y +CONFIG_CMD_CLK=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_SF=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_DEFAULT_DEVICE_TREE="ast2500-ibm-genesis3" +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_USE_ENV_SPI_BUS=y +CONFIG_ENV_SPI_BUS=0 +CONFIG_USE_ENV_SPI_CS=y +CONFIG_ENV_SPI_CS=0 +CONFIG_USE_ENV_SPI_MAX_HZ=y +CONFIG_ENV_SPI_MAX_HZ=50000000 +CONFIG_SF_DEFAULT_SPEED=50000000 +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_REGMAP=y +CONFIG_CLK=y +CONFIG_DM_GPIO=y +CONFIG_ASPEED_GPIO=y +# CONFIG_DM_I2C is not set +CONFIG_MISC=y +# CONFIG_DM_MMC is not set +# CONFIG_MMC is not set +# CONFIG_CMD_MMC is not set +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_SDHCI_ASPEED is not set +# CONFIG_MMC_HW_PARTITIONING is not set +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_DM_ETH=y +CONFIG_FTGMAC100=y +# CONFIG_PHY is not set +CONFIG_PINCTRL=y +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_SYSRESET=y +CONFIG_TIMER=y +CONFIG_WDT=y +CONFIG_WDT_ASPEED=y +# CONFIG_EFI_LOADER is not set +CONFIG_DRAM_UART_TO_UART1=y +CONFIG_FIRMWARE_2ND_BOOT=ySignature · 1 line
2.35.3