Skip to contentSkip to conversation

arm64: aspeed: backport AST2700 platform support

PATCH Applied Vince Chang 2 participants 7 messages Oct 29

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover arm64: aspeed: backport AST2700 platform support

Backport five upstream Linux ASPEED platform commits to OpenBMC dev-6.18 to add AST2700 board bindings, Kconfig, initial device trees and defconfig support, including the follow-up DTS correction for duplicate pinctrl labels and the address scheme.

Ryan Chen (5):
dt-bindings: arm: aspeed: Add AST2700 board compatible
arm64: Kconfig: Add ASPEED SoC family Kconfig support
arm64: dts: aspeed: Add initial AST27xx SoC device tree
arm64: configs: Update defconfig for AST2700 platform support
arm64: dts: aspeed: Fix duplicate pinctrl labels and address scheme

 .../bindings/arm/aspeed/aspeed.yaml           |    6 +
 MAINTAINERS                                   |    1 +
 arch/arm64/Kconfig.platforms                  |    6 +
 arch/arm64/boot/dts/Makefile                  |    1 +
 arch/arm64/boot/dts/aspeed/Makefile           |    4 +
 .../aspeed/aspeed-evb-flash-layout-128.dtsi   |   32 +
 arch/arm64/boot/dts/aspeed/aspeed-g7-a35.dtsi |  194 ++++
 .../dts/aspeed/aspeed-g7-soc0-pinctrl.dtsi    |  225 ++++
 .../arm64/boot/dts/aspeed/aspeed-g7-soc0.dtsi |  230 ++++
 .../dts/aspeed/aspeed-g7-soc1-pinctrl.dtsi    | 1011 +++++++++++++++++
 .../arm64/boot/dts/aspeed/aspeed-g7-soc1.dtsi |  557 +++++++++
 arch/arm64/boot/dts/aspeed/ast2700-evb.dts    |   65 ++
 arch/arm64/configs/defconfig                  |    1 +
 13 files changed, 2333 insertions(+)
 create mode 100644 arch/arm64/boot/dts/aspeed/Makefile
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-evb-flash-layout-128.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-a35.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-soc0-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-soc0.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-soc1-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-soc1.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/ast2700-evb.dts
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/5 dt-bindings: arm: aspeed: Add AST2700 board compatible

From: Ryan Chen <[email protected]>

Add device tree compatible string for AST2700 based boards ("aspeed,ast2700-evb" and "aspeed,ast2700") to the Aspeed SoC board bindings. This allows proper schema validation and enables support for AST2700 platforms.

(cherry picked from commit 34efd73379ff9f36ed598ade7406a1aaddd03d7b)
---
 Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml +6 -0
index 970c53190f27..b7e70868ebd8 100644
@@ -120,4 +120,10 @@ properties:
               - ufispace,ncplite-bmc
           - const: aspeed,ast2600
 
+      - description: AST2700 based boards
+        items:
+          - enum:
+              - aspeed,ast2700-evb
+          - const: aspeed,ast2700
+
 additionalProperties: true
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/5 arm64: Kconfig: Add ASPEED SoC family Kconfig support

In reply to Vince Chang

From: Ryan Chen <[email protected]>

Add support for ASPEED SoC family like ast27XX 8th generation ASPEED BMCs.

(cherry picked from commit df6f379eb4ac78e51d582aa7e8683bf8d5468dfe)
---
 arch/arm64/Kconfig.platforms | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/Kconfig.platforms +6 -0
index 13173795c43d..72cea0fe618a 100644
@@ -47,6 +47,12 @@ config ARCH_ARTPEC
 	help
 	   This enables support for the ARMv8 based ARTPEC SoC Family.
 
+config ARCH_ASPEED
+	bool "Aspeed SoC family"
+	help
+	  This enables support for ASPEED's SoC family, such as the
+	  ast27XX 8th generation Baseboard Management Controller (BMC).
+
 config ARCH_AXIADO
 	bool "Axiado SoC Family"
 	select GPIOLIB
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/5 arm64: dts: aspeed: Add initial AST27xx SoC device tree

In reply to Vince Chang

From: Ryan Chen <[email protected]>

Add initial device tree support for the ASPEED AST27xx family, the 8th-generation Baseboard Management Controller (BMC) SoCs.

AST27xx SOC Family
- https://www.aspeedtech.com/server_ast2700/
- https://www.aspeedtech.com/server_ast2720/
- https://www.aspeedtech.com/server_ast2750/

