diff mbox series

[u-boot,v2019.04-aspeed-openbmc,v2] ARM: dts: Aspeed: Add Facebook Harma DTS

Message ID 20240605135401.3119532-1-peteryin.openbmc@gmail.com
State New
Headers show
Series [u-boot,v2019.04-aspeed-openbmc,v2] ARM: dts: Aspeed: Add Facebook Harma DTS | expand

Commit Message

Peter Yin June 5, 2024, 1:54 p.m. UTC
Initial introduction of Facebook Harma
equipped with Aspeed 2600 BMC SoC.

Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
---
Change log:
v1 -> v2
 - Revise common to harma

v1
 - Create facebook common dts
---
 arch/arm/dts/Makefile          |  1 +
 arch/arm/dts/ast2600-harma.dts | 66 ++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 arch/arm/dts/ast2600-harma.dts

Comments

Andrew Jeffery June 6, 2024, 2:41 a.m. UTC | #1
On Wed, 2024-06-05 at 21:54 +0800, Peter Yin wrote:
> Initial introduction of Facebook Harma
> equipped with Aspeed 2600 BMC SoC.
> 
> Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
> ---
> Change log:
> v1 -> v2
>  - Revise common to harma
> 
> v1
>  - Create facebook common dts
> ---
>  arch/arm/dts/Makefile          |  1 +
>  arch/arm/dts/ast2600-harma.dts | 66 ++++++++++++++++++++++++++++++++++

The discussion I was having with Patrick was we could make this e.g.
ast2600-facebook.dts ...

>  2 files changed, 67 insertions(+)
>  create mode 100644 arch/arm/dts/ast2600-harma.dts
> 
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 6f4b4d8a17..cb96c0a673 100755
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -688,6 +688,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
>  	ast2600-evb.dtb \
>  	ast2600-fpga.dtb \
>  	ast2600-greatlakes.dtb \
> +	ast2600-harma.dtb \
>  	ast2600-intel.dtb \
>  	ast2600-intel.dtb \
>  	ast2600-ncsi.dtb \
> diff --git a/arch/arm/dts/ast2600-harma.dts b/arch/arm/dts/ast2600-harma.dts
> new file mode 100644
> index 0000000000..11d6d5d60c
> --- /dev/null
> +++ b/arch/arm/dts/ast2600-harma.dts
> @@ -0,0 +1,66 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +// Copyright (c) 2024 Meta Platforms Inc.
> +/dts-v1/;
> +
> +#include "ast2600-u-boot.dtsi"
> +
> +/ {
> +	model = "Facebook Harma BMC";
> +	compatible = "facebook,harma-bmc", "aspeed,ast2600";

... and then just list the compatibles for the concrete platforms here,
like IBM does for P10.

That way your patch for Minerva becomes a 1-line change here.

Can you please send a series doing as much?

Cheers,

Andrew
diff mbox series

Patch

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 6f4b4d8a17..cb96c0a673 100755
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -688,6 +688,7 @@  dtb-$(CONFIG_ARCH_ASPEED) += \
 	ast2600-evb.dtb \
 	ast2600-fpga.dtb \
 	ast2600-greatlakes.dtb \
+	ast2600-harma.dtb \
 	ast2600-intel.dtb \
 	ast2600-intel.dtb \
 	ast2600-ncsi.dtb \
diff --git a/arch/arm/dts/ast2600-harma.dts b/arch/arm/dts/ast2600-harma.dts
new file mode 100644
index 0000000000..11d6d5d60c
--- /dev/null
+++ b/arch/arm/dts/ast2600-harma.dts
@@ -0,0 +1,66 @@ 
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2024 Meta Platforms Inc.
+/dts-v1/;
+
+#include "ast2600-u-boot.dtsi"
+
+/ {
+	model = "Facebook Harma BMC";
+	compatible = "facebook,harma-bmc", "aspeed,ast2600";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x40000000>;
+	};
+
+	chosen {
+		stdout-path = &uart5;
+	};
+
+	aliases {
+		spi0 = &fmc;
+	};
+
+	cpus {
+		cpu@0 {
+			clock-frequency = <800000000>;
+		};
+		cpu@1 {
+			clock-frequency = <800000000>;
+		};
+	};
+};
+
+&uart5 {
+	u-boot,dm-pre-reloc;
+	status = "okay";
+};
+
+&sdrammc {
+	clock-frequency = <400000000>;
+};
+
+&fmc {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fmcquad_default>;
+
+	flash@0 {
+		status = "okay";
+		spi-max-frequency = <50000000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+	};
+
+	flash@1 {
+		status = "okay";
+		spi-max-frequency = <50000000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+	};
+};
+
+&hace {
+	status = "okay";
+};