2019-10-21 19:49:49

by Tao Ren

[permalink] [raw]
Subject: [PATCH 0/4] 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

--
2.17.1


2019-10-21 19:50:11

by Tao Ren

[permalink] [raw]
Subject: [PATCH 3/4] ARM: dts: aspeed: minipack: include dtsi for common network BMC devices

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.

Signed-off-by: Tao Ren <[email protected]>
---
.../boot/dts/aspeed-bmc-facebook-minipack.dts | 59 ++++++-------------
1 file changed, 19 insertions(+), 40 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-minipack.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-minipack.dts
index c05478296446..ed1a77c76ce9 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-minipack.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-minipack.dts
@@ -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@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@1c00000 {
+ reg = <0x1c00000 0x2400000>;
+ };
+ flash0@0 {
+ reg = <0x0 0x4000000>;
+ };
+ };
};

-&fmc {
- status = "okay";
- flash@0 {
- status = "okay";
- m25p,fast-read;
- label = "bmc";
-#include "facebook-bmc-flash-layout.dtsi"
+&fmc_flash1 {
+ partitions {
+ flash1@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";
-};
--
2.17.1

2019-10-21 19:50:58

by Tao Ren

[permalink] [raw]
Subject: [PATCH 2/4] ARM: dts: aspeed: cmm: include dtsi for common network BMC devices

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.

Signed-off-by: Tao Ren <[email protected]>
---
arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts | 66 +++++--------------
1 file changed, 16 insertions(+), 50 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts
index d519d307aa2a..0a031132594a 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts
@@ -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@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@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";
+};
--
2.17.1

2019-10-21 19:53:35

by Tao Ren

[permalink] [raw]
Subject: [PATCH 4/4] ARM: dts: aspeed: yamp: include dtsi for common network BMC devices

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.

Signed-off-by: Tao Ren <[email protected]>
---
.../arm/boot/dts/aspeed-bmc-facebook-yamp.dts | 62 ++-----------------
1 file changed, 5 insertions(+), 57 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts
index 4e09a9cf32b7..b184fa1abb60 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts
@@ -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@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@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";
-};
--
2.17.1

2019-10-21 19:54:16

by Tao Ren

[permalink] [raw]
Subject: [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.

Signed-off-by: Tao Ren <[email protected]>
---
.../dts/facebook-netbmc-ast2500-common.dtsi | 96 +++++++++++++++++++
1 file changed, 96 insertions(+)
create mode 100644 arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi

diff --git a/arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi b/arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi
new file mode 100644
index 000000000000..7a395ba56512
--- /dev/null
+++ b/arch/arm/boot/dts/facebook-netbmc-ast2500-common.dtsi
@@ -0,0 +1,96 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2019 Facebook Inc.
+
+#include "aspeed-g5.dtsi"
+
+/ {
+ memory@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@0 {
+ status = "okay";
+ m25p,fast-read;
+ label = "spi0.0";
+
+#include "facebook-bmc-flash-layout.dtsi"
+ };
+
+ fmc_flash1: flash@1 {
+ status = "okay";
+ m25p,fast-read;
+ label = "spi0.1";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ flash1@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>;
+};
--
2.17.1

2019-11-01 10:10:02

by Joel Stanley

[permalink] [raw]
Subject: Re: [PATCH 0/4] ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs

Hi Tao,

On Mon, 21 Oct 2019 at 19:49, Tao Ren <[email protected]> wrote:
>
> 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

>
> 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
>

2019-11-01 10:14:23

by Joel Stanley

[permalink] [raw]
Subject: Re: [PATCH 1/4] ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs

On Mon, 21 Oct 2019 at 19:49, Tao Ren <[email protected]> wrote:
>
> 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.
>

> +
> +&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

> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
> +};

2019-11-01 17:42:25

by Tao Ren

[permalink] [raw]
Subject: Re: [PATCH 0/4] ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs

On Fri, Nov 01, 2019 at 10:08:35AM +0000, Joel Stanley wrote:
> Hi Tao,
>
> On Mon, 21 Oct 2019 at 19:49, Tao Ren <[email protected]> wrote:
> >
> > 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

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

Cheers,

Tao

> >
> > 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
> >

2019-11-01 17:43:59

by Tao Ren

[permalink] [raw]
Subject: Re: [PATCH 1/4] ARM: dts: aspeed: add dtsi for Facebook AST2500 Network BMCs

On Fri, Nov 01, 2019 at 10:12:10AM +0000, Joel Stanley wrote:
> On Mon, 21 Oct 2019 at 19:49, Tao Ren <[email protected]> wrote:
> >
> > 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.
> >
>
> > +
> > +&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

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

Cheers,

Tao

> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
> > +};