Skip to contentSkip to conversation

Add support for IBM Genesis3

PATCH RESEND Superseded Patrick Rudolph 2 participants 10 messages Jun 30, 2022 – Aug 15, 2022

Subsystems (3)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 cover Add support for IBM Genesis3

v5:
- Rename Kconfig and don't depend on ASPEED_ALLOW_DANGEROUS_BACKDOORS

v4:
- Rebase on upstream
- Drop defconfig and add it on openbmc instead
- Rename Kconfig for debug uart

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 (2):
arm/dts: Add IBM Genesis3 board
arm/mach-aspeed: Add support for CONFIG_ASPEED_ROUTE_UART5_TO_UART1

 arch/arm/dts/Makefile                   |  1 +
 arch/arm/dts/ast2500-genesis3.dts       | 28 +++++++++++++++++++++++++
 arch/arm/mach-aspeed/Kconfig            |  6 ++++++
 arch/arm/mach-aspeed/ast2500/platform.S |  2 +-
 4 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/ast2500-genesis3.dts
Signature · 1 line
2.35.3
#1 lore raw

PATCH RESEND v5 1/2 arm/dts: Add IBM Genesis3 board

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

---
 arch/arm/dts/Makefile             |  1 +
 arch/arm/dts/ast2500-genesis3.dts | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 arch/arm/dts/ast2500-genesis3.dts
arch/arm/dts/Makefile +1 -0
index 3515100c65..ed9714d832 100755
@@ -678,6 +678,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	ast2400-evb.dtb \
 	ast2400-ahe-50dc.dtb \
 	ast2500-evb.dtb \
+	ast2500-genesis3.dtb \
 	ast2600a0-evb.dtb \
 	ast2600a1-evb.dtb \
 	ast2600-bletchley.dtb \
arch/arm/dts/ast2500-genesis3.dts new file +28 -0
new file mode 100644
index 0000000000..544758c5b8
@@ -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 = "spansion,s25fl256l", "spi-flash";
+	};
+
+	flash@1 {
+		compatible = "spansion,s25fl256l", "spi-flash";
+	};
+};
+
Signature · 1 line
2.35.3
#2 lore raw

Re: [RESEND][PATCH u-boot v2019.04-aspeed-openbmc v5 1/2] arm/dts: Add IBM Genesis3 board

Quoted 46 lines · Patrick Rudolph

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

---
 arch/arm/dts/Makefile             |  1 +
 arch/arm/dts/ast2500-genesis3.dts | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 arch/arm/dts/ast2500-genesis3.dts
arch/arm/dts/Makefile +1 -0
index 3515100c65..ed9714d832 100755
@@ -678,6 +678,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	ast2400-evb.dtb \
 	ast2400-ahe-50dc.dtb \
 	ast2500-evb.dtb \
+	ast2500-genesis3.dtb \
 	ast2600a0-evb.dtb \
 	ast2600a1-evb.dtb \
 	ast2600-bletchley.dtb \
arch/arm/dts/ast2500-genesis3.dts new file +17 -0
new file mode 100644
index 0000000000..544758c5b8
@@ -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";
+};

arch/arm/dts/ast2500-genesis3.dts line 27

Quoted 10 lines
arch/arm/dts/ast2500-genesis3.dts new file +10 -0
+
+&fmc {
+	flash@0 {
+		compatible = "spansion,s25fl256l", "spi-flash";
+	};
+
+	flash@1 {
+		compatible = "spansion,s25fl256l", "spi-flash";
+	};
+};

So looking at ast2500-evb.dts, you still have both the SD card slots, both MACs (in RGMII mode) and i2c{3,7} enabled. Is this intended?

Andrew

#3 lore raw

Re: [RESEND][PATCH u-boot v2019.04-aspeed-openbmc v5 1/2] arm/dts: Add IBM Genesis3 board

There's no SD card slot, there are two MACs in RGMII mode and nothing that's required to boot on i2c bus.
In the defconfig used I disabled SD card and I2C support, so this is not an issue.
Should I still disable it in the devicetree, just for reference?

