Skip to contentSkip to conversation

ARM: dts: aspeed: Add AMD DaytonaX BMC

PATCH Superseded Konstantin Aladyshev 2 participants 2 messages Sep 20, 2022

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: dts: aspeed: Add AMD DaytonaX BMC

Add initial version of device tree for the BMC in the AMD DaytonaX platform.

AMD DaytonaX platform is a customer reference board (CRB) with an Aspeed ast2500 BMC manufactured by AMD.

---
 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts | 320 ++++++++++++++++++
 2 files changed, 321 insertions(+)
 create mode 100644 arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts
arch/arm/boot/dts/Makefile +1 -0
index 05d8aef6e5d2..9eff88d410aa 100644
@@ -1575,6 +1575,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2600-evb-a1.dtb \
 	aspeed-ast2600-evb.dtb \
 	aspeed-bmc-amd-ethanolx.dtb \
+	aspeed-bmc-amd-daytonax.dtb \
 	aspeed-bmc-ampere-mtjade.dtb \
 	aspeed-bmc-arm-stardragon4800-rep2.dtb \
 	aspeed-bmc-asrock-e3c246d4i.dtb \
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +320 -0

320 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 2 lines · Konstantin Aladyshev

Add initial version of device tree for the BMC in the AMD DaytonaX platform.

Thank you for your patch. There is something to discuss/improve.

Quoted 19 lines
arch/arm/boot/dts/Makefile +1 -0
index 05d8aef6e5d2..9eff88d410aa 100644
@@ -1575,6 +1575,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2600-evb-a1.dtb \
 	aspeed-ast2600-evb.dtb \
 	aspeed-bmc-amd-ethanolx.dtb \
+	aspeed-bmc-amd-daytonax.dtb \
 	aspeed-bmc-ampere-mtjade.dtb \
 	aspeed-bmc-arm-stardragon4800-rep2.dtb \
 	aspeed-bmc-asrock-e3c246d4i.dtb \
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +0 -0
new file mode 100644
index 000000000000..0e066b5ae0fb

arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts line 10

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +10 -0
@@ -0,0 +1,320 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "aspeed-g5.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	model = "AMD DaytonaX BMC";
+	compatible = "amd,daytonax-bmc", "aspeed,ast2500";

Missing bindings documentation.

Quoted 16 lines
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +16 -0
+
+	memory at 80000000 {
+		reg = <0x80000000 0x20000000>;
+	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		video_engine_memory: jpegbuffer {
+			size = <0x02000000>;	/* 32M */
+			alignment = <0x01000000>;
+			compatible = "shared-dma-pool";
+			reusable;
+		};

arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts line 36

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +10 -0
+	};
+
+	aliases {
+		serial0 = &uart1;
+		serial4 = &uart5;
+	};
+
+	chosen {
+		stdout-path = &uart5;
+		bootargs = "console=ttyS4,115200 earlycon";

bootargs do not belong to mainline DTS. earlycon for sure.

arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts line 42

Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +6 -0
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		fault {

Does not look like you tested the DTS against bindings. Please run make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst for instructions).

Nodes are wrong.

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts line 46

Quoted 4 lines
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +4 -0
+			gpios = <&gpio ASPEED_GPIO(A, 2) GPIO_ACTIVE_LOW>;
+		};
+
+		identify {

Ditto

Quoted 14 lines
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +14 -0
+			gpios = <&gpio ASPEED_GPIO(A, 3) GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	iio-hwmon {
+		compatible = "iio-hwmon";
+		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, <&adc 4>,
+			<&adc 5>, <&adc 6>, <&adc 7>, <&adc 8>, <&adc 9>,
+			<&adc 10>, <&adc 11>, <&adc 12>, <&adc 13>, <&adc 14>,
+			<&adc 15>;
+	};
+};
+
+&fmc {

(...)

Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +5 -0
+	fan at 15 {
+		reg = <0x07>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x0f>;
+	};
+};

arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts line 320

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-amd-daytonax.dts new file +10 -0
+
+&video {
+	status = "okay";
+	memory-region = <&video_engine_memory>;
+};
+
+&vhub {
+	status = "okay";
+};
+

No need for trailing new line.

Best regards,
Krzysztof