The AST27xx features a dual-SoC architecture consisting of two dies, referred to as SoC0 and SoC1 - interconnected through an internal proprietary bus. Both SoCs share the same address decoding scheme, while each maintains independent clock and reset domains.

- SoC0 (CPU die): contains a quad-core Cortex-A35 cluster and two Cortex-M4 cores, along with high-speed peripherals.
- SoC1 (I/O die): includes the BootMCU (responsible for system boot) and its own clock/reset domains low-speed peripherals.

The device tree describes the SoC0 and SoC1 domains and their peripheral layouts.

(cherry picked from commit e77bb5dc57593a4698aaacd57a776728cf552e73)
---
 MAINTAINERS                                   |    1 +
 arch/arm64/boot/dts/Makefile                  |    1 +
 arch/arm64/boot/dts/aspeed/Makefile           |    4 +
 .../aspeed/aspeed-evb-flash-layout-128.dtsi   |   32 +
 arch/arm64/boot/dts/aspeed/aspeed-g7-a35.dtsi |  196 +++
 .../dts/aspeed/aspeed-g7-soc0-pinctrl.dtsi    |  225 ++++
 .../arm64/boot/dts/aspeed/aspeed-g7-soc0.dtsi |  230 ++++
 .../dts/aspeed/aspeed-g7-soc1-pinctrl.dtsi    | 1113 +++++++++++++++++
 .../arm64/boot/dts/aspeed/aspeed-g7-soc1.dtsi |  557 +++++++++
 arch/arm64/boot/dts/aspeed/ast2700-evb.dts    |   65 +
 10 files changed, 2424 insertions(+)
 create mode 100644 arch/arm64/boot/dts/aspeed/Makefile
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-evb-flash-layout-128.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-a35.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-soc0-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-soc0.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-soc1-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/aspeed-g7-soc1.dtsi
 create mode 100644 arch/arm64/boot/dts/aspeed/ast2700-evb.dts
MAINTAINERS +1 -0
index 2d88583b5ec3..a0e07dc83f56 100644
@@ -2512,6 +2512,7 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bmc/linux.git
 F:	Documentation/devicetree/bindings/arm/aspeed/
 F:	arch/arm/boot/dts/aspeed/
 F:	arch/arm/mach-aspeed/
+F:	arch/arm64/boot/dts/aspeed/
 N:	aspeed
 
 ARM/AXIADO ARCHITECTURE
arch/arm64/boot/dts/Makefile +1 -0
index b0844404eda1..5b8fbf5b1061 100644
@@ -9,6 +9,7 @@ subdir-y += amlogic
 subdir-y += apm
 subdir-y += apple
 subdir-y += arm
+subdir-y += aspeed
 subdir-y += axiado
 subdir-y += bitmain
 subdir-y += blaize
arch/arm64/boot/dts/aspeed/Makefile new file +4 -0
new file mode 100644
index 000000000000..ffe7e15017cc
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
+
+dtb-$(CONFIG_ARCH_ASPEED) += \
+	ast2700-evb.dtb
arch/arm64/boot/dts/aspeed/aspeed-evb-flash-layout-128.dtsi new file +32 -0
new file mode 100644
index 000000000000..b54915f06efd
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+
+partitions {
+	compatible = "fixed-partitions";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	u-boot@0 {
+		reg = <0x0 0x400000>; // 4MB
+		label = "u-boot";
+	};
+
+	u-boot-env@400000 {
+		reg = <0x400000 0x20000>; // 128KB
+		label = "u-boot-env";
+	};
+
+	kernel@420000 {
+		reg = <0x420000 0x900000>; // 9MB
+		label = "kernel";
+	};
+
+	rofs@d20000 {
+		reg = <0xd20000 0x52E0000>; // 82.875MB
+		label = "rofs";
+	};
+
+	rwfs@6000000 {
+		reg = <0x6000000 0x2000000>; // 32MB
+		label = "rwfs";
+	};
+};
arch/arm64/boot/dts/aspeed/aspeed-g7-a35.dtsi new file +196 -0

196 lines not on this page · raw message

arch/arm64/boot/dts/aspeed/aspeed-g7-soc0-pinctrl.dtsi new file +225 -0

225 lines not on this page · raw message

arch/arm64/boot/dts/aspeed/aspeed-g7-soc0.dtsi new file +230 -0

230 lines not on this page · raw message

