All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux dev-5.0] ARM: dts: aspeed: Initial git pull request for Microsoft Olympus BMC
@ 2019-04-25 18:28 Hongwei Zhang
  2019-04-29  7:25 ` Joel Stanley
  2019-05-02  3:36 ` Andrew Jeffery
  0 siblings, 2 replies; 3+ messages in thread
From: Hongwei Zhang @ 2019-04-25 18:28 UTC (permalink / raw)
  To: Joel Stanley, openbmc; +Cc: Hongwei Zhang, Andrew Jeffery, Brad Bishop

Olympus is a Microsoft OCP platform equipped with Aspeed 2400 BMC
SoC.
Tested: meta-olympus has been tested on an ASPEED AST2400 EVB board
        and MT Olympus server.
        The U-boot and kernel start and run as expected.

Signed-off-by: Hongwei Zhang <hongweiz@ami.com>
---
 arch/arm/boot/dts/Makefile                   |   3 +-
 arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts | 219 +++++++++++++++++++++++++++
 2 files changed, 221 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index bd40148..34c0b7a0 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1247,4 +1247,5 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-opp-witherspoon.dtb \
 	aspeed-bmc-opp-zaius.dtb \
 	aspeed-bmc-portwell-neptune.dtb \
-	aspeed-bmc-quanta-q71l.dtb
+	aspeed-bmc-quanta-q71l.dtb \
+	aspeed-bmc-opp-olympus.dts
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts
new file mode 100644
index 0000000..8b4b00d0
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts
@@ -0,0 +1,219 @@
+//SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+#include "aspeed-g4.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+
+/ {
+	model = "Olympus BMC";
+	compatible = "microsoft,olympus-bmc", "aspeed,ast2400";
+
+	chosen {
+		stdout-path = &uart5;
+		bootargs = "console=ttyS4,115200 earlyprintk";
+	};
+
+	memory@40000000 {
+		reg = <0x40000000 0x20000000>;
+	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		vga_memory: framebuffer@5f000000 {
+			no-map;
+			reg = <0x5f000000 0x01000000>; /* 16M */
+		};
+
+		flash_memory: region@98000000 {
+			no-map;
+			reg = <0x98000000 0x01000000>; /* 16MB */
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		bmc_heartbeat {
+			gpios = <&gpio ASPEED_GPIO(B, 0) GPIO_ACTIVE_LOW>;
+		};
+
+		power_green {
+			gpios = <&gpio ASPEED_GPIO(U, 2) GPIO_ACTIVE_HIGH>;
+		};
+
+		power_amber {
+			gpios = <&gpio ASPEED_GPIO(U, 3) GPIO_ACTIVE_HIGH>;
+		};
+
+		identify {
+			gpios = <&gpio ASPEED_GPIO(Q, 5) GPIO_ACTIVE_LOW>;
+		};
+
+		fault {
+			gpios = <&gpio ASPEED_GPIO(A, 1) GPIO_ACTIVE_LOW>;
+		};
+	};
+
+
+	iio-hwmon {
+		compatible = "iio-hwmon";
+		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
+		<&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>;
+	};
+};
+
+&adc {
+	status = "okay";
+};
+
+&fmc {
+	status = "okay";
+
+	flash@0 {
+		status = "okay";
+		m25p,fast-read;
+		label = "bmc";
+#include "openbmc-flash-layout.dtsi"
+	};
+};
+
+&spi {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_spi1debug_default>;
+
+	flash@0 {
+		status = "okay";
+		m25p,fast-read;
+		label = "pnor";
+	};
+};
+
+&pinctrl {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_flbusy_default &pinctrl_flwp_default
+			&pinctrl_vgahs_default &pinctrl_vgavs_default
+			&pinctrl_ddcclk_default &pinctrl_ddcdat_default>;
+};
+
+&uart5 {
+	status = "okay";
+};
+
+&mac0 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
+};
+
+&i2c0 {
+	status = "okay";
+};
+
+&i2c1 {
+	status = "okay";
+
+	tmp421@4c {
+		compatible = "ti,tmp421";
+		reg = <0x4c>;
+	};
+};
+
+&i2c2 {
+	status = "okay";
+};
+
+&i2c3 {
+	status = "okay";
+};
+
+&i2c4 {
+	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
+	clock-frequency = <100000>;
+
+	slave-mqueue@20 {
+		compatible = "slave-ipmb";
+		reg = <0x40000020>;
+	};
+};
+
+&i2c5 {
+	status = "okay";
+};
+
+&i2c6 {
+	status = "okay";
+
+	tmp421@4c {
+		compatible = "ti,tmp421";
+		reg = <0x4c>;
+	};
+};
+
+&i2c7 {
+	status = "okay";
+};
+
+&vuart {
+	status = "okay";
+};
+
+&wdt2 {
+	status = "okay";
+};
+
+&lpc_ctrl {
+	status = "okay";
+	memory-region = <&flash_memory>;
+	flash = <&spi>;
+};
+
+&mbox {
+	status = "okay";
+};
+
+&pwm_tacho {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_pwm0_default
+			&pinctrl_pwm1_default
+			&pinctrl_pwm2_default
+			&pinctrl_pwm3_default>;
+
+	fan@0 {
+		reg = <0x00>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x00>;
+	};
+
+	fan@1 {
+		reg = <0x01>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x01>;
+	};
+
+	fan@2 {
+		reg = <0x02>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x02>;
+	};
+
+	fan@3 {
+		reg = <0x03>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x03>;
+	};
+
+	fan@4 {
+		reg = <0x04>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x04>;
+	};
+
+	fan@5 {
+		reg = <0x05>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x05>;
+	};
+
+};
-- 
2.7.4


Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to American Megatrends, Inc.  This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited.  Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH linux dev-5.0] ARM: dts: aspeed: Initial git pull request for Microsoft Olympus BMC
  2019-04-25 18:28 [PATCH linux dev-5.0] ARM: dts: aspeed: Initial git pull request for Microsoft Olympus BMC Hongwei Zhang
