Skip to contentSkip to conversation

*** Add device tree for Phytium's BMC ***

PATCH New [email protected] 2 participants 4 messages Jul 12, 2022 – Jul 21, 2022

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

cover *** Add device tree for Phytium's BMC ***

From: Min Wang <[email protected]>

*** BLURB HERE ***

Min Wang (1):
ARM: dts: aspeed: Add device tree for Phytium's BMC

 arch/arm/boot/dts/Makefile                    |   3 +-
 .../boot/dts/aspeed-bmc-phytium-pomelo.dts    | 302 ++++++++++++++++++
 2 files changed, 304 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/1 ARM: dts: aspeed: Add device tree for Phytium's BMC

From: Min Wang <[email protected]>

The Phytium's BMC card is an ASPEED AST2500-based BMC for the hardware reference platform with Phytium's Processors Family.

---
 arch/arm/boot/dts/Makefile                    |   3 +-
 .../boot/dts/aspeed-bmc-phytium-pomelo.dts    | 302 ++++++++++++++++++
 2 files changed, 304 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts
arch/arm/boot/dts/Makefile +2 -1
index 7e0934180724..e02cd800d45a 100644
@@ -1497,4 +1497,5 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-opp-zaius.dtb \
 	aspeed-bmc-portwell-neptune.dtb \
 	aspeed-bmc-quanta-q71l.dtb \
-	aspeed-bmc-supermicro-x11spi.dtb
+	aspeed-bmc-supermicro-x11spi.dtb \
+	aspeed-bmc-phytium-pomelo.dtb
arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts new file +302 -0

302 lines not on this page · raw message

Signature · 1 line
2.27.0
#2 lore raw

PATCH 1/1 ARM: dts: aspeed: Add device tree for Phytium's BMC

Quoted 17 lines · On Tue, 12 Jul 2022, at 10:53, wangmin_phy at 126.com wrote:

From: Min Wang <[email protected]>

The Phytium's BMC card is an ASPEED AST2500-based BMC for the hardware reference platform with Phytium's Processors Family.

---
 arch/arm/boot/dts/Makefile                    |   3 +-
 .../boot/dts/aspeed-bmc-phytium-pomelo.dts    | 302 ++++++++++++++++++
 2 files changed, 304 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts
arch/arm/boot/dts/Makefile +0 -0
index 7e0934180724..e02cd800d45a 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_ASPEED) += \ · line 1501

Quoted 6 lines
arch/arm/boot/dts/Makefile +2 -1
@@ -1497,4 +1497,5 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-opp-zaius.dtb \
 	aspeed-bmc-portwell-neptune.dtb \
 	aspeed-bmc-quanta-q71l.dtb \
-	aspeed-bmc-supermicro-x11spi.dtb
+	aspeed-bmc-supermicro-x11spi.dtb \
+	aspeed-bmc-phytium-pomelo.dtb

Please keep the list in alphabetical order.