Regards,
Patrick Rudolph

Quoted 65 lines · Andrew Jeffery
Quoted 46 lines · Patrick Rudolph

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

---
 arch/arm/dts/Makefile             |  1 +
 arch/arm/dts/ast2500-genesis3.dts | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 arch/arm/dts/ast2500-genesis3.dts
arch/arm/dts/Makefile +1 -0
index 3515100c65..ed9714d832 100755
@@ -678,6 +678,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
      ast2400-evb.dtb \
      ast2400-ahe-50dc.dtb \
      ast2500-evb.dtb \
+     ast2500-genesis3.dtb \
      ast2600a0-evb.dtb \
      ast2600a1-evb.dtb \
      ast2600-bletchley.dtb \
arch/arm/dts/ast2500-genesis3.dts new file +17 -0
new file mode 100644
index 0000000000..544758c5b8
@@ -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";
+};

arch/arm/dts/ast2500-genesis3.dts line 27

Quoted 10 lines
arch/arm/dts/ast2500-genesis3.dts new file +10 -0
+
+&fmc {
+     flash@0 {
+             compatible = "spansion,s25fl256l", "spi-flash";
+     };
+
+     flash@1 {
+             compatible = "spansion,s25fl256l", "spi-flash";
+     };
+};

So looking at ast2500-evb.dts, you still have both the SD card slots, both MACs (in RGMII mode) and i2c{3,7} enabled. Is this intended?

Andrew

#4 lore raw

Re: [RESEND][PATCH u-boot v2019.04-aspeed-openbmc v5 1/2] arm/dts: Add IBM Genesis3 board

Quoted 5 lines · Patrick Rudolph

There's no SD card slot, there are two MACs in RGMII mode and nothing that's required to boot on i2c bus.
In the defconfig used I disabled SD card and I2C support, so this is not an issue.
Should I still disable it in the devicetree, just for reference?

It's at least more idiomatic to #include "ast2500.dtsi" and then enable the controllers you require, rather than #including the dts for a board not entirely related to the design you're bringing up.

That would be my preference. Is the result much more verbose? It feels like it shouldn't be if you only need networking and SPI flash.

Andrew

#5 lore raw

Re: [RESEND][PATCH u-boot v2019.04-aspeed-openbmc v5 1/2] arm/dts: Add IBM Genesis3 board

Hi Andrew,
the first and second version of this patch were including ast2500.dtsi and enabled the devices.
Joel and Zev recommended including the EVB dts to have less copy&paste code.

Please advise how to continue. Both versions are working and have been send to the ML.

Regards,
Patrick

Quoted 18 lines · Andrew Jeffery
Quoted 5 lines · Patrick Rudolph

There's no SD card slot, there are two MACs in RGMII mode and nothing that's required to boot on i2c bus.
In the defconfig used I disabled SD card and I2C support, so this is not an issue.
Should I still disable it in the devicetree, just for reference?

It's at least more idiomatic to #include "ast2500.dtsi" and then enable the controllers you require, rather than #including the dts for a board not entirely related to the design you're bringing up.

That would be my preference. Is the result much more verbose? It feels like it shouldn't be if you only need networking and SPI flash.

Andrew

#6 lore raw

Re: [RESEND][PATCH u-boot v2019.04-aspeed-openbmc v5 1/2] arm/dts: Add IBM Genesis3 board

Quoted 4 lines · Patrick Rudolph

Hi Andrew,
the first and second version of this patch were including ast2500.dtsi and enabled the devices.
Joel and Zev recommended including the EVB dts to have less copy&paste code.

Ah okay, maybe I should have tracked down the earlier revisions for context.

I'll defer to Joel as he'll be merging the patches.

Andrew

#7 lore raw

PATCH RESEND v5 2/2 arm/mach-aspeed: Add support for CONFIG_ASPEED_ROUTE_UART5_TO_UART1

In reply to Patrick Rudolph