@ 2019-04-29  7:25 ` Joel Stanley
  2019-05-02  3:36 ` Andrew Jeffery
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Stanley @ 2019-04-29  7:25 UTC (permalink / raw)
  To: Hongwei Zhang; +Cc: OpenBMC Maillist, Andrew Jeffery, Brad Bishop

Hi Hongwei,

Thanks for the patch. It looks good. I've made some minor suggestions
below that we should try to fix before merging.

The subject needs work. Take a look at the other patches:

git log --oneline arch/arm/boot/dts/

Something like:

ARM: dts: aspeed: Add Microsoft Olympus OCP BMC

On Thu, 25 Apr 2019 at 18:29, Hongwei Zhang <hongweiz@ami.com> wrote:
>
> Olympus is a Microsoft OCP platform equipped with Aspeed 2400 BMC
> SoC.

Nice.

> Tested: meta-olympus has been tested on an ASPEED AST2400 EVB board
>         and MT Olympus server.
>         The U-boot and kernel start and run as expected.

This is nice to know, however we don't generally put this in the
commit message for the kernel. It's up to you.

>
> Signed-off-by: Hongwei Zhang <hongweiz@ami.com>
> ---
>  arch/arm/boot/dts/Makefile                   |   3 +-
>  arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts | 219 +++++++++++++++++++++++++++
>  2 files changed, 221 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index bd40148..34c0b7a0 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1247,4 +1247,5 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
>         aspeed-bmc-opp-witherspoon.dtb \
>         aspeed-bmc-opp-zaius.dtb \
>         aspeed-bmc-portwell-neptune.dtb \
> -       aspeed-bmc-quanta-q71l.dtb
> +       aspeed-bmc-quanta-q71l.dtb \
> +       aspeed-bmc-opp-olympus.dts

'opp' means openpower. I think Olympus is an x86 system, so it should
not have the opp prefix. The vendor (microsoft?) would be appropriate.

This list is sorted alphabetically.

> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts
> new file mode 100644
> index 0000000..8b4b00d0
> --- /dev/null
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts
> @@ -0,0 +1,219 @@
> +//SPDX-License-Identifier: GPL-2.0+

Missing  space. It should look something like this:

// SPDX-License-Identifier: GPL-2.0+
// Copyright (C) Company Name 2019

