All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board
@ 2022-04-20 10:24 Patrick Rudolph
  2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1 Patrick Rudolph
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Patrick Rudolph @ 2022-04-20 10:24 UTC (permalink / raw)
  To: joel, openbmc; +Cc: christian.walter, takken, Patrick Rudolph

Add IBM Genesis3 board and devicetree source file.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
 arch/arm/dts/Makefile                |  1 +
 arch/arm/dts/ibm-genesis3.dts        | 83 ++++++++++++++++++++++++++++
 arch/arm/mach-aspeed/ast2500/Kconfig | 11 ++++
 board/ibm/genesis3/Kconfig           | 13 +++++
 board/ibm/genesis3/Makefile          |  1 +
 board/ibm/genesis3/ibm_genesis3.c    |  5 ++
 include/configs/ibm_genesis3.h       | 19 +++++++
 7 files changed, 133 insertions(+)
 create mode 100644 arch/arm/dts/ibm-genesis3.dts
 create mode 100644 board/ibm/genesis3/Kconfig
 create mode 100644 board/ibm/genesis3/Makefile
 create mode 100644 board/ibm/genesis3/ibm_genesis3.c
 create mode 100644 include/configs/ibm_genesis3.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index a79f885f54..fae23e6bc1 100755
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -677,6 +677,7 @@ dtb-$(CONFIG_ARCH_BCM6858) += \
 dtb-$(CONFIG_ARCH_ASPEED) += \
 	ast2400-evb.dtb \
 	ast2500-evb.dtb \
+	ibm-genesis3.dtb \
 	ast2600a0-evb.dtb \
 	ast2600a1-evb.dtb \
 	ast2600-bletchley.dtb \
diff --git a/arch/arm/dts/ibm-genesis3.dts b/arch/arm/dts/ibm-genesis3.dts
new file mode 100644
index 0000000000..ba610c9032
--- /dev/null
+++ b/arch/arm/dts/ibm-genesis3.dts
@@ -0,0 +1,83 @@
+/dts-v1/;
+
+#include "ast2500-u-boot.dtsi"
+
+/ {
+        model = "IBM Genesis3";
+        compatible = "ibm,genesis3", "aspeed,ast2500";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x20000000>;
+	};
+
+	chosen {
+		stdout-path = &uart5;
+	};
+
+	aliases {
+		spi0 = &fmc;
+		ethernet0 = &mac0;
+		ethernet1 = &mac1;
+	};
+};
+
+&uart5 {
+	u-boot,dm-pre-reloc;
+	status = "okay";
+};
+
+&sdrammc {
+	clock-frequency = <400000000>;
+};
+
+&wdt1 {
+	u-boot,dm-pre-reloc;
+	status = "okay";
+};
+
+&wdt2 {
+	u-boot,dm-pre-reloc;
+	status = "okay";
+};
+
+&wdt3 {
+	u-boot,dm-pre-reloc;
+	status = "okay";
+};
+
+&mac0 {
+	status = "okay";
+	phy-mode = "rgmii";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_mac1link_default &pinctrl_mdio1_default>;
+};
+
+&mac1 {
+	status = "okay";
+	phy-mode = "rgmii";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_mac2link_default &pinctrl_mdio2_default>;
+};
+
+&fmc {
+	status = "okay";
+	timing-calibration-disabled;
+	flash@0 {
+		compatible = "spi-flash", "spansion,s25fl256l";
+		status = "okay";
+		spi-max-frequency = <50000000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+	};
+
+	flash@1 {
+                compatible = "spi-flash", "spansion,s25fl256l";
+                status = "okay";
+                spi-max-frequency = <50000000>;
+                spi-tx-bus-width = <2>;
+                spi-rx-bus-width = <2>;
+        };
+};
+
diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
index 4f992f442d..81c4fd0c2f 100644
--- a/arch/arm/mach-aspeed/ast2500/Kconfig
+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
@@ -15,8 +15,19 @@ config TARGET_EVB_AST2500
 	  It has 512M of RAM, 32M of SPI flash, two Ethernet ports,
 	  4 Serial ports, 4 USB ports, VGA port, PCIe, SD card slot,
 	  20 pin JTAG, pinouts for 14 I2Cs, 3 SPIs and eSPI, 8 PWMs.
+
+config TARGET_IBM_GENESIS3
+	bool "IBM-Genesis3"
+	help
+	  IBM Genesis3 is an IBM evaluation board for Intel Xeon
+	  and AST2500 BMC. It has 512M of RAM, 32M of SPI flash,
+	  two Ethernet ports, 1 debug uart, 1 USB ports and 1 PCIe
+	  port connected to the PCH.
+	  It has support for JTAG, pinouts for 9 I2Cs and eSPI.
+
 endchoice
 
 source "board/aspeed/evb_ast2500/Kconfig"
+source "board/ibm/genesis3/Kconfig"
 
 endif
diff --git a/board/ibm/genesis3/Kconfig b/board/ibm/genesis3/Kconfig
new file mode 100644
index 0000000000..09fe60262b
--- /dev/null
+++ b/board/ibm/genesis3/Kconfig
@@ -0,0 +1,13 @@
+if TARGET_IBM_GENESIS3
+
+config SYS_BOARD
+	default "genesis3"
+
+config SYS_VENDOR
+	default "ibm"
+
+config SYS_CONFIG_NAME
+	string "board configuration name"
+	default "ibm_genesis3"
+
+endif
diff --git a/board/ibm/genesis3/Makefile b/board/ibm/genesis3/Makefile
new file mode 100644
index 0000000000..2bb8917fab
--- /dev/null
+++ b/board/ibm/genesis3/Makefile
@@ -0,0 +1 @@
+obj-y += ibm_genesis3.o
diff --git a/board/ibm/genesis3/ibm_genesis3.c b/board/ibm/genesis3/ibm_genesis3.c
new file mode 100644
index 0000000000..9de8531806
--- /dev/null
+++ b/board/ibm/genesis3/ibm_genesis3.c
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2022 9elements GmbH
+ */
+#include <common.h>
diff --git a/include/configs/ibm_genesis3.h b/include/configs/ibm_genesis3.h
new file mode 100644
index 0000000000..f40aeed8a9
--- /dev/null
+++ b/include/configs/ibm_genesis3.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2022 9elements GmbH.
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include <configs/aspeed-common.h>
+
+#define CONFIG_SYS_MEMTEST_START	(CONFIG_SYS_SDRAM_BASE + 0x300000)
+#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 0x5000000)
+
+#define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_TEXT_BASE
+
+/* Memory Info */
+#define CONFIG_SYS_LOAD_ADDR		0x83000000
+
+#endif	/* __CONFIG_H */
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH u-boot v2019.04-aspeed-openbmc 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1
  2022-04-20 10:24 [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
@ 2022-04-20 10:25 ` Patrick Rudolph
  2022-04-21  5:42   ` Zev Weiss
  2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 3/4] arm/mach-aspeed: Allow to disable WDT2 Patrick Rudolph
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Patrick Rudolph @ 2022-04-20 10:25 UTC (permalink / raw)
  To: joel, openbmc; +Cc: christian.walter, takken, Patrick Rudolph

