Skip to contentSkip to conversation

ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs

PATCH In review Tao Ren 3 participants 9 messages Oct 21, 2019 – Nov 1, 2019

Subsystems (2)
lore
Share & tools
lore

Tao Ren

author
#0 lore raw

cover ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs

The patch series adds "facebook-netbmc-ast2500-common.dtsi" which defines devices that are common cross all Facebook AST2500 Network BMC platforms. The major purpose is to minimize duplicated device entries among Facebook Network BMC dts files.

Patch #1 (of 4) adds "facebook-netbmc-ast2500-common.dtsi" file, and the remaining 3 patches update CMM, Minipack and Yamp device tree to consume the new dtsi file.

Tao Ren (4):
ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs
ARM: dts: aspeed: cmm: include dtsi for common network BMC devices
ARM: dts: aspeed: minipack: include dtsi for common network BMC
devices
ARM: dts: aspeed: yamp: include dtsi for common network BMC devices

 arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts | 66 ++++---------
 .../boot/dts/aspeed-bmc-facebook-minipack.dts | 59 ++++--------
 .../arm/boot/dts/aspeed-bmc-facebook-yamp.dts | 62 +-----------
 .../dts/facebook-netbmc-ast2500-common.dtsi   | 96 +++++++++++++++++++
 4 files changed, 136 insertions(+), 147 deletions(-)
 create mode 100644 arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/4 ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs

Introduce "facebook-netbmc-ast2500-common.dtsi" which is included by all Facebook AST2500 Network BMC platforms. The major purpose is to minimize duplicated device entries cross Facebook Network BMC dts files.

---
 .../dts/facebook-netbmc-ast2500-common.dtsi   | 96 +++++++++++++++++++
 1 file changed, 96 insertions(+)
 create mode 100644 arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi
arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi new file +96 -0
new file mode 100644
index 000000000000..7a395ba56512
@@ -0,0 +1,96 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2019 Facebook Inc.
+
+#include "aspeed-g5.dtsi"
+
+/ {
+	memory at 80000000 {
+		reg = <0x80000000 0x40000000>;
+	};
+};
+
+/*
+ * Update reset type to "system" (full chip) to fix warm reboot hang issue
+ * when reset type is set to default ("soc", gated by reset mask registers).
+ */
+&wdt1 {
+	status = "okay";
+	aspeed,reset-type = "system";
+};
+
+&wdt2 {
+	status = "disabled";
+};
+
+&uart1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_txd1_default
+		     &pinctrl_rxd1_default>;
+};
+
+&uart3 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_txd3_default
+		     &pinctrl_rxd3_default>;
+};
+
+&uart5 {
+	status = "okay";
+};
+
+&fmc {
+	status = "okay";
+
+	fmc_flash0: flash at 0 {
+		status = "okay";
+		m25p,fast-read;
+		label = "spi0.0";
+
+#include "facebook-bmc-flash-layout.dtsi"
+	};
+
+	fmc_flash1: flash at 1 {
+		status = "okay";
+		m25p,fast-read;
+		label = "spi0.1";
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			flash1 at 0 {
+				reg = <0x0 0x2000000>;
+				label = "flash1";
+			};
+		};
+	};
+};
+
+&mac1 {
+	status = "okay";
+	no-hw-checksum;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
+};
+
+&rtc {
+	status = "okay";
+};
+
+&vhub {
+	status = "okay";
+};
+
+&sdmmc {
+	status = "okay";
+};
+
+&sdhci1 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd2_default>;
+};
Signature · 1 line
2.17.1
maintainer
#2 lore raw

arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi line 74

Quoted 10 lines · Tao Ren

Introduce "facebook-netbmc-ast2500-common.dtsi" which is included by all Facebook AST2500 Network BMC platforms. The major purpose is to minimize duplicated device entries cross Facebook Network BMC dts files.

arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi new file +4 -0
+
+&mac1 {
+       status = "okay";
+       no-hw-checksum;

Was this included to work around the IPv6 issue that Benh recently fixed?

If you can test your platform with 88824e3bf29a2fcacfd9ebbfe03063649f0f3254 applied and the no-hw-checksum property removed, please send a follow up to remove this property.

It's not doing any harm, but by cleaning it up there's less chance others blindly copy the same thing.

Thanks,

Joel

Quoted 3 lines
arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi new file +3 -0
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
+};
#3 lore raw
Quoted 19 lines · Joel Stanley

arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi line 74

Quoted 10 lines · Tao Ren

Introduce "facebook-netbmc-ast2500-common.dtsi" which is included by all Facebook AST2500 Network BMC platforms. The major purpose is to minimize duplicated device entries cross Facebook Network BMC dts files.

arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi new file +4 -0
+
+&mac1 {
+       status = "okay";
+       no-hw-checksum;

Was this included to work around the IPv6 issue that Benh recently fixed?

If you can test your platform with 88824e3bf29a2fcacfd9ebbfe03063649f0f3254 applied and the no-hw-checksum property removed, please send a follow up to remove this property.

Quoted 6 lines

It's not doing any harm, but by cleaning it up there's less chance others blindly copy the same thing.

Thanks,

Joel

Yes. I'm planning to try the patch. Will send out a followup patch to remove the line if everything goes fine.

Cheers,

Tao

Quoted 3 lines
Quoted 3 lines
arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi new file +3 -0
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
+};
author
#4 lore raw

PATCH 2/4 ARM: dts: aspeed: cmm: include dtsi for common network BMC devices

In reply to Tao Ren

The patch simplifies CMM device tree by including dtsi to define devices which are common to Facebook AST2500 Network BMC platforms.

Below is the summary of changes comparing with previous dts version:
- enabling the second firmware flash.
- enabling the emmc device in slot #0.

---
 arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts | 66 +++++--------------
 1 file changed, 16 insertions(+), 50 deletions(-)
arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts +16 -50
index d519d307aa2a..0a031132594a 100644
@@ -2,7 +2,7 @@
 // Copyright (c) 2018 Facebook Inc.
 /dts-v1/;
 
-#include "aspeed-g5.dtsi"
+#include "facebook-netbmc-ast2500-common.dtsi"
 
 / {
 	model = "Facebook Backpack CMM BMC";
@@ -53,10 +53,6 @@
 		bootargs = "console=ttyS1,9600n8 root=/dev/ram rw earlyprintk";
 	};
 
-	memory at 80000000 {
-		reg = <0x80000000 0x20000000>;
-	};
-
 	ast-adc-hwmon {
 		compatible = "iio-hwmon";
 		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
@@ -64,39 +60,7 @@
 	};
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
-/*
- * Update reset type to "system" (full chip) to fix warm reboot hang issue
- * when reset type is set to default ("soc", gated by reset mask registers).
- */
-&wdt1 {
-	status = "okay";
-	aspeed,reset-type = "system";
-};
-
-/*
- * wdt2 is not used by Backpack CMM.
- */
-&wdt2 {
-	status = "disabled";
-};
-
-&fmc {
-	status = "okay";
-	flash at 0 {
-		status = "okay";
-		m25p,fast-read;
-		label = "bmc";
-#include "facebook-bmc-flash-layout.dtsi"
-	};
-};
-
 &uart1 {
-	status = "okay";
-	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_txd1_default
 		     &pinctrl_rxd1_default
 		     &pinctrl_ncts1_default
@@ -107,8 +71,6 @@
 };
 
 &uart3 {
-	status = "okay";
-	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_txd3_default
 		     &pinctrl_rxd3_default
 		     &pinctrl_ncts3_default
@@ -123,17 +85,6 @@
 		     &pinctrl_rxd4_default>;
 };
 
-&uart5 {
-	status = "okay";
-};
-
-&mac1 {
-	status = "okay";
-	no-hw-checksum;
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
-};
-
 /*
  * I2C bus reserved for communication with COM-E.
  */
@@ -380,3 +331,18 @@
 &ehci1 {
 	status = "okay";
 };
+
+&vhub {
+	status = "disabled";
+};
+
+&sdhci0 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd1_default>;
+};
+
+&sdhci1 {
+	status = "disabled";
+};
Signature · 1 line
2.17.1
author
#5 lore raw

PATCH 3/4 ARM: dts: aspeed: minipack: include dtsi for common network BMC devices

In reply to Tao Ren

The patch simplifies Minipack device tree by including dtsi to define devices which are common to Facebook AST2500 Network BMC platforms.

Below is the summary of changes comparing with previous dts version:
- enabling the second firmware flash.
- updating firmware flashes' size from 32MB to 64MB.
- enabling the emmc device in slot #1.