> +/dts-v1/;
> +
> +#include "aspeed-g4.dtsi"
> +#include <dt-bindings/gpio/aspeed-gpio.h>
> +
> +/ {
> +       model = "Olympus BMC";
> +       compatible = "microsoft,olympus-bmc", "aspeed,ast2400";
> +
> +       chosen {
> +               stdout-path = &uart5;
> +               bootargs = "console=ttyS4,115200 earlyprintk";
> +       };
> +
> +       memory@40000000 {
> +               reg = <0x40000000 0x20000000>;
> +       };
> +
> +       reserved-memory {
> +               #address-cells = <1>;
> +               #size-cells = <1>;
> +               ranges;
> +
> +               vga_memory: framebuffer@5f000000 {
> +                       no-map;
> +                       reg = <0x5f000000 0x01000000>; /* 16M */
> +               };
> +
> +               flash_memory: region@98000000 {

See my comments below about this node.

> +                       no-map;
> +                       reg = <0x98000000 0x01000000>; /* 16MB */
> +               };
> +       };
> +

> +&i2c4 {
> +       status = "okay";
> +       #address-cells = <1>;
> +       #size-cells = <0>;
> +       clock-frequency = <100000>;
> +
> +       slave-mqueue@20 {
> +               compatible = "slave-ipmb";

Is this for a driver you have not yet submitted?

If you add device tree bindings for drivers that are not in the tree
then you run the risk of changes being made in review that cause the
two to be out of sync. I suggest submitting your driver for inclusion.

> +               reg = <0x40000020>;
> +       };
> +};

> +
> +&lpc_ctrl {
> +       status = "okay";
> +       memory-region = <&flash_memory>;

Are you sure you use this feature of the driver?

If you are adding this only to enable the lpc clocks, the driver has
recently been modified so the memory-region is not required.

> +       flash = <&spi>;
> +};

> --
> 2.7.4
>
>
> Please consider the environment before printing this email.
>
> The information contained in this message may be confidential and proprietary to American Megatrends, Inc.  This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited.  Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.

This message doe snot make sense in an email posted to the public list.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH linux dev-5.0] ARM: dts: aspeed: Initial git pull request for Microsoft Olympus BMC
  2019-04-25 18:28 [PATCH linux dev-5.0] ARM: dts: aspeed: Initial git pull request for Microsoft Olympus BMC Hongwei Zhang
  2019-04-29  7:25 ` Joel Stanley
@ 2019-05-02  3:36 ` Andrew Jeffery
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Jeffery @ 2019-05-02  3:36 UTC (permalink / raw)
  To: Hongwei Zhang, Joel Stanley, openbmc; +Cc: Brad Bishop