Update the Kconfig and allow a board to use CONFIG_DRAM_UART_TO_UART1.
This is required on IBM/Genesis3 as it uses RDX1/TDX1 as debug uart.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
 arch/arm/mach-aspeed/ast2500/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
index 81c4fd0c2f..232117b43c 100644
--- a/arch/arm/mach-aspeed/ast2500/Kconfig
+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
@@ -27,6 +27,12 @@ config TARGET_IBM_GENESIS3
 
 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"
 source "board/ibm/genesis3/Kconfig"
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH u-boot v2019.04-aspeed-openbmc 3/4] arm/mach-aspeed: Allow to disable WDT2
  2022-04-20 10:24 [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
  2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1 Patrick Rudolph
@ 2022-04-20 10:25 ` Patrick Rudolph
  2022-04-21  5:42   ` Zev Weiss
  2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 4/4] configs: Add IBM Genesis3 defconfig Patrick Rudolph
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Patrick Rudolph @ 2022-04-20 10:25 UTC (permalink / raw)
  To: joel, openbmc; +Cc: christian.walter, takken, Patrick Rudolph

There's no working code to poke the WDT2 and it takes too long for the
kernel to load to poke the watchdog. Selecting this Kconfig disables
the WDT2 and prevents 2nd firmware from being launched during normal boot.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
 arch/arm/mach-aspeed/ast2500/Kconfig    | 6 ++++++
 arch/arm/mach-aspeed/ast2500/platform.S | 6 ++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
index 232117b43c..a9d880e557 100644
--- a/arch/arm/mach-aspeed/ast2500/Kconfig
+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
@@ -33,6 +33,12 @@ config DRAM_UART_TO_UART1
 	help
 	  Route debug UART to TXD1/RXD1 pins.
 
+config FIRMWARE_DISABLE_2ND_BOOT
+	bool
+	prompt "Do not disable WDT2 for 2nd boot function"
+	help
+	  Do not disable WDT2 for 2nd boot function.
+
 source "board/aspeed/evb_ast2500/Kconfig"
 source "board/ibm/genesis3/Kconfig"
 
diff --git a/arch/arm/mach-aspeed/ast2500/platform.S b/arch/arm/mach-aspeed/ast2500/platform.S
index aef55c4a0a..3eb9ee9419 100644
--- a/arch/arm/mach-aspeed/ast2500/platform.S
+++ b/arch/arm/mach-aspeed/ast2500/platform.S
@@ -95,7 +95,7 @@
  *    CONFIG_DDR3_8GSTACK         // DDR3 8Gbit Stack die
  *    CONFIG_DDR4_4GX8            // DDR4 4Gbit X8 dual part
  * 5. Firmware 2nd boot flash
- *    CONFIG_FIRMWARE_2ND_BOOT (Removed)
+ *    CONFIG_FIRMWARE_DISABLE_2ND_BOOT
  * 6. Enable DRAM extended temperature range mode
  *    CONFIG_DRAM_EXT_TEMP
  * 7. Select WDT_Full mode for power up initial reset
@@ -642,13 +642,11 @@ bypass_USB_init:
 /******************************************************************************
  Disable WDT2 for 2nd boot function
  ******************************************************************************/
-/*
-#ifndef CONFIG_FIRMWARE_2ND_BOOT
+#if CONFIG_FIRMWARE_DISABLE_2ND_BOOT
     ldr   r0, =0x1e78502c
     mov   r1, #0
     str   r1, [r0]
 #endif
-*/
 /******************************************************************************
  Disable WDT3 for SPI Address mode (3 or 4 bytes) detection function
  ******************************************************************************/
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH u-boot v2019.04-aspeed-openbmc 4/4] configs: Add IBM Genesis3 defconfig
  2022-04-20 10:24 [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
  2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1 Patrick Rudolph
  2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 3/4] arm/mach-aspeed: Allow to disable WDT2 Patrick Rudolph
@ 2022-04-20 10:25 ` Patrick Rudolph
  2022-04-21  5:41 ` [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board Zev Weiss
  2022-04-21  5:52 ` Joel Stanley
  4 siblings, 0 replies; 11+ messages in thread
From: Patrick Rudolph @ 2022-04-20 10:25 UTC (permalink / raw)
  To: joel, openbmc; +Cc: christian.walter, takken, Patrick Rudolph

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
 configs/ibm_genesis3_defconfig | 72 ++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 configs/ibm_genesis3_defconfig

diff --git a/configs/ibm_genesis3_defconfig b/configs/ibm_genesis3_defconfig
new file mode 100644
index 0000000000..b9520547a0
--- /dev/null
+++ b/configs/ibm_genesis3_defconfig
@@ -0,0 +1,72 @@
+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="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_NET_RANDOM_ETHADDR=y
+CONFIG_REGMAP=y
+CONFIG_CLK=y
+CONFIG_DM_GPIO=y
+CONFIG_ASPEED_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_MISC=y
+CONFIG_DM_MMC=y
+# 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_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_EFI_LOADER is not set
+CONFIG_DRAM_UART_TO_UART1=y
+CONFIG_FIRMWARE_DISABLE_2ND_BOOT=y
+CONFIG_TARGET_IBM_GENESIS3=y
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board
  2022-04-20 10:24 [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
                   ` (2 preceding siblings ...)
  2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 4/4] configs: Add IBM Genesis3 defconfig Patrick Rudolph
@ 2022-04-21  5:41 ` Zev Weiss
  2022-04-21  5:52 ` Joel Stanley
  4 siblings, 0 replies; 11+ messages in thread
From: Zev Weiss @ 2022-04-21  5:41 UTC (permalink / raw)
  To: Patrick Rudolph; +Cc: christian.walter, openbmc, takken, joel

On Wed, Apr 20, 2022 at 03:24:59AM PDT, Patrick Rudolph wrote:
>Add IBM Genesis3 board and devicetree source file.
>
>Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
>---
> arch/arm/dts/Makefile                |  1 +
> arch/arm/dts/ibm-genesis3.dts        | 83 ++++++++++++++++++++++++++++
> arch/arm/mach-aspeed/ast2500/Kconfig | 11 ++++
> board/ibm/genesis3/Kconfig           | 13 +++++
> board/ibm/genesis3/Makefile          |  1 +
> board/ibm/genesis3/ibm_genesis3.c    |  5 ++
> include/configs/ibm_genesis3.h       | 19 +++++++
> 7 files changed, 133 insertions(+)
> create mode 100644 arch/arm/dts/ibm-genesis3.dts
> create mode 100644 board/ibm/genesis3/Kconfig
> create mode 100644 board/ibm/genesis3/Makefile
> create mode 100644 board/ibm/genesis3/ibm_genesis3.c
> create mode 100644 include/configs/ibm_genesis3.h
>
>diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
>index a79f885f54..fae23e6bc1 100755
>--- a/arch/arm/dts/Makefile
>+++ b/arch/arm/dts/Makefile
>@@ -677,6 +677,7 @@ dtb-$(CONFIG_ARCH_BCM6858) += \
> dtb-$(CONFIG_ARCH_ASPEED) += \
> 	ast2400-evb.dtb \
> 	ast2500-evb.dtb \
>+	ibm-genesis3.dtb \