Introduce CONFIG_ASPEED_ROUTE_UART5_TO_UART1 and reuse existing platform code to route UART5 to UART1.
This is required on IBM/Genesis3 as it uses UART5 as debug uart, but the RXD1/TXD1 pins are connected instead of RXD5/TXD5.

---
 arch/arm/mach-aspeed/Kconfig            | 6 ++++++
 arch/arm/mach-aspeed/ast2500/platform.S | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-aspeed/Kconfig +6 -0
index edb5520aec..50ea261dac 100644
@@ -84,6 +84,12 @@ config ASPEED_ENABLE_DEBUG_UART
 
 endif
 
+config ASPEED_ROUTE_UART5_TO_UART1
+	bool "Route UART5 to UART1 pins"
+	depends on ASPEED_AST2500
+	help
+	  Route debug UART (UART5) to TXD1/RXD1 pins instead of TXD5/RXD5.
+
 config ASPEED_PALLADIUM
 	bool "Aspeed palladium for simulation"
 	default n
arch/arm/mach-aspeed/ast2500/platform.S +1 -1
index aef55c4a0a..fd013e4e6f 100644
@@ -795,7 +795,7 @@ wait_ddr_reset:
     /* end delay 10ms */
 
 /* Debug - UART console message */
-#ifdef CONFIG_DRAM_UART_TO_UART1
+#ifdef CONFIG_ASPEED_ROUTE_UART5_TO_UART1
     ldr   r0, =0x1e78909c                        @ route UART5 to UART Port1, 2016.08.29
     ldr   r1, =0x10000004
     str   r1, [r0]
Signature · 1 line
2.35.3
#8 lore raw

Re: [RESEND][PATCH u-boot v2019.04-aspeed-openbmc v5 2/2] arm/mach-aspeed: Add support for CONFIG_ASPEED_ROUTE_UART5_TO_UART1

Hi Patrick,

Quoted 4 lines · Patrick Rudolph

Introduce CONFIG_ASPEED_ROUTE_UART5_TO_UART1 and reuse existing platform code to route UART5 to UART1.
This is required on IBM/Genesis3 as it uses UART5 as debug uart, but the RXD1/TXD1 pins are connected instead of RXD5/TXD5.

It would be good to clarify the language here. From the patch below you're re-routing the BMC console from UART5 to UART1 because of a design issue. However, the ASPEED BMC SoCs have a separate function known as the "Debug UART" which gives unconstrained access to the BMC's AHB via either UART5 or UART1. The password sequence is sniffed off of RXD{1,5} between the IO port and the UART mux, so muxing the UARTs as you've done isn't enough to enable the feature given the hardware design.

As such I just want to clarify that you do mean just the console and not the debug functionality itself. Further, if this is the case, I'm wondering whether you should enable both the BMC console _and_ the debug UART function on UART1 (see SCU070[29], though this depends on it being enabled at all (SCU02C[10]).

Cheers,

Andrew

#9 lore raw
In reply to Patrick Rudolph

Hi, can you please review this patch series? There was no feedback within the last 6 weeks.

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

9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email: [email protected]
Phone: *+49 234 68 94 188 <+492346894188>*

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

Datenschutzhinweise nach Art. 13 DSGVO <https://9elements.com/privacy>

Quoted 36 lines · Patrick Rudolph

v5:
- Rename Kconfig and don't depend on ASPEED_ALLOW_DANGEROUS_BACKDOORS

v4:
- Rebase on upstream
- Drop defconfig and add it on openbmc instead
- Rename Kconfig for debug uart

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 (2):
arm/dts: Add IBM Genesis3 board
arm/mach-aspeed: Add support for CONFIG_ASPEED_ROUTE_UART5_TO_UART1

 arch/arm/dts/Makefile                   |  1 +
 arch/arm/dts/ast2500-genesis3.dts       | 28 +++++++++++++++++++++++++
 arch/arm/mach-aspeed/Kconfig            |  6 ++++++
 arch/arm/mach-aspeed/ast2500/platform.S |  2 +-
 4 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/ast2500-genesis3.dts

--
2.35.3