On Fri, 26 Apr 2019, at 03:59, Hongwei Zhang wrote:
> Olympus is a Microsoft OCP platform equipped with Aspeed 2400 BMC
> SoC.
> Tested: meta-olympus has been tested on an ASPEED AST2400 EVB board
>         and MT Olympus server.
>         The U-boot and kernel start and run as expected.
> 
> Signed-off-by: Hongwei Zhang <hongweiz@ami.com>
> ---
>  arch/arm/boot/dts/Makefile                   |   3 +-
>  arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts | 219 +++++++++++++++++++++++++++
>  2 files changed, 221 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index bd40148..34c0b7a0 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1247,4 +1247,5 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
>  	aspeed-bmc-opp-witherspoon.dtb \
>  	aspeed-bmc-opp-zaius.dtb \
>  	aspeed-bmc-portwell-neptune.dtb \
> -	aspeed-bmc-quanta-q71l.dtb
> +	aspeed-bmc-quanta-q71l.dtb \
> +	aspeed-bmc-opp-olympus.dts
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts 
> b/arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts
> new file mode 100644
> index 0000000..8b4b00d0
> --- /dev/null
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-olympus.dts
> @@ -0,0 +1,219 @@
> +//SPDX-License-Identifier: GPL-2.0+
> +/dts-v1/;
> +
> +#include "aspeed-g4.dtsi"
> +#include <dt-bindings/gpio/aspeed-gpio.h>
> +
> +/ {
> +	model = "Olympus BMC";
> +	compatible = "microsoft,olympus-bmc", "aspeed,ast2400";
> +
> +	chosen {
> +		stdout-path = &uart5;
> +		bootargs = "console=ttyS4,115200 earlyprintk";
> +	};
> +
> +	memory@40000000 {
> +		reg = <0x40000000 0x20000000>;
> +	};
> +
> +	reserved-memory {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges;
> +
> +		vga_memory: framebuffer@5f000000 {
> +			no-map;
> +			reg = <0x5f000000 0x01000000>; /* 16M */
> +		};
> +
> +		flash_memory: region@98000000 {
> +			no-map;
> +			reg = <0x98000000 0x01000000>; /* 16MB */
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		bmc_heartbeat {
> +			gpios = <&gpio ASPEED_GPIO(B, 0) GPIO_ACTIVE_LOW>;
> +		};
> +
> +		power_green {
> +			gpios = <&gpio ASPEED_GPIO(U, 2) GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		power_amber {
> +			gpios = <&gpio ASPEED_GPIO(U, 3) GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		identify {
> +			gpios = <&gpio ASPEED_GPIO(Q, 5) GPIO_ACTIVE_LOW>;
> +		};
> +
> +		fault {
> +			gpios = <&gpio ASPEED_GPIO(A, 1) GPIO_ACTIVE_LOW>;
> +		};
> +	};
> +
> +
> +	iio-hwmon {
> +		compatible = "iio-hwmon";
> +		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
> +		<&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>;
> +	};
> +};
> +
> +&adc {
> +	status = "okay";
> +};
> +
> +&fmc {
> +	status = "okay";
> +
> +	flash@0 {
> +		status = "okay";
> +		m25p,fast-read;
> +		label = "bmc";
> +#include "openbmc-flash-layout.dtsi"
> +	};
> +};
> +
> +&spi {
> +	status = "okay";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_spi1debug_default>;

Is this how your board is strapped, or is this a copy/paste issue?

You wouldn't be the first board design to make that strapping mistake ;)

> +
> +	flash@0 {
> +		status = "okay";
> +		m25p,fast-read;
> +		label = "pnor";
> +	};
> +};
> +
> +&pinctrl {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_flbusy_default &pinctrl_flwp_default
> +			&pinctrl_vgahs_default &pinctrl_vgavs_default
> +			&pinctrl_ddcclk_default &pinctrl_ddcdat_default>;'

This is likely junk. Please confirm you actually need these pinmux hogs.

> +};
> +
> +&uart5 {
> +	status = "okay";
> +};
> +
> +&mac0 {
> +	status = "okay";
> +
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
> +};
> +
> +&i2c0 {
> +	status = "okay";
> +};
> +
> +&i2c1 {
> +	status = "okay";
> +
> +	tmp421@4c {
> +		compatible = "ti,tmp421";
> +		reg = <0x4c>;
> +	};
> +};
> +
> +&i2c2 {
> +	status = "okay";
> +};
> +
> +&i2c3 {
> +	status = "okay";
> +};
> +
> +&i2c4 {
> +	status = "okay";
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	clock-frequency = <100000>;
> +
> +	slave-mqueue@20 {
> +		compatible = "slave-ipmb";
> +		reg = <0x40000020>;
> +	};
> +};
> +
> +&i2c5 {
> +	status = "okay";
> +};
> +
> +&i2c6 {
> +	status = "okay";
> +
> +	tmp421@4c {
> +		compatible = "ti,tmp421";
> +		reg = <0x4c>;
> +	};
> +};
> +
> +&i2c7 {
> +	status = "okay";
> +};
> +
> +&vuart {
> +	status = "okay";
> +};
> +
> +&wdt2 {
> +	status = "okay";
> +};
> +
> +&lpc_ctrl {
> +	status = "okay";
> +	memory-region = <&flash_memory>;
> +	flash = <&spi>;
> +};
> +
> +&mbox {
> +	status = "okay";
> +};
> +
> +&pwm_tacho {
> +	status = "okay";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_pwm0_default
> +			&pinctrl_pwm1_default
> +			&pinctrl_pwm2_default
> +			&pinctrl_pwm3_default>;

You need to mux all the pins you're using, which appears to be pwm0-5.

Cheers,

Andrew

> +
> +	fan@0 {
> +		reg = <0x00>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x00>;
> +	};
> +
> +	fan@1 {
> +		reg = <0x01>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x01>;
> +	};
> +
> +	fan@2 {
> +		reg = <0x02>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x02>;
> +	};
> +
> +	fan@3 {
> +		reg = <0x03>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x03>;
> +	};
> +
> +	fan@4 {
> +		reg = <0x04>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x04>;
> +	};
> +
> +	fan@5 {
> +		reg = <0x05>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x05>;
> +	};
> +
> +};
> -- 
> 2.7.4
> 
> 
> Please consider the environment before printing this email.
> 
> The information contained in this message may be confidential and 
> proprietary to American Megatrends, Inc.  This communication is 
> intended to be read only by the individual or entity to whom it is 
> addressed or by their designee. If the reader of this message is not 
> the intended recipient, you are on notice that any distribution of this 
> message, in any form, is strictly prohibited.  Please promptly notify 
> the sender by reply e-mail or by telephone at 770-246-8600, and then 
> delete or destroy all copies of the transmission.
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-02  3:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-25 18:28 [PATCH linux dev-5.0] ARM: dts: aspeed: Initial git pull request for Microsoft Olympus BMC Hongwei Zhang
2019-04-29  7:25 ` Joel Stanley
2019-05-02  3:36 ` Andrew Jeffery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.