For consistency with the existing naming convention, maybe
ast2500-genesis3 instead of ibm-genesis3?

> 	ast2600a0-evb.dtb \
> 	ast2600a1-evb.dtb \
> 	ast2600-bletchley.dtb \
>diff --git a/arch/arm/dts/ibm-genesis3.dts b/arch/arm/dts/ibm-genesis3.dts
>new file mode 100644
>index 0000000000..ba610c9032
>--- /dev/null
>+++ b/arch/arm/dts/ibm-genesis3.dts
>@@ -0,0 +1,83 @@
>+/dts-v1/;
>+
>+#include "ast2500-u-boot.dtsi"
>+
>+/ {
>+        model = "IBM Genesis3";
>+        compatible = "ibm,genesis3", "aspeed,ast2500";

Whitespace looks off on these two lines (spaces instead of tabs).  Also,
I think most BMC compatible strings have a "-bmc" suffix, FWIW.

>+
>+	memory {
>+		device_type = "memory";
>+		reg = <0x80000000 0x20000000>;
>+	};
>+
>+	chosen {
>+		stdout-path = &uart5;
>+	};
>+
>+	aliases {
>+		spi0 = &fmc;
>+		ethernet0 = &mac0;
>+		ethernet1 = &mac1;
>+	};
>+};
>+
>+&uart5 {
>+	u-boot,dm-pre-reloc;
>+	status = "okay";
>+};
>+
>+&sdrammc {
>+	clock-frequency = <400000000>;
>+};
>+
>+&wdt1 {
>+	u-boot,dm-pre-reloc;
>+	status = "okay";
>+};
>+
>+&wdt2 {
>+	u-boot,dm-pre-reloc;
>+	status = "okay";
>+};
>+
>+&wdt3 {
>+	u-boot,dm-pre-reloc;
>+	status = "okay";
>+};
>+
>+&mac0 {
>+	status = "okay";
>+	phy-mode = "rgmii";
>+
>+	pinctrl-names = "default";
>+	pinctrl-0 = <&pinctrl_mac1link_default &pinctrl_mdio1_default>;
>+};
>+
>+&mac1 {
>+	status = "okay";
>+	phy-mode = "rgmii";
>+	pinctrl-names = "default";
>+	pinctrl-0 = <&pinctrl_mac2link_default &pinctrl_mdio2_default>;
>+};
>+
>+&fmc {
>+	status = "okay";
>+	timing-calibration-disabled;
>+	flash@0 {
>+		compatible = "spi-flash", "spansion,s25fl256l";
>+		status = "okay";
>+		spi-max-frequency = <50000000>;
>+		spi-tx-bus-width = <2>;
>+		spi-rx-bus-width = <2>;
>+	};
>+
>+	flash@1 {
>+                compatible = "spi-flash", "spansion,s25fl256l";
>+                status = "okay";
>+                spi-max-frequency = <50000000>;
>+                spi-tx-bus-width = <2>;
>+                spi-rx-bus-width = <2>;
>+        };

These lines appear to be space-indented again.

>+};
>+
>diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
>index 4f992f442d..81c4fd0c2f 100644
>--- a/arch/arm/mach-aspeed/ast2500/Kconfig
>+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
>@@ -15,8 +15,19 @@ config TARGET_EVB_AST2500
> 	  It has 512M of RAM, 32M of SPI flash, two Ethernet ports,
> 	  4 Serial ports, 4 USB ports, VGA port, PCIe, SD card slot,
> 	  20 pin JTAG, pinouts for 14 I2Cs, 3 SPIs and eSPI, 8 PWMs.
>+
>+config TARGET_IBM_GENESIS3
>+	bool "IBM-Genesis3"
>+	help
>+	  IBM Genesis3 is an IBM evaluation board for Intel Xeon
>+	  and AST2500 BMC. It has 512M of RAM, 32M of SPI flash,
>+	  two Ethernet ports, 1 debug uart, 1 USB ports and 1 PCIe
>+	  port connected to the PCH.
>+	  It has support for JTAG, pinouts for 9 I2Cs and eSPI.

Might as well take out the line-break before the last sentence?

>+
> endchoice
>
> source "board/aspeed/evb_ast2500/Kconfig"
>+source "board/ibm/genesis3/Kconfig"
>
> endif
>diff --git a/board/ibm/genesis3/Kconfig b/board/ibm/genesis3/Kconfig
>new file mode 100644
>index 0000000000..09fe60262b
>--- /dev/null
>+++ b/board/ibm/genesis3/Kconfig
>@@ -0,0 +1,13 @@
>+if TARGET_IBM_GENESIS3
>+
>+config SYS_BOARD
>+	default "genesis3"
>+
>+config SYS_VENDOR
>+	default "ibm"
>+
>+config SYS_CONFIG_NAME
>+	string "board configuration name"
>+	default "ibm_genesis3"
>+
>+endif
>diff --git a/board/ibm/genesis3/Makefile b/board/ibm/genesis3/Makefile
>new file mode 100644
>index 0000000000..2bb8917fab
>--- /dev/null
>+++ b/board/ibm/genesis3/Makefile
>@@ -0,0 +1 @@
>+obj-y += ibm_genesis3.o
>diff --git a/board/ibm/genesis3/ibm_genesis3.c b/board/ibm/genesis3/ibm_genesis3.c
>new file mode 100644
>index 0000000000..9de8531806
>--- /dev/null
>+++ b/board/ibm/genesis3/ibm_genesis3.c
>@@ -0,0 +1,5 @@
>+// SPDX-License-Identifier: GPL-2.0+
>+/*
>+ * Copyright (c) 2022 9elements GmbH
>+ */
>+#include <common.h>
>diff --git a/include/configs/ibm_genesis3.h b/include/configs/ibm_genesis3.h
>new file mode 100644
>index 0000000000..f40aeed8a9
>--- /dev/null
>+++ b/include/configs/ibm_genesis3.h
>@@ -0,0 +1,19 @@
>+/* SPDX-License-Identifier: GPL-2.0+ */
>+/*
>+ * Copyright 2022 9elements GmbH.
>+ */
>+
>+#ifndef __CONFIG_H
>+#define __CONFIG_H
>+
>+#include <configs/aspeed-common.h>
>+
>+#define CONFIG_SYS_MEMTEST_START	(CONFIG_SYS_SDRAM_BASE + 0x300000)
>+#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 0x5000000)
>+
>+#define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_TEXT_BASE
>+
>+/* Memory Info */
>+#define CONFIG_SYS_LOAD_ADDR		0x83000000
>+
>+#endif	/* __CONFIG_H */
>-- 
>2.35.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1
  2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1 Patrick Rudolph
