[PATCH] arm/dts/aspeed: Add minimal Facebook CMM BMC board based on AST2500
Joel Stanley
joel at jms.id.au
Mon Aug 8 16:11:25 AEST 2016
Hey Matthew,
On Thu, Aug 4, 2016 at 8:37 AM, Matthew Conolly <mattconolly at fb.com> wrote:
> A minimal device tree to let the CMM bmc board boot to a console over UART with some drivers functional
Thanks for the patch. It's good to see other boards being added to the tree.
Which git tree is this patch against?
>
> Signed-off-by: Matthew Conolly <mattconolly at fb.com>
> ---
> arch/arm/boot/dts/Makefile | 1 +
> .../dts/aspeed-bmc-facebook-cmm-flash-layout.dtsi | 24 +++++
> arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts | 112 +++++++++++++++++++++
> arch/arm/mach-aspeed/aspeed.c | 5 +-
> 4 files changed, 140 insertions(+), 2 deletions(-)
> create mode 100644 arch/arm/boot/dts/aspeed-bmc-facebook-cmm-flash-layout.dtsi
> create mode 100644 arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 3c27d57..21fe59b 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -843,6 +843,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += aspeed-bmc-opp-palmetto.dtb \
> aspeed-bmc-opp-barreleye.dtb \
> aspeed-bmc-opp-firestone.dtb \
> aspeed-bmc-opp-garrison.dtb \
> + aspeed-bmc-facebook-cmm.dtb \
> aspeed-ast2500-evb.dtb
> endif
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-cmm-flash-layout.dtsi b/arch/arm/boot/dts/aspeed-bmc-facebook-cmm-flash-layout.dtsi
> new file mode 100644
> index 0000000..1b3133f
> --- /dev/null
> +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-cmm-flash-layout.dtsi
> @@ -0,0 +1,24 @@
> +/* This file is the label for the bmc primary flash and its partitions */
> + label = "bmc";
> + #address-cells = < 1 >;
> + #size-cells = < 1 >;
> + u-boot {
> + reg = < 0 0x80000 >;
> + label = "u-boot";
> + };
> + u-boot-env {
> + reg = < 0x60000 0x20000 >;
> + label = "u-boot-env";
> + };
> + kernel {
> + reg = < 0x80000 0x280000 >;
> + label = "kernel";
> + };
> + initramfs {
> + reg = < 0x300000 0x300000 >;
> + label = "initramfs";
> + };
> + pd_rootfs {
> + reg = < 0x4c0000 0x1740000 >;
> + label = "pd_rootfs";
> + };
> diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts
> new file mode 100644
> index 0000000..4ea8e7e
> --- /dev/null
> +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts
> @@ -0,0 +1,112 @@
> +/dts-v1/;
> +
> +#include "aspeed-g5.dtsi"
> +
> +/ {
> + model = "FACEBOOK CMM BMC";
> + compatible = "facebook,cmm-bmc", "aspeed,ast2500";
> +
> + aliases {
> + serial1 = &uart1;
> + };
> +
> + chosen {
> + stdout-path = &uart1;
> + bootargs = "console=ttyS1,115200 earlyprintk";
> + };
> +
> + memory {
> + reg = <0x80000000 0x3f000000>;
> + };
> +
> + ahb {
> + bmc_pnor: fmc at 1e620000 {
> + reg = < 0x1e620000 0x94
> + 0x20000000 0x02000000 >;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "aspeed,fmc";
> + flash at 0 {
> + reg = < 0 >;
> + compatible = "jedec,spi-nor" ;
> +#include "aspeed-bmc-facebook-cmm-flash-layout.dtsi"
> + };
> + };
> + };
> +
> +
> +
> +};
> +
> +&uart1 {
> + status = "okay";
> +};
> +
> +&mac0 {
> + status = "disabled";
> +};
> +
> +&mac1 {
> + status = "okay";
> +};
> +
> +&i2c0 {
> + status = "okay";
> +};
> +
> +&i2c1 {
> + status = "okay";
> +};
> +
> +&i2c2 {
> + status = "okay";
> +};
> +
> +&i2c3 {
> + status = "okay";
> +};
> +
> +&i2c4 {
> + status = "okay";
> +};
> +
> +&i2c5 {
> + status = "okay";
> +
> +// eeprom at 50 {
> +// compatible = "atmel,24c08";
> +// reg = <0xa0>;
> +// };
This should be deleted instead of commented out.
> +};
> +
> +&i2c6 {
> + status = "okay";
> +};
> +
> +&i2c7 {
> + status = "okay";
> +};
> +
> +&i2c8 {
> + status = "okay";
> +};
> +
> +&i2c9 {
> + status = "okay";
> +};
> +
> +&i2c10 {
> + status = "okay";
> +};
> +
> +&i2c11 {
> + status = "okay";
> +};
> +
> +&i2c12 {
> + status = "okay";
> +};
> +
> +&i2c13 {
> + status = "okay";
> +};
> diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
> index db540ac..da03fed 100644
> --- a/arch/arm/mach-aspeed/aspeed.c
> +++ b/arch/arm/mach-aspeed/aspeed.c
> @@ -202,8 +202,9 @@ static void __init do_ast2500evb_setup(void)
>
> static void __init aspeed_init_early(void)
> {
> - // XXX UART stuff to fix to pinmux & co
> - writel(0x02010023, AST_IO(AST_BASE_LPC | 0x9c));
> + if (!of_machine_is_compatible("facebook,cmm-bmc"))
> + /* XXX UART stuff to fix to pinmux & co */
> + writel(0x02010023, AST_IO(AST_BASE_LPC | 0x9c));
Fair enough. This highlights the need for a driver to configure the LPC.
Cheers,
Joel
More information about the openbmc
mailing list