arch/arm64/boot/dts/aspeed/aspeed-g7-soc1-pinctrl.dtsi new file +1113 -0

1,113 lines not on this page · raw message

arch/arm64/boot/dts/aspeed/aspeed-g7-soc1.dtsi new file +557 -0

557 lines not on this page · raw message

arch/arm64/boot/dts/aspeed/ast2700-evb.dts new file +65 -0

65 lines not on this page · raw message

Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/5 arm64: configs: Update defconfig for AST2700 platform support

In reply to Vince Chang

From: Ryan Chen <[email protected]>

Enable options for ASPEED AST2700 SoC.

(cherry picked from commit 512cef2af615cf0a4c9b0529a2aa36390240ecb7)
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index 32861d08a3b8..dd96c5121a15 100644
@@ -39,6 +39,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_ARCH_ALPINE=y
 CONFIG_ARCH_APPLE=y
 CONFIG_ARCH_ARTPEC=y
+CONFIG_ARCH_ASPEED=y
 CONFIG_ARCH_AXIADO=y
 CONFIG_ARCH_BCM=y
 CONFIG_ARCH_BCM2835=y
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/5 arm64: dts: aspeed: Fix duplicate pinctrl labels and address scheme

In reply to Vince Chang

From: Ryan Chen <[email protected]>

A report from shashiko-bot highlighted some concerns concurrent to application of the series[1].

Fix duplicate pinctrl_tach{0-15} and pinctrl_n{cts,dcd,dsr,ri}5 labels in aspeed-g7-soc1-pinctrl.dtsi. These didn't cause errors from dtc because dtc accepts duplicate labels for duplicate nodes specified through a node reference[2].

Drop the cpu-index from secondary/tertiary container nodes: reduce the "#address-cells" from 2 to 1 and update unit-addresses and reg accordingly. The 2-cell scheme was proposed in an early mailing list sketch to prompt discussion[3], but the design evolved in ways that made it unnecessary.

Also remove URL comments from the DTS. The links were to comments in the kernel sources with discussion justifying the approach, but are not necessary to carry forward.

[arj: Extend discussion in the commit message]

---
 arch/arm64/boot/dts/aspeed/aspeed-g7-a35.dtsi |  14 ++-
 .../dts/aspeed/aspeed-g7-soc1-pinctrl.dtsi    | 102 ------------------
 2 files changed, 6 insertions(+), 110 deletions(-)
arch/arm64/boot/dts/aspeed/aspeed-g7-a35.dtsi +6 -8
index ef283d95649a..58193c3c3696 100644
@@ -84,32 +84,30 @@ l2: l2-cache0 {
 	};
 
 	secondary {
-		#address-cells = <2>;
-		/* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/of/address.c?h=v6.16#n491 */
+		#address-cells = <1>;
 		#size-cells = <0>;
-		/* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/of/address.c?h=v6.16#n430 */
 
-		ssp_nvic: interrupt-controller@1,e000e100 {
+		ssp_nvic: interrupt-controller@e000e100 {
 			compatible = "arm,v7m-nvic";
 			#interrupt-cells = <2>;
 			#address-cells = <0>;
 			interrupt-controller;
-			reg = <1 0xe000e100>;
+			reg = <0xe000e100>;
 			arm,num-irq-priority-bits = <3>;
 			status = "disabled";
 		};
 	};
 
 	tertiary {
-		#address-cells = <2>;
+		#address-cells = <1>;
 		#size-cells = <0>;
 
-		tsp_nvic: interrupt-controller@2,e000e100 {
+		tsp_nvic: interrupt-controller@e000e100 {
 			compatible = "arm,v7m-nvic";
 			#interrupt-cells = <2>;
 			#address-cells = <0>;
 			interrupt-controller;
-			reg = <2 0xe000e100>;
+			reg = <0xe000e100>;
 			arm,num-irq-priority-bits = <3>;
 			status = "disabled";
 		};
arch/arm64/boot/dts/aspeed/aspeed-g7-soc1-pinctrl.dtsi +0 -102

114 lines not on this page · raw message

Signature · 1 line
2.43.0
maintainer Applied
#6 lore raw
In reply to Vince Chang
Quoted 4 lines · Vince Chang

Backport five upstream Linux ASPEED platform commits to OpenBMC dev-6.18 to add AST2700 board bindings, Kconfig, initial device trees and defconfig support, including the follow-up DTS correction for duplicate pinctrl labels and the address scheme.

Applied, thanks.

Andrew