@ 2022-04-21  5:42   ` Zev Weiss
  0 siblings, 0 replies; 11+ messages in thread
From: Zev Weiss @ 2022-04-21  5:42 UTC (permalink / raw)
  To: Patrick Rudolph; +Cc: christian.walter, openbmc, takken, joel

On Wed, Apr 20, 2022 at 03:25:00AM PDT, Patrick Rudolph wrote:
>Update the Kconfig and allow a board to use CONFIG_DRAM_UART_TO_UART1.
>This is required on IBM/Genesis3 as it uses RDX1/TDX1 as debug uart.
>

Since I was a bit confused at first at seeing a new Kconfig symbol with
no accompanying code to implement its functionality (until I grepped
around a bit and saw why), it might be nice to note in the commit
message that the logic to support this already exists in the ast2500
platform code and just didn't have an accompanying Kconfig option until
now.

>Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
>---
> arch/arm/mach-aspeed/ast2500/Kconfig | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
>index 81c4fd0c2f..232117b43c 100644
>--- a/arch/arm/mach-aspeed/ast2500/Kconfig
>+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
>@@ -27,6 +27,12 @@ config TARGET_IBM_GENESIS3
>
> 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"
> source "board/ibm/genesis3/Kconfig"
>
>-- 
>2.35.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 3/4] arm/mach-aspeed: Allow to disable WDT2
  2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 3/4] arm/mach-aspeed: Allow to disable WDT2 Patrick Rudolph
@ 2022-04-21  5:42   ` Zev Weiss
  2022-04-21  5:54     ` Joel Stanley
  0 siblings, 1 reply; 11+ messages in thread
From: Zev Weiss @ 2022-04-21  5:42 UTC (permalink / raw)
  To: Patrick Rudolph; +Cc: christian.walter, openbmc, Lei Yu, takken, joel

On Wed, Apr 20, 2022 at 03:25:01AM PDT, Patrick Rudolph wrote:
>There's no working code to poke the WDT2 and it takes too long for the
>kernel to load to poke the watchdog. Selecting this Kconfig disables
>the WDT2 and prevents 2nd firmware from being launched during normal boot.
>

I seem to recall Lei Yu (CCed) hitting problems with watchdog timeouts a
little while back, which I think ended up being due to caches being
disabled for some reason...have you done any measurements to try to
determine what's causing it to take so long?

>Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
>---
> arch/arm/mach-aspeed/ast2500/Kconfig    | 6 ++++++
> arch/arm/mach-aspeed/ast2500/platform.S | 6 ++----
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
>diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
>index 232117b43c..a9d880e557 100644
>--- a/arch/arm/mach-aspeed/ast2500/Kconfig
>+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
>@@ -33,6 +33,12 @@ config DRAM_UART_TO_UART1
> 	help
> 	  Route debug UART to TXD1/RXD1 pins.
>
>+config FIRMWARE_DISABLE_2ND_BOOT
>+	bool
>+	prompt "Do not disable WDT2 for 2nd boot function"
>+	help
>+	  Do not disable WDT2 for 2nd boot function.

This seems a bit confusing -- for one thing, the config symbol name and
the prompt/help text sound like opposites (one says "disable", the
others say "do not disable").  A slightly more detailed explanation
might be good.

>+
> source "board/aspeed/evb_ast2500/Kconfig"
> source "board/ibm/genesis3/Kconfig"
>
>diff --git a/arch/arm/mach-aspeed/ast2500/platform.S b/arch/arm/mach-aspeed/ast2500/platform.S
>index aef55c4a0a..3eb9ee9419 100644
>--- a/arch/arm/mach-aspeed/ast2500/platform.S
>+++ b/arch/arm/mach-aspeed/ast2500/platform.S
>@@ -95,7 +95,7 @@
>  *    CONFIG_DDR3_8GSTACK         // DDR3 8Gbit Stack die
>  *    CONFIG_DDR4_4GX8            // DDR4 4Gbit X8 dual part
>  * 5. Firmware 2nd boot flash
>- *    CONFIG_FIRMWARE_2ND_BOOT (Removed)
>+ *    CONFIG_FIRMWARE_DISABLE_2ND_BOOT
>  * 6. Enable DRAM extended temperature range mode
>  *    CONFIG_DRAM_EXT_TEMP
>  * 7. Select WDT_Full mode for power up initial reset
>@@ -642,13 +642,11 @@ bypass_USB_init:
> /******************************************************************************
>  Disable WDT2 for 2nd boot function
>  ******************************************************************************/
>-/*
>-#ifndef CONFIG_FIRMWARE_2ND_BOOT
>+#if CONFIG_FIRMWARE_DISABLE_2ND_BOOT
>     ldr   r0, =0x1e78502c
>     mov   r1, #0
>     str   r1, [r0]
> #endif
>-*/
> /******************************************************************************
>  Disable WDT3 for SPI Address mode (3 or 4 bytes) detection function
>  ******************************************************************************/
>-- 
>2.35.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board
  2022-04-20 10:24 [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
                   ` (3 preceding siblings ...)
  2022-04-21  5:41 ` [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board Zev Weiss
@ 2022-04-21  5:52 ` Joel Stanley
  2022-04-21  8:34   ` Patrick Rudolph
  4 siblings, 1 reply; 11+ messages in thread
From: Joel Stanley @ 2022-04-21  5:52 UTC (permalink / raw)
  To: Patrick Rudolph; +Cc: christian.walter, OpenBMC Maillist, takken

On Wed, 20 Apr 2022 at 10:25, Patrick Rudolph
<patrick.rudolph@9elements.com> wrote:
>
> Add IBM Genesis3 board and devicetree source file.
>
> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> ---
>  arch/arm/dts/Makefile                |  1 +
>  arch/arm/dts/ibm-genesis3.dts        | 83 ++++++++++++++++++++++++++++
>  arch/arm/mach-aspeed/ast2500/Kconfig | 11 ++++
>  board/ibm/genesis3/Kconfig           | 13 +++++
>  board/ibm/genesis3/Makefile          |  1 +
>  board/ibm/genesis3/ibm_genesis3.c    |  5 ++
>  include/configs/ibm_genesis3.h       | 19 +++++++
>  7 files changed, 133 insertions(+)
>  create mode 100644 arch/arm/dts/ibm-genesis3.dts
>  create mode 100644 board/ibm/genesis3/Kconfig
>  create mode 100644 board/ibm/genesis3/Makefile
>  create mode 100644 board/ibm/genesis3/ibm_genesis3.c
>  create mode 100644 include/configs/ibm_genesis3.h
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index a79f885f54..fae23e6bc1 100755
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -677,6 +677,7 @@ dtb-$(CONFIG_ARCH_BCM6858) += \
>  dtb-$(CONFIG_ARCH_ASPEED) += \
>         ast2400-evb.dtb \
>         ast2500-evb.dtb \
> +       ibm-genesis3.dtb \
>         ast2600a0-evb.dtb \
>         ast2600a1-evb.dtb \
>         ast2600-bletchley.dtb \
> diff --git a/arch/arm/dts/ibm-genesis3.dts b/arch/arm/dts/ibm-genesis3.dts
> new file mode 100644
> index 0000000000..ba610c9032
> --- /dev/null
> +++ b/arch/arm/dts/ibm-genesis3.dts
> @@ -0,0 +1,83 @@
> +/dts-v1/;
> +
> +#include "ast2500-u-boot.dtsi"
> +
> +/ {
> +        model = "IBM Genesis3";
> +        compatible = "ibm,genesis3", "aspeed,ast2500";
> +
> +       memory {
> +               device_type = "memory";
> +               reg = <0x80000000 0x20000000>;
> +       };
> +
> +       chosen {
> +               stdout-path = &uart5;
> +       };
> +
> +       aliases {
> +               spi0 = &fmc;
> +               ethernet0 = &mac0;
> +               ethernet1 = &mac1;
> +       };
> +};
> +
> +&uart5 {
> +       u-boot,dm-pre-reloc;
> +       status = "okay";
> +};
> +
> +&sdrammc {
> +       clock-frequency = <400000000>;
> +};
> +
> +&wdt1 {
> +       u-boot,dm-pre-reloc;
> +       status = "okay";
> +};
> +
> +&wdt2 {
> +       u-boot,dm-pre-reloc;
> +       status = "okay";
> +};
> +
> +&wdt3 {
> +       u-boot,dm-pre-reloc;
> +       status = "okay";
> +};
> +
> +&mac0 {
> +       status = "okay";
> +       phy-mode = "rgmii";
> +
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_mac1link_default &pinctrl_mdio1_default>;
> +};
> +
> +&mac1 {
> +       status = "okay";
> +       phy-mode = "rgmii";
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_mac2link_default &pinctrl_mdio2_default>;
> +};
> +
> +&fmc {
> +       status = "okay";
> +       timing-calibration-disabled;
> +       flash@0 {
> +               compatible = "spi-flash", "spansion,s25fl256l";
> +               status = "okay";
> +               spi-max-frequency = <50000000>;
> +               spi-tx-bus-width = <2>;
> +               spi-rx-bus-width = <2>;
> +       };
> +
> +       flash@1 {
> +                compatible = "spi-flash", "spansion,s25fl256l";
> +                status = "okay";
> +                spi-max-frequency = <50000000>;
> +                spi-tx-bus-width = <2>;
> +                spi-rx-bus-width = <2>;
> +        };
> +};
> +
> diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
> index 4f992f442d..81c4fd0c2f 100644
> --- a/arch/arm/mach-aspeed/ast2500/Kconfig
> +++ b/arch/arm/mach-aspeed/ast2500/Kconfig
> @@ -15,8 +15,19 @@ config TARGET_EVB_AST2500
>           It has 512M of RAM, 32M of SPI flash, two Ethernet ports,
>           4 Serial ports, 4 USB ports, VGA port, PCIe, SD card slot,
>           20 pin JTAG, pinouts for 14 I2Cs, 3 SPIs and eSPI, 8 PWMs.
> +
> +config TARGET_IBM_GENESIS3
> +       bool "IBM-Genesis3"
> +       help
> +         IBM Genesis3 is an IBM evaluation board for Intel Xeon
> +         and AST2500 BMC. It has 512M of RAM, 32M of SPI flash,
> +         two Ethernet ports, 1 debug uart, 1 USB ports and 1 PCIe
> +         port connected to the PCH.
> +         It has support for JTAG, pinouts for 9 I2Cs and eSPI.

Given this is another aspeed system, would it make sense to group it
the same way we've grouped the existing boards under an "aspeed"
prefix? (The rainier system is an IBM system, FWIW).

The board file looks to be similar enough to the existing evb-ast2500.
Can you make a case for maintaining another one, or should we re-use
what's there like the other platforms have done?

> +
>  endchoice
>
>  source "board/aspeed/evb_ast2500/Kconfig"
> +source "board/ibm/genesis3/Kconfig"
>
>  endif
> diff --git a/board/ibm/genesis3/Kconfig b/board/ibm/genesis3/Kconfig
> new file mode 100644
> index 0000000000..09fe60262b
> --- /dev/null
> +++ b/board/ibm/genesis3/Kconfig
> @@ -0,0 +1,13 @@
> +if TARGET_IBM_GENESIS3
> +
> +config SYS_BOARD
> +       default "genesis3"
> +
> +config SYS_VENDOR
> +       default "ibm"
> +
> +config SYS_CONFIG_NAME
> +       string "board configuration name"
> +       default "ibm_genesis3"
> +
> +endif
> diff --git a/board/ibm/genesis3/Makefile b/board/ibm/genesis3/Makefile
> new file mode 100644
> index 0000000000..2bb8917fab
> --- /dev/null
> +++ b/board/ibm/genesis3/Makefile
> @@ -0,0 +1 @@
> +obj-y += ibm_genesis3.o
> diff --git a/board/ibm/genesis3/ibm_genesis3.c b/board/ibm/genesis3/ibm_genesis3.c
> new file mode 100644
> index 0000000000..9de8531806
> --- /dev/null
> +++ b/board/ibm/genesis3/ibm_genesis3.c
> @@ -0,0 +1,5 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (c) 2022 9elements GmbH
> + */
> +#include <common.h>
> diff --git a/include/configs/ibm_genesis3.h b/include/configs/ibm_genesis3.h
> new file mode 100644
> index 0000000000..f40aeed8a9
> --- /dev/null
> +++ b/include/configs/ibm_genesis3.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright 2022 9elements GmbH.
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +#include <configs/aspeed-common.h>
> +
> +#define CONFIG_SYS_MEMTEST_START       (CONFIG_SYS_SDRAM_BASE + 0x300000)
> +#define CONFIG_SYS_MEMTEST_END         (CONFIG_SYS_MEMTEST_START + 0x5000000)
> +
> +#define CONFIG_SYS_UBOOT_BASE          CONFIG_SYS_TEXT_BASE
> +
> +/* Memory Info */
> +#define CONFIG_SYS_LOAD_ADDR           0x83000000
> +
> +#endif /* __CONFIG_H */
> --
> 2.35.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 3/4] arm/mach-aspeed: Allow to disable WDT2
  2022-04-21  5:42   ` Zev Weiss
