All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH u-boot v2019.04-aspeed-openbmc v2 0/4] Add support for IBM Genesis3
@ 2022-04-21  8:31 Patrick Rudolph
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Patrick Rudolph @ 2022-04-21  8:31 UTC (permalink / raw)
  To: joel, openbmc, zweiss; +Cc: christian.walter, takken, Patrick Rudolph

v2:
  - Fix whitespace and compatible in DTS
  - Remove board stub
  - Improve commit message
  - Rewrite FIRMWARE_2ND_BOOT support
  - Update defconfig

Patrick Rudolph (4):
  arm/dts: Add Genesis3 board
  arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1
  arm/mach-aspeed: Allow to disable WDT2
  configs: Add IBM Genesis3 defconfig

 arch/arm/dts/Makefile                   |  1 +
 arch/arm/dts/ibm-genesis3.dts           | 83 +++++++++++++++++++++++++
 arch/arm/mach-aspeed/ast2500/Kconfig    | 16 +++++
 arch/arm/mach-aspeed/ast2500/platform.S |  6 +-
 configs/ibm_genesis3_defconfig          | 73 ++++++++++++++++++++++
 5 files changed, 175 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/dts/ibm-genesis3.dts
 create mode 100644 configs/ibm_genesis3_defconfig

-- 
2.35.1


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

* [PATCH u-boot v2019.04-aspeed-openbmc v2 1/4] arm/dts: Add Genesis3 board
  2022-04-21  8:31 [PATCH u-boot v2019.04-aspeed-openbmc v2 0/4] Add support for IBM Genesis3 Patrick Rudolph
@ 2022-04-21  8:31 ` Patrick Rudolph
  2022-05-11  7:29   ` Joel Stanley
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1 Patrick Rudolph
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Patrick Rudolph @ 2022-04-21  8:31 UTC (permalink / raw)
  To: joel, openbmc, zweiss; +Cc: christian.walter, takken, Patrick Rudolph

Add devicetree source file. It uses the evb-ast2500 board files.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
 arch/arm/dts/Makefile         |  1 +
 arch/arm/dts/ibm-genesis3.dts | 83 +++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 arch/arm/dts/ibm-genesis3.dts

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..c808fd27c4
--- /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-bmc", "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>;
+	};
+};
+
-- 
2.35.1


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

* [PATCH u-boot v2019.04-aspeed-openbmc v2 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1
  2022-04-21  8:31 [PATCH u-boot v2019.04-aspeed-openbmc v2 0/4] Add support for IBM Genesis3 Patrick Rudolph
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
@ 2022-04-21  8:31 ` Patrick Rudolph
  2022-05-11  7:30   ` Joel Stanley
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 3/4] arm/mach-aspeed: Allow to disable WDT2 Patrick Rudolph
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 4/4] configs: Add IBM Genesis3 defconfig Patrick Rudolph
  3 siblings, 1 reply; 9+ messages in thread
From: Patrick Rudolph @ 2022-04-21  8:31 UTC (permalink / raw)
  To: joel, openbmc, zweiss; +Cc: christian.walter, takken, Patrick Rudolph

Update 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.

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 4f992f442d..e7ff00cdba 100644
--- a/arch/arm/mach-aspeed/ast2500/Kconfig
+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
@@ -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
-- 
2.35.1


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

* [PATCH u-boot v2019.04-aspeed-openbmc v2 3/4] arm/mach-aspeed: Allow to disable WDT2
  2022-04-21  8:31 [PATCH u-boot v2019.04-aspeed-openbmc v2 0/4] Add support for IBM Genesis3 Patrick Rudolph
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1 Patrick Rudolph
@ 2022-04-21  8:31 ` Patrick Rudolph
  2022-05-11  7:48   ` Joel Stanley
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 4/4] configs: Add IBM Genesis3 defconfig Patrick Rudolph
  3 siblings, 1 reply; 9+ messages in thread
From: Patrick Rudolph @ 2022-04-21  8:31 UTC (permalink / raw)
  To: joel, openbmc, zweiss; +Cc: christian.walter, takken, Patrick Rudolph

The IBM Genesis3 supports booting from second flash using WDT2, but
there's no working code to poke the WDT2 and it takes too long for the
kernel to load to poke the watchdog.

As it's an evaluation platform disable this feature for now.
Unselecting this Kconfig disables the WDT2 in early platform code 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    | 10 ++++++++++
 arch/arm/mach-aspeed/ast2500/platform.S |  6 ++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
index e7ff00cdba..1882d6186e 100644
--- a/arch/arm/mach-aspeed/ast2500/Kconfig
+++ b/arch/arm/mach-aspeed/ast2500/Kconfig
@@ -23,6 +23,16 @@ config DRAM_UART_TO_UART1
 	help
 	  Route debug UART to TXD1/RXD1 pins.
 
