Re: [PATCH] ARM: dts: aspeed: Add Mihawk BMC platform

2019-07-30 Thread Andrew Jeffery
Hello Ben,

Thanks for the patch! Some minor comments below.

On Tue, 30 Jul 2019, at 15:30, Ben Pai wrote:
> The Mihawk BMC is an ASPEED ast2500 based BMC that is part of an
> OpenPower Power9 server.
> 
> This adds the device tree description for most upstream components. It
> is a squashed commit from the OpenBMC kernel tree.

That it's a squashed commit isn't relevant, neither is the mention of the 
OpenBMC
kernel tree. I'd drop both from the commit message.

> 
> Signed-off-by: Ben Pai 
> ---
>  arch/arm/boot/dts/Makefile  |   1 +
>  arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts | 922 
>  2 files changed, 923 insertions(+)
>  create mode 100755 arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index eb6de52c1936..262345544359 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1281,5 +1281,6 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
>   aspeed-bmc-opp-vesnin.dtb \
>   aspeed-bmc-opp-witherspoon.dtb \
>   aspeed-bmc-opp-zaius.dtb \
> + aspeed-bmc-opp-mihawk.dtb \
>   aspeed-bmc-portwell-neptune.dtb \
>   aspeed-bmc-quanta-q71l.dtb
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts 
> b/arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts
> new file mode 100755
> index ..cfa20e0b2939
> --- /dev/null
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts
> @@ -0,0 +1,922 @@
> +/dts-v1/;
> +
> +#include "aspeed-g5.dtsi"
> +#include 
> +#include 
> +
> +/ {
> + model = "Mihawk BMC";
> + compatible = "ibm,mihawk-bmc", "aspeed,ast2500";

I think this should be "ips,mihawk-bmc". You may also need to add "ips" to the
vendor-prefixes list. 

> +
> +
> + chosen {
> + stdout-path = 
> + bootargs = "console=ttyS4,115200 earlyprintk";
> + };
> +
> + memory@8000 {
> + reg = <0x8000 0x2000>; /* address and size of 
> RAM(512MB) */
> + };
> +
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + flash_memory: region@9800 {
> + no-map;
> + reg = <0x9800 0x0400>; /* 64M */
> + };
> +
> + gfx_memory: framebuffer {
> + size = <0x0100>;
> + alignment = <0x0100>;
> + compatible = "shared-dma-pool";
> + reusable;
> + };
> +
> + video_engine_memory: jpegbuffer {
> + size = <0x0200>;/* 32MM */
> + alignment = <0x0100>;
> + compatible = "shared-dma-pool";
> + reusable;
> + };
> + };
> +
> + gpio-keys {
> + compatible = "gpio-keys";
> +
> + air-water {
> + label = "air-water";
> + gpios = < ASPEED_GPIO(F, 6) GPIO_ACTIVE_LOW>;
> + linux,code = ;
> + };
> +
> + checkstop {
> + label = "checkstop";
> + gpios = < ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
> + linux,code = ;
> + };
> +
> + ps0-presence {
> + label = "ps0-presence";
> + gpios = < ASPEED_GPIO(Z, 2) GPIO_ACTIVE_LOW>;
> + linux,code = ;
> + };
> +
> + ps1-presence {
> + label = "ps1-presence";
> + gpios = < ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
> + linux,code = ;
> + };
> + id-button {
> + label = "id-button";
> + gpios = < ASPEED_GPIO(F, 1) GPIO_ACTIVE_LOW>;
> + linux,code = ;
> + };
> + };
> +
> + gpio-keys-polled {
> + compatible = "gpio-keys-polled";
> + #address-cells = <1>;
> + #size-cells = <0>;

Please remove the #address-cells and #size-cells properties, they aren't
relevant for gpio-keys-polled.

> + poll-interval = <1000>;
> +
> + fan0-presence {
> + label = "fan0-presence";
> + gpios = < 9 GPIO_ACTIVE_LOW>;
> + linux,code = <9>;
> + };
> +
> + fan1-presence {
> + label = "fan1-presence";
> + gpios = < 10 GPIO_ACTIVE_LOW>;
> + linux,code = <10>;
> + };
> +
> + fan2-presence {
> + label = "fan2-presence";
> + gpios = < 11 GPIO_ACTIVE_LOW>;
> + linux,code = <11>;
> + };
> +
> + fan3-presence {
> + label = "fan3-presence";
> + gpios = < 12 GPIO_ACTIVE_LOW>;
> + 

[PATCH] ARM: dts: aspeed: Add Mihawk BMC platform

2019-07-30 Thread Ben Pai
The Mihawk BMC is an ASPEED ast2500 based BMC that is part of an
OpenPower Power9 server.

This adds the device tree description for most upstream components. It
is a squashed commit from the OpenBMC kernel tree.

Signed-off-by: Ben Pai 
---
 arch/arm/boot/dts/Makefile  |   1 +
 arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts | 922 
 2 files changed, 923 insertions(+)
 create mode 100755 arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index eb6de52c1936..262345544359 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1281,5 +1281,6 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
aspeed-bmc-opp-vesnin.dtb \
aspeed-bmc-opp-witherspoon.dtb \
aspeed-bmc-opp-zaius.dtb \
+   aspeed-bmc-opp-mihawk.dtb \
aspeed-bmc-portwell-neptune.dtb \
aspeed-bmc-quanta-q71l.dtb
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts 
b/arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts
new file mode 100755
index ..cfa20e0b2939
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts
@@ -0,0 +1,922 @@
+/dts-v1/;
+
+#include "aspeed-g5.dtsi"
+#include 
+#include 
+
+/ {
+   model = "Mihawk BMC";
+   compatible = "ibm,mihawk-bmc", "aspeed,ast2500";
+
+
+   chosen {
+   stdout-path = 
+   bootargs = "console=ttyS4,115200 earlyprintk";
+   };
+
+   memory@8000 {
+   reg = <0x8000 0x2000>; /* address and size of 
RAM(512MB) */
+   };
+
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+
+   flash_memory: region@9800 {
+   no-map;
+   reg = <0x9800 0x0400>; /* 64M */
+   };
+
+   gfx_memory: framebuffer {
+   size = <0x0100>;
+   alignment = <0x0100>;
+   compatible = "shared-dma-pool";
+   reusable;
+   };
+
+   video_engine_memory: jpegbuffer {
+   size = <0x0200>;/* 32MM */
+   alignment = <0x0100>;
+   compatible = "shared-dma-pool";
+   reusable;
+   };
+   };
+
+   gpio-keys {
+   compatible = "gpio-keys";
+
+   air-water {
+   label = "air-water";
+   gpios = < ASPEED_GPIO(F, 6) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   checkstop {
+   label = "checkstop";
+   gpios = < ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   ps0-presence {
+   label = "ps0-presence";
+   gpios = < ASPEED_GPIO(Z, 2) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   ps1-presence {
+   label = "ps1-presence";
+   gpios = < ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   id-button {
+   label = "id-button";
+   gpios = < ASPEED_GPIO(F, 1) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   gpio-keys-polled {
+   compatible = "gpio-keys-polled";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   poll-interval = <1000>;
+
+   fan0-presence {
+   label = "fan0-presence";
+   gpios = < 9 GPIO_ACTIVE_LOW>;
+   linux,code = <9>;
+   };
+
+   fan1-presence {
+   label = "fan1-presence";
+   gpios = < 10 GPIO_ACTIVE_LOW>;
+   linux,code = <10>;
+   };
+
+   fan2-presence {
+   label = "fan2-presence";
+   gpios = < 11 GPIO_ACTIVE_LOW>;
+   linux,code = <11>;
+   };
+
+   fan3-presence {
+   label = "fan3-presence";
+   gpios = < 12 GPIO_ACTIVE_LOW>;
+   linux,code = <12>;
+   };
+
+   fan4-presence {
+   label = "fan4-presence";
+   gpios = < 13 GPIO_ACTIVE_LOW>;
+   linux,code = <13>;
+   };
+
+   fan5-presence {
+   label = "fan5-presence";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   linux,code = <14>;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   fault {
+   

[PATCH] ARM: dts: aspeed: Add Mihawk BMC platform

2019-07-17 Thread Ben Pai
The Mihawk BMC is an ASPEED ast2500 based BMC that is part of an
OpenPower Power9 server.

This adds the device tree description for most upstream components. It
is a squashed commit from the OpenBMC kernel tree.

Signed-off-by: Ben Pai 
---
 arch/arm/boot/dts/Makefile  |   1 +
 arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts | 922 
 2 files changed, 923 insertions(+)
 create mode 100755 arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index dab2914fa293..5368d657781e 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1274,5 +1274,6 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
aspeed-bmc-opp-romulus.dtb \
aspeed-bmc-opp-witherspoon.dtb \
aspeed-bmc-opp-zaius.dtb \
+aspeed-bmc-opp-mihawk.dtb \
aspeed-bmc-portwell-neptune.dtb \
aspeed-bmc-quanta-q71l.dtb
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts 
b/arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts
new file mode 100755
index ..cfa20e0b2939
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts
@@ -0,0 +1,922 @@
+/dts-v1/;
+
+#include "aspeed-g5.dtsi"
+#include 
+#include 
+
+/ {
+   model = "Mihawk BMC";
+   compatible = "ibm,mihawk-bmc", "aspeed,ast2500";
+
+
+   chosen {
+   stdout-path = 
+   bootargs = "console=ttyS4,115200 earlyprintk";
+   };
+
+   memory@8000 {
+   reg = <0x8000 0x2000>; /* address and size of 
RAM(512MB) */
+   };
+
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+
+   flash_memory: region@9800 {
+   no-map;
+   reg = <0x9800 0x0400>; /* 64M */
+   };
+
+   gfx_memory: framebuffer {
+   size = <0x0100>;
+   alignment = <0x0100>;
+   compatible = "shared-dma-pool";
+   reusable;
+   };
+
+   video_engine_memory: jpegbuffer {
+   size = <0x0200>;/* 32MM */
+   alignment = <0x0100>;
+   compatible = "shared-dma-pool";
+   reusable;
+   };
+   };
+
+   gpio-keys {
+   compatible = "gpio-keys";
+
+   air-water {
+   label = "air-water";
+   gpios = < ASPEED_GPIO(F, 6) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   checkstop {
+   label = "checkstop";
+   gpios = < ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   ps0-presence {
+   label = "ps0-presence";
+   gpios = < ASPEED_GPIO(Z, 2) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   ps1-presence {
+   label = "ps1-presence";
+   gpios = < ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   id-button {
+   label = "id-button";
+   gpios = < ASPEED_GPIO(F, 1) GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   gpio-keys-polled {
+   compatible = "gpio-keys-polled";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   poll-interval = <1000>;
+
+   fan0-presence {
+   label = "fan0-presence";
+   gpios = < 9 GPIO_ACTIVE_LOW>;
+   linux,code = <9>;
+   };
+
+   fan1-presence {
+   label = "fan1-presence";
+   gpios = < 10 GPIO_ACTIVE_LOW>;
+   linux,code = <10>;
+   };
+
+   fan2-presence {
+   label = "fan2-presence";
+   gpios = < 11 GPIO_ACTIVE_LOW>;
+   linux,code = <11>;
+   };
+
+   fan3-presence {
+   label = "fan3-presence";
+   gpios = < 12 GPIO_ACTIVE_LOW>;
+   linux,code = <12>;
+   };
+
+   fan4-presence {
+   label = "fan4-presence";
+   gpios = < 13 GPIO_ACTIVE_LOW>;
+   linux,code = <13>;
+   };
+
+   fan5-presence {
+   label = "fan5-presence";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   linux,code = <14>;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   fault {
+