@ 2022-04-21  5:54     ` Joel Stanley
  2022-04-21  8:39       ` Patrick Rudolph
  0 siblings, 1 reply; 11+ messages in thread
From: Joel Stanley @ 2022-04-21  5:54 UTC (permalink / raw)
  To: Zev Weiss; +Cc: christian.walter, openbmc, Lei Yu, takken, Patrick Rudolph

On Thu, 21 Apr 2022 at 05:42, Zev Weiss <zweiss@equinix.com> wrote:
>
> On Wed, Apr 20, 2022 at 03:25:01AM PDT, Patrick Rudolph wrote:
> >There's no working code to poke the WDT2 and it takes too long for the
> >kernel to load to poke the watchdog. Selecting this Kconfig disables
> >the WDT2 and prevents 2nd firmware from being launched during normal boot.
> >
>
> I seem to recall Lei Yu (CCed) hitting problems with watchdog timeouts a
> little while back, which I think ended up being due to caches being
> disabled for some reason...have you done any measurements to try to
> determine what's causing it to take so long?

Yes. Some work is required in this area:

 - re-enable the dcache for the 2500. It works fine, and speeds up boot.

 - pat the watchdog so it doesn't expire when loading, or sitting at
the command prompt

An alternative is to disable the watchdog as we've done here. I'd lean
towards leaving it running (as then if there's a hang, the system will
reobot and try again).