+config FIRMWARE_2ND_BOOT
+	bool
+	default y
+	prompt "Keep WDT2 running to support the firmware 2nd boot"
+	help
+	  Saying yes here let the WDT2 running (if configured by
+	  hw straps) and allows the platform to boot from 2nd
+	  SPI flash if WDT2 isn't poked withing 22 seconds.
+	  Saying no disables the WDT2 in early platform initialisation.
+
 source "board/aspeed/evb_ast2500/Kconfig"
 
 endif
diff --git a/arch/arm/mach-aspeed/ast2500/platform.S b/arch/arm/mach-aspeed/ast2500/platform.S
index aef55c4a0a..a3961bc4f8 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_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 !defined(CONFIG_FIRMWARE_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] 9+ messages in thread

* [PATCH u-boot v2019.04-aspeed-openbmc v2 4/4] configs: Add IBM Genesis3 defconfig
  2022-04-21  8:31 [PATCH u-boot v2019.04-aspeed-openbmc v2 0/4] Add support for IBM Genesis3 Patrick Rudolph
                   ` (2 preceding siblings ...)
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 3/4] arm/mach-aspeed: Allow to disable WDT2 Patrick Rudolph
@ 2022-04-21  8:31 ` Patrick Rudolph
  2022-05-11  7:49   ` Joel Stanley
  3 siblings, 1 reply; 9+ messages in thread
From: Patrick Rudolph @ 2022-04-21  8:31 UTC (permalink / raw)
  To: joel, openbmc, zweiss; +Cc: christian.walter, takken, Patrick Rudolph

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
 configs/ibm_genesis3_defconfig | 73 ++++++++++++++++++++++++++++++++++
 1 file changed, 73 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..76a3673991
--- /dev/null
+++ b/configs/ibm_genesis3_defconfig
@@ -0,0 +1,73 @@
+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_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=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_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_EFI_LOADER is not set
+CONFIG_DRAM_UART_TO_UART1=y
+# CONFIG_FIRMWARE_2ND_BOOT is not set
-- 
2.35.1


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

* Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 1/4] arm/dts: Add Genesis3 board
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
@ 2022-05-11  7:29   ` Joel Stanley
  0 siblings, 0 replies; 9+ messages in thread
From: Joel Stanley @ 2022-05-11  7:29 UTC (permalink / raw)
  To: Patrick Rudolph; +Cc: christian.walter, OpenBMC Maillist, takken, Zev Weiss

On Thu, 21 Apr 2022 at 08:32, Patrick Rudolph
<patrick.rudolph@9elements.com> wrote:
>
> Add devicetree source file. It uses the evb-ast2500 board files.
>
> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> ---
>  arch/arm/dts/Makefile         |  1 +
>  arch/arm/dts/ibm-genesis3.dts | 83 +++++++++++++++++++++++++++++++++++
>  2 files changed, 84 insertions(+)
>  create mode 100644 arch/arm/dts/ibm-genesis3.dts
>
> 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 \

The rest of the boards are named ast2x00-<machinename>.

Your dts would be ast2500-genesis3.dtb

Going back to the v1, I see that both Zev and I made the same comment.
If you have a reason to not do this, please say so.

>         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..c808fd27c4
> --- /dev/null
> +++ b/arch/arm/dts/ibm-genesis3.dts
> @@ -0,0 +1,83 @@
> +/dts-v1/;

Add a copyright statement.



> +
> +#include "ast2500-u-boot.dtsi"
> +
> +/ {
> +       model = "IBM Genesis3";
> +       compatible = "ibm,genesis3-bmc", "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>;
> +       };
> +};

This is an exact copy of the ast2500-evb up until this point.

Consider following Zev's example for the board he's adding, by
including the dts and overriding/disabling things as required.

> +
> --
> 2.35.1
>

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

* Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1 Patrick Rudolph
@ 2022-05-11  7:30   ` Joel Stanley
  0 siblings, 0 replies; 9+ messages in thread
From: Joel Stanley @ 2022-05-11  7:30 UTC (permalink / raw)
  To: Patrick Rudolph; +Cc: christian.walter, OpenBMC Maillist, takken, Zev Weiss

On Thu, 21 Apr 2022 at 08:32, Patrick Rudolph
<patrick.rudolph@9elements.com> wrote:
>
> Update 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.
>
> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>

Reviewed-by: Joel Stanley <joel@jms.id.au>

> ---
>  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 4f992f442d..e7ff00cdba 100644
> --- a/arch/arm/mach-aspeed/ast2500/Kconfig
> +++ b/arch/arm/mach-aspeed/ast2500/Kconfig
> @@ -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
> --
> 2.35.1
>

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

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

On Thu, 21 Apr 2022 at 08:32, Patrick Rudolph
<patrick.rudolph@9elements.com> wrote:
>
> The IBM Genesis3 supports booting from second flash using WDT2, but
> there's no working code to poke the WDT2 and it takes too long for the
> kernel to load to poke the watchdog.
>
> As it's an evaluation platform disable this feature for now.
> Unselecting this Kconfig disables the WDT2 in early platform code and
> prevents 2nd firmware from being launched during normal boot.

There's a lot of negatives here. We're disabling code that disables
the watchdog that is enabled/disabled by the strapping.

Your patch is un-commenting the code that disables the watchdog.

It's then adding a Kconfig symbol to enable this code, but the Kconfig
is inverted: it defaults to true and disables the code.

I think we could make it simpler: make the Kconfig like a normal
kconfig that defaults to n. This is what you did in v1. Re-reading
that email both Zev and I asked for an explanation to justify why
there was the double negative. I think explaining what is going on as
we suggested is a better outcome than your v2.

As I said in that mail, the u-boot tree would be better off adding
code to pat the watchdog. This would solve your problem, and the
problem that others have had.

>
> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> ---
>  arch/arm/mach-aspeed/ast2500/Kconfig    | 10 ++++++++++
>  arch/arm/mach-aspeed/ast2500/platform.S |  6 ++----
>  2 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-aspeed/ast2500/Kconfig b/arch/arm/mach-aspeed/ast2500/Kconfig
> index e7ff00cdba..1882d6186e 100644
> --- a/arch/arm/mach-aspeed/ast2500/Kconfig
> +++ b/arch/arm/mach-aspeed/ast2500/Kconfig
> @@ -23,6 +23,16 @@ config DRAM_UART_TO_UART1
>         help
>           Route debug UART to TXD1/RXD1 pins.
>
> +config FIRMWARE_2ND_BOOT
> +       bool
> +       default y
> +       prompt "Keep WDT2 running to support the firmware 2nd boot"
> +       help
> +         Saying yes here let the WDT2 running (if configured by
> +         hw straps) and allows the platform to boot from 2nd
> +         SPI flash if WDT2 isn't poked withing 22 seconds.
> +         Saying no disables the WDT2 in early platform initialisation.
> +
>  source "board/aspeed/evb_ast2500/Kconfig"
>
>  endif
> diff --git a/arch/arm/mach-aspeed/ast2500/platform.S b/arch/arm/mach-aspeed/ast2500/platform.S
> index aef55c4a0a..a3961bc4f8 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_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 !defined(CONFIG_FIRMWARE_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] 9+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 4/4] configs: Add IBM Genesis3 defconfig
  2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 4/4] configs: Add IBM Genesis3 defconfig Patrick Rudolph
@ 2022-05-11  7:49   ` Joel Stanley
  0 siblings, 0 replies; 9+ messages in thread
From: Joel Stanley @ 2022-05-11  7:49 UTC (permalink / raw)
  To: Patrick Rudolph; +Cc: christian.walter, OpenBMC Maillist, takken, Zev Weiss

On Thu, 21 Apr 2022 at 08:32, Patrick Rudolph
<patrick.rudolph@9elements.com> wrote:
>

This would be where you put some words to justify the configuration
you have added for the board, instead of using an existing one.


> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> ---
>  configs/ibm_genesis3_defconfig | 73 ++++++++++++++++++++++++++++++++++
>  1 file changed, 73 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..76a3673991
> --- /dev/null
> +++ b/configs/ibm_genesis3_defconfig
> @@ -0,0 +1,73 @@
> +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_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=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_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_EFI_LOADER is not set
> +CONFIG_DRAM_UART_TO_UART1=y
> +# CONFIG_FIRMWARE_2ND_BOOT is not set
> --
> 2.35.1
>

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

end of thread, other threads:[~2022-05-11  7:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21  8:31 [PATCH u-boot v2019.04-aspeed-openbmc v2 0/4] Add support for IBM Genesis3 Patrick Rudolph
2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 1/4] arm/dts: Add Genesis3 board Patrick Rudolph
2022-05-11  7:29   ` Joel Stanley
2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 2/4] arm/mach-aspeed: Add support for CONFIG_DRAM_UART_TO_UART1 Patrick Rudolph
2022-05-11  7:30   ` Joel Stanley
2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 3/4] arm/mach-aspeed: Allow to disable WDT2 Patrick Rudolph
2022-05-11  7:48   ` Joel Stanley
2022-04-21  8:31 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 4/4] configs: Add IBM Genesis3 defconfig Patrick Rudolph
2022-05-11  7:49   ` Joel Stanley

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.