---
 .../boot/dts/aspeed-bmc-facebook-minipack.dts | 59 ++++++-------------
 1 file changed, 19 insertions(+), 40 deletions(-)
arch/arm/boot/dts/aspeed-bmc-facebook-minipack.dts +19 -40
index c05478296446..ed1a77c76ce9 100644
@@ -2,7 +2,7 @@
 // Copyright (c) 2018 Facebook Inc.
 /dts-v1/;
 
-#include "aspeed-g5.dtsi"
+#include "facebook-netbmc-ast2500-common.dtsi"
 
 / {
 	model = "Facebook Minipack 100 BMC";
@@ -76,35 +76,36 @@
 		stdout-path = &uart1;
 		bootargs = "debug console=ttyS1,9600n8 root=/dev/ram rw";
 	};
-
-	memory at 80000000 {
-		reg = <0x80000000 0x20000000>;
-	};
 };
 
-&wdt1 {
+&wdt2 {
 	status = "okay";
 	aspeed,reset-type = "system";
 };
 
-&wdt2 {
-	status = "okay";
-	aspeed,reset-type = "system";
+/*
+ * Both firmware flashes are 64MB on Minipack BMC.
+ */
+&fmc_flash0 {
+	partitions {
+		data0 at 1c00000 {
+			reg = <0x1c00000 0x2400000>;
+		};
+		flash0 at 0 {
+			reg = <0x0 0x4000000>;
+		};
+	};
 };
 
-&fmc {
-	status = "okay";
-	flash at 0 {
-		status = "okay";
-		m25p,fast-read;
-		label = "bmc";
-#include "facebook-bmc-flash-layout.dtsi"
+&fmc_flash1 {
+	partitions {
+		flash1 at 0 {
+			reg = <0x0 0x4000000>;
+		};
 	};
 };
 
 &uart1 {
-	status = "okay";
-	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_txd1_default
 		     &pinctrl_rxd1_default
 		     &pinctrl_ncts1_default
@@ -120,13 +121,6 @@
 		     &pinctrl_rxd2_default>;
 };
 
-&uart3 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_txd3_default
-		     &pinctrl_rxd3_default>;
-};
-
 &uart4 {
 	status = "okay";
 	pinctrl-names = "default";
@@ -134,17 +128,6 @@
 		     &pinctrl_rxd4_default>;
 };
 
-&uart5 {
-	status = "okay";
-};
-
-&mac1 {
-	status = "okay";
-	no-hw-checksum;
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
-};
-
 &i2c0 {
 	status = "okay";
 	bus-frequency = <400000>;
@@ -423,7 +406,3 @@
 &i2c13 {
 	status = "okay";
 };
-
-&vhub {
-	status = "okay";
-};
Signature · 1 line
2.17.1
author
#6 lore raw

PATCH 4/4 ARM: dts: aspeed: yamp: include dtsi for common network BMC devices

In reply to Tao Ren

The patch simplifies Yamp device tree by including dtsi to define devices which are common to Facebook AST2500 Network BMC platforms.

Below is the summary of changes comparing with previous dts version:
- enabling the second firmware flash.
- enabling the emmc device in slot #1.

---
 .../arm/boot/dts/aspeed-bmc-facebook-yamp.dts | 62 ++-----------------
 1 file changed, 5 insertions(+), 57 deletions(-)
arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts +5 -57
index 4e09a9cf32b7..b184fa1abb60 100644
@@ -2,7 +2,7 @@
 // Copyright (c) 2018 Facebook Inc.
 /dts-v1/;
 
-#include "aspeed-g5.dtsi"
+#include "facebook-netbmc-ast2500-common.dtsi"
 
 / {
 	model = "Facebook YAMP 100 BMC";
@@ -23,47 +23,6 @@
 		stdout-path = &uart5;
 		bootargs = "console=ttyS0,9600n8 root=/dev/ram rw";
 	};
-
-	memory at 80000000 {
-		reg = <0x80000000 0x20000000>;
-	};
-};
-
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
-/*
- * Update reset type to "system" (full chip) to fix warm reboot hang issue
- * when reset type is set to default ("soc", gated by reset mask registers).
- */
-&wdt1 {
-	status = "okay";
-	aspeed,reset-type = "system";
-};
-
-/*
- * wdt2 is not used by Yamp.
- */
-&wdt2 {
-	status = "disabled";
-};
-
-&fmc {
-	status = "okay";
-	flash at 0 {
-		status = "okay";
-		m25p,fast-read;
-		label = "bmc";
-#include "facebook-bmc-flash-layout.dtsi"
-	};
-};
-
-&uart1 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_txd1_default
-		     &pinctrl_rxd1_default>;
 };
 
 &uart2 {
@@ -73,17 +32,6 @@
 		     &pinctrl_rxd2_default>;
 };
 
-&uart3 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_txd3_default
-		     &pinctrl_rxd3_default>;
-};
-
-&uart5 {
-	status = "okay";
-};
-
 &mac0 {
 	status = "okay";
 	use-ncsi;
@@ -92,6 +40,10 @@
 	pinctrl-0 = <&pinctrl_rmii1_default>;
 };
 
+&mac1 {
+	status = "disabled";
+};
+
 &i2c0 {
 	status = "okay";
 };
@@ -154,7 +106,3 @@
 &i2c13 {
 	status = "okay";
 };
-
-&vhub {
-	status = "okay";
-};
Signature · 1 line
2.17.1
maintainer
#7 lore raw
In reply to Tao Ren

Hi Tao,

Quoted 9 lines · Tao Ren

The patch series adds "facebook-netbmc-ast2500-common.dtsi" which defines devices that are common cross all Facebook AST2500 Network BMC platforms. The major purpose is to minimize duplicated device entries among Facebook Network BMC dts files.

Patch #1 (of 4) adds "facebook-netbmc-ast2500-common.dtsi" file, and the remaining 3 patches update CMM, Minipack and Yamp device tree to consume the new dtsi file.

The patches look okay to me. I modified the file name to match the convention used by other device trees in the arm directory, where it includes the SOC name first.

I also reworded the commit messages a little.

They have been merged into the aspeed tree for submission to 5.5.

Thanks!

Joel

Quoted 18 lines

Tao Ren (4):
ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs
ARM: dts: aspeed: cmm: include dtsi for common network BMC devices
ARM: dts: aspeed: minipack: include dtsi for common network BMC
devices
ARM: dts: aspeed: yamp: include dtsi for common network BMC devices

 arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts | 66 ++++---------
 .../boot/dts/aspeed-bmc-facebook-minipack.dts | 59 ++++--------
 .../arm/boot/dts/aspeed-bmc-facebook-yamp.dts | 62 +-----------
 .../dts/facebook-netbmc-ast2500-common.dtsi   | 96 +++++++++++++++++++
 4 files changed, 136 insertions(+), 147 deletions(-)
 create mode 100644 arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi

--
2.17.1

#8 lore raw
Quoted 17 lines · Joel Stanley

Hi Tao,

Quoted 9 lines · Tao Ren

The patch series adds "facebook-netbmc-ast2500-common.dtsi" which defines devices that are common cross all Facebook AST2500 Network BMC platforms. The major purpose is to minimize duplicated device entries among Facebook Network BMC dts files.

Patch #1 (of 4) adds "facebook-netbmc-ast2500-common.dtsi" file, and the remaining 3 patches update CMM, Minipack and Yamp device tree to consume the new dtsi file.

The patches look okay to me. I modified the file name to match the convention used by other device trees in the arm directory, where it includes the SOC name first.

Quoted 7 lines

I also reworded the commit messages a little.

They have been merged into the aspeed tree for submission to 5.5.

Thanks!

Joel

Got it. Thanks a lot for doing this, Joel.

Cheers,

Tao

Quoted 18 lines
Quoted 18 lines

Tao Ren (4):
ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs
ARM: dts: aspeed: cmm: include dtsi for common network BMC devices
ARM: dts: aspeed: minipack: include dtsi for common network BMC
devices
ARM: dts: aspeed: yamp: include dtsi for common network BMC devices

 arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts | 66 ++++---------
 .../boot/dts/aspeed-bmc-facebook-minipack.dts | 59 ++++--------
 .../arm/boot/dts/aspeed-bmc-facebook-yamp.dts | 62 +-----------
 .../dts/facebook-netbmc-ast2500-common.dtsi   | 96 +++++++++++++++++++
 4 files changed, 136 insertions(+), 147 deletions(-)
 create mode 100644 arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi

--
2.17.1