>
> >Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> >---
> > arch/arm/mach-aspeed/ast2500/Kconfig    | 6 ++++++
> > arch/arm/mach-aspeed/ast2500/platform.S | 6 ++----
> > 2 files changed, 8 insertions(+), 4 deletions(-)
> >
> >diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
> >index 232117b43c..a9d880e557 100644
> >--- a/arch/arm/mach-aspeed/ast2500/Kconfig
> >+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
> >@@ -33,6 +33,12 @@ config DRAM_UART_TO_UART1
> >       help
> >         Route debug UART to TXD1/RXD1 pins.
> >
> >+config FIRMWARE_DISABLE_2ND_BOOT
> >+      bool
> >+      prompt "Do not disable WDT2 for 2nd boot function"
> >+      help
> >+        Do not disable WDT2 for 2nd boot function.
>
> This seems a bit confusing -- for one thing, the config symbol name and
> the prompt/help text sound like opposites (one says "disable", the
> others say "do not disable").  A slightly more detailed explanation
> might be good.

+1, can you explain why you renamed the option when adding it to kconfig?

>
> >+
> > source "board/aspeed/evb_ast2500/Kconfig"
> > source "board/ibm/genesis3/Kconfig"
> >
> >diff --git a/arch/arm/mach-aspeed/ast2500/platform.S b/arch/arm/mach-aspeed/ast2500/platform.S
> >index aef55c4a0a..3eb9ee9419 100644
> >--- a/arch/arm/mach-aspeed/ast2500/platform.S
> >+++ b/arch/arm/mach-aspeed/ast2500/platform.S
> >@@ -95,7 +95,7 @@
> >  *    CONFIG_DDR3_8GSTACK         // DDR3 8Gbit Stack die
> >  *    CONFIG_DDR4_4GX8            // DDR4 4Gbit X8 dual part
> >  * 5. Firmware 2nd boot flash
> >- *    CONFIG_FIRMWARE_2ND_BOOT (Removed)
> >+ *    CONFIG_FIRMWARE_DISABLE_2ND_BOOT
> >  * 6. Enable DRAM extended temperature range mode
> >  *    CONFIG_DRAM_EXT_TEMP
> >  * 7. Select WDT_Full mode for power up initial reset
> >@@ -642,13 +642,11 @@ bypass_USB_init:
> > /******************************************************************************
> >  Disable WDT2 for 2nd boot function
> >  ******************************************************************************/
> >-/*
> >-#ifndef CONFIG_FIRMWARE_2ND_BOOT
> >+#if CONFIG_FIRMWARE_DISABLE_2ND_BOOT
> >     ldr   r0, =0x1e78502c
> >     mov   r1, #0
> >     str   r1, [r0]
> > #endif
> >-*/
> > /******************************************************************************
> >  Disable WDT3 for SPI Address mode (3 or 4 bytes) detection function
> >  ******************************************************************************/
> >--
> >2.35.1
> >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board
  2022-04-21  5:52 ` Joel Stanley
@ 2022-04-21  8:34   ` Patrick Rudolph
  0 siblings, 0 replies; 11+ messages in thread
From: Patrick Rudolph @ 2022-04-21  8:34 UTC (permalink / raw)
  To: Joel Stanley; +Cc: Christian Walter, openbmc, Todd Takken, zweiss

Hi,
Thanks for the feedback. I fixed the DTS issues and dropped the mainboard stub.

Regards,
Patrick Rudolph
B.Sc. Electrical Engineering
System Firmware Developer

9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email: patrick.rudolph@9elements.com
Phone:  +49 234 68 94 188

Sitz der Gesellschaft: Bochum
Handelsregister: Amtsgericht Bochum, HRB 17519
Geschäftsführung: Sebastian Deutsch, Eray Basar

Datenschutzhinweise nach Art. 13 DSGVO


