[dev-4.7 patch 5/5] arch/arm: introduce support for Mallanox evb aspeed 2500 config and dts flavors
Vadim Pasternak
vadimp at mellanox.com
Wed Aug 17 15:31:38 AEST 2016
> -----Original Message-----
> From: joel.stan at gmail.com [mailto:joel.stan at gmail.com] On Behalf Of Joel
> Stanley
> Sent: Wednesday, August 17, 2016 8:14 AM
> To: Vadim Pasternak <vadimp at mellanox.com>
> Cc: OpenBMC Maillist <openbmc at lists.ozlabs.org>; Jiri Pirko
> <jiri at mellanox.com>; Michael Shych <michaelsh at mellanox.com>
> Subject: Re: [dev-4.7 patch 5/5] arch/arm: introduce support for Mallanox evb
> aspeed 2500 config and dts flavors
>
> On Wed, Aug 10, 2016 at 4:33 PM, <vadimp at mellanox.com> wrote:
> > From: Vadim Pasternak <vadimp at mellanox.com>
> >
> > Add kernel configuration and dts files.
> >
> > Signed-off-by: Vadim Pasternak <vadimp at mellanox.com>
> > ---
> > arch/arm/boot/dts/Makefile | 3 +-
> > arch/arm/boot/dts/aspeed-bmc-mlx-flash-layout.dtsi | 32 +
> > arch/arm/boot/dts/aspeed-g5-mlx.dtsi | 429 +++
> > arch/arm/boot/dts/mlx-ast2500-bmc.dts | 109 +
> > arch/arm/configs/mlx_bmc_defconfig | 2786
> ++++++++++++++++++++
> > 5 files changed, 3358 insertions(+), 1 deletion(-) create mode
> > 100644 arch/arm/boot/dts/aspeed-bmc-mlx-flash-layout.dtsi
> > create mode 100644 arch/arm/boot/dts/aspeed-g5-mlx.dtsi
> > create mode 100644 arch/arm/boot/dts/mlx-ast2500-bmc.dts
> > create mode 100644 arch/arm/configs/mlx_bmc_defconfig
> >
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index 048fbb5..2e364e6 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -895,7 +895,8 @@ dtb-$(CONFIG_ARCH_ASPEED) += aspeed-bmc-opp-
> palmetto.dtb \
> > aspeed-bmc-opp-firestone.dtb \
> > aspeed-bmc-opp-garrison.dtb \
> > aspeed-bmc-opp-witherspoon.dtb \
> > - aspeed-ast2500-evb.dtb
> > + aspeed-ast2500-evb.dtb \
> > + mlx-ast2500-bmc.dtb
> > endif
> >
> > dtstree := $(srctree)/$(src)
> > diff --git a/arch/arm/boot/dts/aspeed-bmc-mlx-flash-layout.dtsi
> > b/arch/arm/boot/dts/aspeed-bmc-mlx-flash-layout.dtsi
> > new file mode 100644
> > index 0000000..1c5ae2b
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/aspeed-bmc-mlx-flash-layout.dtsi
> > @@ -0,0 +1,32 @@
> > +/* 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 0x60000 >;
> > + label = "u-boot";
> > + };
> > + u-boot-env {
> > + reg = < 0x60000 0x30000 >;
> > + label = "u-boot-env";
> > + };
> > + kernel {
> > + reg = < 0x90000 0x27e000 >;
> > + label = "kernel";
> > + };
> > + dtb {
> > + reg = < 0x30e000 0x2000 >;
> > + label = "dtb";
> > + };
> > + initramfs {
> > + reg = < 0x310000 0x1c0000 >;
> > + label = "initramfs";
> > + };
> > + rofs {
> > + reg = < 0x4d0000 0x1740000 >;
> > + label = "rofs";
> > + };
> > + rwfs {
> > + reg = < 0x1c10000 0x3f0000 >;
> > + label = "rwfs";
> > + };
>
> This looks like a copy of the existing layout. You don't need to create your own.
>
> > diff --git a/arch/arm/boot/dts/aspeed-g5-mlx.dtsi
> > b/arch/arm/boot/dts/aspeed-g5-mlx.dtsi
> > new file mode 100644
> > index 0000000..0f4cce9
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/aspeed-g5-mlx.dtsi
> > @@ -0,0 +1,429 @@
> > +#include "skeleton.dtsi"
> > +
> > +/ {
> > + model = "Aspeed BMC";
> > + compatible = "aspeed,ast2500";
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + interrupt-parent = <&vic>;
> > +
>
> This looks to be a copy of the existing aspeed-g5.dtsi. You should include that in
> your .dts file instead of duplicating it.
We have in this file peci, jtag, pwm and we are adding now usb.
We also wanted to change interrupt level sensitivity to LEVEL_HIGH.
Currently, using aspeed-g5 we are getting all interrupts as edge. According to datasheet most should be level. Possibly this is a reason of I2C failure (which we experienced also with 4.7).
>
> > diff --git a/arch/arm/boot/dts/mlx-ast2500-bmc.dts
> > b/arch/arm/boot/dts/mlx-ast2500-bmc.dts
> > new file mode 100644
> > index 0000000..0817a67
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/mlx-ast2500-bmc.dts
> > @@ -0,0 +1,109 @@
> > +/dts-v1/;
> > +
> > +#include <dt-bindings/thermal/thermal.h> #include
> > +<dt-bindings/pwm/pwm.h> #include "aspeed-g5-mlx.dtsi"
> > +
> > +/ {
> > + model = "AST2500 EVB";
>
> If this is the ast2500 evb, you do not need to copy the dts - you can use the
> existing one.
>
> However this looks to be different. In that case, make the model name be that
> of the system.
>
> > + compatible = "mellanox,mlx-bmc", "aspeed,ast2500-evb",
> > + "aspeed,ast2500";
>
> Drop the ast2500-evb compat string.
>
> > +
> > + aliases {
> > + serial4 = &uart5;
> > + };
> > +
> > + aliases {
> > + serial0 = &uart5;
> > + };
>
> You can combine these two:
>
>
> aliases {
> serial0 = &uart5;
> serial4 = &uart5;
> };
>
> However this highlights that you're creating two aliases for the same uart. I
> doubt this was your intention.
>
> > +
> > + chosen {
> > + stdout-path = &uart5;
> > + bootargs = "console=ttyS4,115200n8";
> > + };
> > +
> > + memory {
> > + reg = <0x80000000 0x20000000>;
> > + };
> >
>
> > diff --git a/arch/arm/configs/mlx_bmc_defconfig
> > b/arch/arm/configs/mlx_bmc_defconfig
> > new file mode 100644
> > index 0000000..b381dc5
> > --- /dev/null
> > +++ b/arch/arm/configs/mlx_bmc_defconfig
>
> Upstream do not like adding many defconfigs. We have one for the
> ast2500 and one for the ast2400 series. I suggest adding options to the
> aspeed_g5_defconfig.
We have a big gap between aspeed_g5_defconfig and our flavor of that (LED, SWITCHDEV). Also we would like to get rid of using JFFS2 and move to UBI.
Would it be possible to add all that to aspeed_g5_defconfig?
By the way, I see that in 4.7 upstream you already added some minimal stuff for Aspeed SoC.
Do you have some plan regarding upstream other stuff to kernel?
When you think it could happen?
And are you going to submit upstream all Aspeed files together or you are planning to do it in some particular order?
>
> > @@ -0,0 +1,2786 @@
> > +#
> > +# Automatically generated file; DO NOT EDIT.
> > +# Linux/arm 4.6.4 Kernel Configuration
>
> This needs to be against the dev-4.7 branch.
More information about the openbmc
mailing list