Quoted 14 lines
arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts new file +7 -0
new file mode 100644
index 000000000000..a75017f22140
@@ -0,0 +1,302 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+#include "aspeed-g5.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+
+/ {

arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts line 17

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts new file +10 -0
+	model = "Phytium AST2500 BMC";
+	compatible = "aspeed,ast2500";
+
+	aliases {
+		serial4 = &uart5;
+	};
+
+	chosen {
+		stdout-path = &uart5;
+		bootargs = "console=tty0 console=ttyS4,115200 earlyprintk";

I think we're in favour of dropping bootargs from the devicetree now. This is handled in other ways (u-boot).

Quoted 44 lines
arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts new file +44 -0
+	};
+
+	memory at 80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0x20000000>;
+	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		vga_memory: framebuffer at 9c000000 {
+			no-map;
+			reg = <0x9c000000 0x04000000>; /* 64M */
+		};
+
+		video_engine_memory: jpegbuffer {
+			size = <0x02000000>;	/* 32M */
+			alignment = <0x01000000>;
+			compatible = "shared-dma-pool";
+			reusable;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		id-button {
+			label = "id-button";
+			gpios = <&gpio  ASPEED_GPIO(S, 2)  GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		identify {
+			gpios = <&gpio ASPEED_GPIO(C, 6) GPIO_ACTIVE_LOW>;
+		};
+		fault {
+			gpios = <&gpio ASPEED_GPIO(C, 7) GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	iio-hwmon {

arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts line 71

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts new file +10 -0
+		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>;
+	};
+};
+
+&adc {
+	status = "okay";

I recommend you mux the ADC lines to avoid them being 'stolen' by userspace accidentally requesting the wrong GPIOs.

Quoted 152 lines
arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts new file +152 -0
+};
+
+&fmc {
+	status = "okay";
+	flash at 0 {
+		status = "okay";
+		m25p,fast-read;
+		label = "bmc";
+		spi-max-frequency = <50000000>;
+#include "openbmc-flash-layout.dtsi"
+	};
+};
+
+&spi1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_spi1_default>;
+	flash at 0 {
+		status = "okay";
+		m25p,fast-read;
+		label = "pnor";
+		spi-max-frequency = <100000000>;
+	};
+};
+
+&spi2 {
+	status = "okay";
+};
+
+&uart5 {
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_txd1_default
+			&pinctrl_rxd1_default
+			&pinctrl_nrts1_default
+			&pinctrl_ndtr1_default
+			&pinctrl_ndsr1_default
+			&pinctrl_ncts1_default
+			&pinctrl_ndcd1_default
+			&pinctrl_nri1_default>;
+
+};
+
+&lpc_snoop {
+	status = "okay";
+	snoop-ports = <0x80>;
+};
+
+&kcs3 {
+	status = "okay";
+	aspeed,lpc-io-reg = <0xCA2>;
+};
+
+&kcs2 {
+	status = "okay";
+	aspeed,lpc-io-reg = <0xCA8>;
+};
+
+&mac0 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rmii1_default>;
+	clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>,
+		 <&syscon ASPEED_CLK_MAC1RCLK>;
+	clock-names = "MACCLK", "RCLK";
+	use-ncsi;
+};
+
+&mac1 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
+};
+
+&i2c1 {
+	status = "okay";
+	psu1 at 58 {
+		compatible = "pmbus";
+		reg = <0x58>;
+	};
+	psu2 at 59 {
+		compatible = "pmbus";
+		reg = <0x59>;
+	};
+};
+
+&i2c2 {
+	status = "okay";
+};
+
+&i2c3 {
+	status = "okay";
+
+};
+
+&i2c4 {
+	status = "okay";
+	rtc at 68 {
+		compatible = "dallas,ds1339";
+		reg = <0x68>;
+	};
+};
+
+&i2c5 {
+	status = "okay";
+};
+
+
+&i2c6 {
+	status = "okay";
+};
+
+&i2c7 {
+	status = "okay";
+};
+
+&i2c8 {
+	status = "okay";
+	lm75 at 48 {
+		compatible = "ti,tmp100";
+		reg = <0x48>;
+	};
+	lm75 at 49 {
+		compatible = "ti,tmp100";
+		reg = <0x49>;
+	};
+	lm75 at 4a {
+		compatible = "ti,tmp100";
+		reg = <0x4a>;
+	};
+	lm75 at 4c {
+		compatible = "ti,tmp100";
+		reg = <0x4c>;
+	};
+	lm75 at 4d {
+		compatible = "ti,tmp100";
+		reg = <0x4d>;
+	};
+	lm75 at 4e {
+		compatible = "ti,tmp100";
+		reg = <0x4e>;
+	};
+
+};
+
+&i2c0 {

arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts line 233

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts new file +10 -0
+	status = "okay";
+};
+
+
+/*
+ * Enable port A as device (via the virtual hub) and port B as
+ * host by default on the eval board. This can be easily changed
+ * by replacing the override below with &ehci0 { ... } to enable
+ * host on both ports.
+ */

Drop this comment as it's not the EVB?

Cheers,

Andrew

#3 lore raw

cover *** Add device tree for Phytium's BMC ***

In reply to [email protected]

Hi Min Wang,

Can you please refrain from using *** in the subject going forward? This is meant to highlight the template data, which you need to replace.

Quoted 3 lines · On Tue, 12 Jul 2022, at 10:53, wangmin_phy at 126.com wrote:

From: Min Wang <[email protected]>

*** BLURB HERE ***

You also need to write a blurb if you're sending a cover letter, however, if it's just one patch, you can omit the cover letter altogether (and skip writing the blurb that way).

Andrew