On Thu, Apr 21, 2022 at 7:52 AM Joel Stanley <joel@jms.id.au> wrote:
>
> On Wed, 20 Apr 2022 at 10:25, Patrick Rudolph
> <patrick.rudolph@9elements.com> wrote:
> >
> > Add IBM Genesis3 board and devicetree source file.
> >
> > Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> > ---
> >  arch/arm/dts/Makefile                |  1 +
> >  arch/arm/dts/ibm-genesis3.dts        | 83 ++++++++++++++++++++++++++++
> >  arch/arm/mach-aspeed/ast2500/Kconfig | 11 ++++
> >  board/ibm/genesis3/Kconfig           | 13 +++++
> >  board/ibm/genesis3/Makefile          |  1 +
> >  board/ibm/genesis3/ibm_genesis3.c    |  5 ++
> >  include/configs/ibm_genesis3.h       | 19 +++++++
> >  7 files changed, 133 insertions(+)
> >  create mode 100644 arch/arm/dts/ibm-genesis3.dts
> >  create mode 100644 board/ibm/genesis3/Kconfig
> >  create mode 100644 board/ibm/genesis3/Makefile
> >  create mode 100644 board/ibm/genesis3/ibm_genesis3.c
> >  create mode 100644 include/configs/ibm_genesis3.h
> >
> > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > index a79f885f54..fae23e6bc1 100755
> > --- a/arch/arm/dts/Makefile
> > +++ b/arch/arm/dts/Makefile
> > @@ -677,6 +677,7 @@ dtb-$(CONFIG_ARCH_BCM6858) += \
> >  dtb-$(CONFIG_ARCH_ASPEED) += \
> >         ast2400-evb.dtb \
> >         ast2500-evb.dtb \
> > +       ibm-genesis3.dtb \
> >         ast2600a0-evb.dtb \
> >         ast2600a1-evb.dtb \
> >         ast2600-bletchley.dtb \
> > diff --git a/arch/arm/dts/ibm-genesis3.dts b/arch/arm/dts/ibm-genesis3.dts
> > new file mode 100644
> > index 0000000000..ba610c9032
> > --- /dev/null
> > +++ b/arch/arm/dts/ibm-genesis3.dts
> > @@ -0,0 +1,83 @@
> > +/dts-v1/;
> > +
> > +#include "ast2500-u-boot.dtsi"
> > +
> > +/ {
> > +        model = "IBM Genesis3";
> > +        compatible = "ibm,genesis3", "aspeed,ast2500";
> > +
> > +       memory {
> > +               device_type = "memory";
> > +               reg = <0x80000000 0x20000000>;
> > +       };
> > +
> > +       chosen {
> > +               stdout-path = &uart5;
> > +       };
> > +
> > +       aliases {
> > +               spi0 = &fmc;
> > +               ethernet0 = &mac0;
> > +               ethernet1 = &mac1;
> > +       };
> > +};
> > +
> > +&uart5 {
> > +       u-boot,dm-pre-reloc;
> > +       status = "okay";
> > +};
> > +
> > +&sdrammc {
> > +       clock-frequency = <400000000>;
> > +};
> > +
> > +&wdt1 {
> > +       u-boot,dm-pre-reloc;
> > +       status = "okay";
> > +};
> > +
> > +&wdt2 {
> > +       u-boot,dm-pre-reloc;
> > +       status = "okay";
> > +};
> > +
> > +&wdt3 {
> > +       u-boot,dm-pre-reloc;
> > +       status = "okay";
> > +};
> > +
> > +&mac0 {
> > +       status = "okay";
> > +       phy-mode = "rgmii";
> > +
> > +       pinctrl-names = "default";
> > +       pinctrl-0 = <&pinctrl_mac1link_default &pinctrl_mdio1_default>;
> > +};
> > +
> > +&mac1 {
> > +       status = "okay";
> > +       phy-mode = "rgmii";
> > +       pinctrl-names = "default";
> > +       pinctrl-0 = <&pinctrl_mac2link_default &pinctrl_mdio2_default>;
> > +};
> > +
> > +&fmc {
> > +       status = "okay";
> > +       timing-calibration-disabled;
> > +       flash@0 {
> > +               compatible = "spi-flash", "spansion,s25fl256l";
> > +               status = "okay";
> > +               spi-max-frequency = <50000000>;
> > +               spi-tx-bus-width = <2>;
> > +               spi-rx-bus-width = <2>;
> > +       };
> > +
> > +       flash@1 {
> > +                compatible = "spi-flash", "spansion,s25fl256l";
> > +                status = "okay";
> > +                spi-max-frequency = <50000000>;
> > +                spi-tx-bus-width = <2>;
> > +                spi-rx-bus-width = <2>;
> > +        };
> > +};
> > +
> > diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
> > index 4f992f442d..81c4fd0c2f 100644
> > --- a/arch/arm/mach-aspeed/ast2500/Kconfig
> > +++ b/arch/arm/mach-aspeed/ast2500/Kconfig
> > @@ -15,8 +15,19 @@ config TARGET_EVB_AST2500
> >           It has 512M of RAM, 32M of SPI flash, two Ethernet ports,
> >           4 Serial ports, 4 USB ports, VGA port, PCIe, SD card slot,
> >           20 pin JTAG, pinouts for 14 I2Cs, 3 SPIs and eSPI, 8 PWMs.
> > +
> > +config TARGET_IBM_GENESIS3
> > +       bool "IBM-Genesis3"
> > +       help
> > +         IBM Genesis3 is an IBM evaluation board for Intel Xeon
> > +         and AST2500 BMC. It has 512M of RAM, 32M of SPI flash,
> > +         two Ethernet ports, 1 debug uart, 1 USB ports and 1 PCIe
> > +         port connected to the PCH.
> > +         It has support for JTAG, pinouts for 9 I2Cs and eSPI.
>
> Given this is another aspeed system, would it make sense to group it
> the same way we've grouped the existing boards under an "aspeed"
> prefix? (The rainier system is an IBM system, FWIW).
>
> The board file looks to be similar enough to the existing evb-ast2500.
> Can you make a case for maintaining another one, or should we re-use
> what's there like the other platforms have done?
>
> > +
> >  endchoice
> >
> >  source "board/aspeed/evb_ast2500/Kconfig"
> > +source "board/ibm/genesis3/Kconfig"
> >
> >  endif
> > diff --git a/board/ibm/genesis3/Kconfig b/board/ibm/genesis3/Kconfig
> > new file mode 100644
> > index 0000000000..09fe60262b
> > --- /dev/null
> > +++ b/board/ibm/genesis3/Kconfig
> > @@ -0,0 +1,13 @@
> > +if TARGET_IBM_GENESIS3
> > +
> > +config SYS_BOARD
> > +       default "genesis3"
> > +
> > +config SYS_VENDOR
> > +       default "ibm"
> > +
> > +config SYS_CONFIG_NAME
> > +       string "board configuration name"
> > +       default "ibm_genesis3"
> > +
> > +endif
> > diff --git a/board/ibm/genesis3/Makefile b/board/ibm/genesis3/Makefile
> > new file mode 100644
> > index 0000000000..2bb8917fab
> > --- /dev/null
> > +++ b/board/ibm/genesis3/Makefile
> > @@ -0,0 +1 @@
> > +obj-y += ibm_genesis3.o
> > diff --git a/board/ibm/genesis3/ibm_genesis3.c b/board/ibm/genesis3/ibm_genesis3.c
> > new file mode 100644
> > index 0000000000..9de8531806
> > --- /dev/null
> > +++ b/board/ibm/genesis3/ibm_genesis3.c
> > @@ -0,0 +1,5 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * Copyright (c) 2022 9elements GmbH
> > + */
> > +#include <common.h>
> > diff --git a/include/configs/ibm_genesis3.h b/include/configs/ibm_genesis3.h
> > new file mode 100644
> > index 0000000000..f40aeed8a9
> > --- /dev/null
> > +++ b/include/configs/ibm_genesis3.h
> > @@ -0,0 +1,19 @@
> > +/* SPDX-License-Identifier: GPL-2.0+ */
> > +/*
> > + * Copyright 2022 9elements GmbH.
> > + */
> > +
> > +#ifndef __CONFIG_H
> > +#define __CONFIG_H
> > +
> > +#include <configs/aspeed-common.h>
> > +
> > +#define CONFIG_SYS_MEMTEST_START       (CONFIG_SYS_SDRAM_BASE + 0x300000)
> > +#define CONFIG_SYS_MEMTEST_END         (CONFIG_SYS_MEMTEST_START + 0x5000000)
> > +
> > +#define CONFIG_SYS_UBOOT_BASE          CONFIG_SYS_TEXT_BASE
> > +
> > +/* Memory Info */
> > +#define CONFIG_SYS_LOAD_ADDR           0x83000000
> > +
> > +#endif /* __CONFIG_H */
> > --
> > 2.35.1
> >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 3/4] arm/mach-aspeed: Allow to disable WDT2
  2022-04-21  5:54     ` Joel Stanley
@ 2022-04-21  8:39       ` Patrick Rudolph
  0 siblings, 0 replies; 11+ messages in thread
From: Patrick Rudolph @ 2022-04-21  8:39 UTC (permalink / raw)
  To: Joel Stanley; +Cc: christian.walter, openbmc, Lei Yu, takken, Zev Weiss

Hi,
I enabled the DCACHE which seems to make it boot a bit faster.
As this is a evaluation platform and the successor is not using AST2500 any more
so no further investigation had been done.

I've reworked the description and removed the double negation.

Regards,
Patrick Rudolph
B.Sc. Electrical Engineering
System Firmware Developer

9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email: patrick.rudolph@9elements.com
Phone:  +49 234 68 94 188

Sitz der Gesellschaft: Bochum
Handelsregister: Amtsgericht Bochum, HRB 17519
Geschäftsführung: Sebastian Deutsch, Eray Basar

Datenschutzhinweise nach Art. 13 DSGVO

On Thu, Apr 21, 2022 at 7:55 AM Joel Stanley <joel@jms.id.au> wrote:
>
> On Thu, 21 Apr 2022 at 05:42, Zev Weiss <zweiss@equinix.com> wrote:
> >
> > On Wed, Apr 20, 2022 at 03:25:01AM PDT, Patrick Rudolph wrote:
> > >There's no working code to poke the WDT2 and it takes too long for the
> > >kernel to load to poke the watchdog. Selecting this Kconfig disables
> > >the WDT2 and prevents 2nd firmware from being launched during normal boot.
> > >
> >
> > I seem to recall Lei Yu (CCed) hitting problems with watchdog timeouts a
> > little while back, which I think ended up being due to caches being
> > disabled for some reason...have you done any measurements to try to
> > determine what's causing it to take so long?
>
> Yes. Some work is required in this area:
>
>  - re-enable the dcache for the 2500. It works fine, and speeds up boot.
>
>  - pat the watchdog so it doesn't expire when loading, or sitting at
> the command prompt
>
> An alternative is to disable the watchdog as we've done here. I'd lean
> towards leaving it running (as then if there's a hang, the system will
> reobot and try again).
>
> >
> > >Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> > >---
> > > arch/arm/mach-aspeed/ast2500/Kconfig    | 6 ++++++
> > > arch/arm/mach-aspeed/ast2500/platform.S | 6 ++----
> > > 2 files changed, 8 insertions(+), 4 deletions(-)
> > >
> > >diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
> > >index 232117b43c..a9d880e557 100644
> > >--- a/arch/arm/mach-aspeed/ast2500/Kconfig
> > >+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
> > >@@ -33,6 +33,12 @@ config DRAM_UART_TO_UART1
> > >       help
> > >         Route debug UART to TXD1/RXD1 pins.
> > >
> > >+config FIRMWARE_DISABLE_2ND_BOOT
> > >+      bool
> > >+      prompt "Do not disable WDT2 for 2nd boot function"
> > >+      help
> > >+        Do not disable WDT2 for 2nd boot function.
> >
> > This seems a bit confusing -- for one thing, the config symbol name and
> > the prompt/help text sound like opposites (one says "disable", the
> > others say "do not disable").  A slightly more detailed explanation
> > might be good.
>
> +1, can you explain why you renamed the option when adding it to kconfig?
>
> >
> > >+
> > > source "board/aspeed/evb_ast2500/Kconfig"
> > > source "board/ibm/genesis3/Kconfig"
> > >
> > >diff --git a/arch/arm/mach-aspeed/ast2500/platform.S b/arch/arm/mach-aspeed/ast2500/platform.S
> > >index aef55c4a0a..3eb9ee9419 100644
> > >--- a/arch/arm/mach-aspeed/ast2500/platform.S
> > >+++ b/arch/arm/mach-aspeed/ast2500/platform.S
> > >@@ -95,7 +95,7 @@
> > >  *    CONFIG_DDR3_8GSTACK         // DDR3 8Gbit Stack die
> > >  *    CONFIG_DDR4_4GX8            // DDR4 4Gbit X8 dual part
> > >  * 5. Firmware 2nd boot flash
> > >- *    CONFIG_FIRMWARE_2ND_BOOT (Removed)
> > >+ *    CONFIG_FIRMWARE_DISABLE_2ND_BOOT
> > >  * 6. Enable DRAM extended temperature range mode
> > >  *    CONFIG_DRAM_EXT_TEMP
> > >  * 7. Select WDT_Full mode for power up initial reset
> > >@@ -642,13 +642,11 @@ bypass_USB_init:
> > > /******************************************************************************
> > >  Disable WDT2 for 2nd boot function
> > >  ******************************************************************************/
> > >-/*
> > >-#ifndef CONFIG_FIRMWARE_2ND_BOOT
> > >+#if CONFIG_FIRMWARE_DISABLE_2ND_BOOT
> > >     ldr   r0, =0x1e78502c
> > >     mov   r1, #0
> > >     str   r1, [r0]
> > > #endif
> > >-*/
> > > /******************************************************************************
> > >  Disable WDT3 for SPI Address mode (3 or 4 bytes) detection function
> > >  ******************************************************************************/
> > >--
> > >2.35.1
> > >

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-04-26  2:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 10:24 [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1 Patrick Rudolph
2022-04-21  5:42   ` Zev Weiss
2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 3/4] arm/mach-aspeed: Allow to disable WDT2 Patrick Rudolph
2022-04-21  5:42   ` Zev Weiss
2022-04-21  5:54     ` Joel Stanley
2022-04-21  8:39       ` Patrick Rudolph
2022-04-20 10:25 ` [PATCH u-boot v2019.04-aspeed-openbmc 4/4] configs: Add IBM Genesis3 defconfig Patrick Rudolph
2022-04-21  5:41 ` [PATCH u-boot v2019.04-aspeed-openbmc 1/4] arm/dts: Add Genesis3 board Zev Weiss
2022-04-21  5:52 ` Joel Stanley
2022-04-21  8:34   ` Patrick Rudolph

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.