[PATCH dev-5.10 v1] ARM: dts: nuvoton: Add Quanta GBS BMC Device Tree

Joel Stanley joel at jms.id.au
Fri Mar 12 12:20:50 AEDT 2021


On Wed, 10 Mar 2021 at 03:18, George Hung <ghung.quanta at gmail.com> wrote:
>
> Add initial version of device tree for Quanta GBS
> BMC (NPCM730 SoC)
>
> Signed-off-by: George Hung <george.hung at quantatw.com>
> ---
>  arch/arm/boot/dts/Makefile                |    1 +
>  arch/arm/boot/dts/nuvoton-npcm730-gbs.dts | 1233 +++++++++++++++++++++
>  2 files changed, 1234 insertions(+)
>  create mode 100644 arch/arm/boot/dts/nuvoton-npcm730-gbs.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index c57729f40185..82785fe2c8bf 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -340,6 +340,7 @@ dtb-$(CONFIG_ARCH_LPC32XX) += \
>         lpc3250-phy3250.dtb
>  dtb-$(CONFIG_ARCH_NPCM7XX) += \
>         nuvoton-npcm730-gsj.dtb \
> +       nuvoton-npcm730-gbs.dtb \
>         nuvoton-npcm730-kudo.dtb \
>         nuvoton-npcm750-evb.dtb \
>         nuvoton-npcm750-runbmc-olympus.dtb
> diff --git a/arch/arm/boot/dts/nuvoton-npcm730-gbs.dts b/arch/arm/boot/dts/nuvoton-npcm730-gbs.dts
> new file mode 100644
> index 000000000000..15357ae97ec4
> --- /dev/null
> +++ b/arch/arm/boot/dts/nuvoton-npcm730-gbs.dts
> @@ -0,0 +1,1233 @@
> +// SPDX-License-Identifier: GPL-2.0
> +// Copyright (c) 2020 Quanta Computer Inc. George.Hung at quantatw.com
> +
> +/dts-v1/;
> +#include "nuvoton-npcm730.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> +       model = "Quanta GBS Board (Device Tree)";
> +       compatible = "nuvoton,npcm750";

Give your machine a compatible string too. eg:

 compatible = "qanta,gbs-bmc", "nuvoton,npcm750";

> +
> +       ahb {
> +               fiu0: spi at fb000000 {
> +                       pinctrl-names = "default";
> +                       pinctrl-0 = <&spi0cs1_pins>;
> +                       status = "okay";
> +                       spi-nor at 0 {
> +                               compatible = "jedec,spi-nor";
> +                               #address-cells = <1>;
> +                               #size-cells = <1>;
> +                               reg = <0>;
> +                               spi-max-frequency = <19000000>;
> +                               spi-rx-bus-width = <2>;
> +                               label = "bmc";
> +                               partitions at 80000000 {
> +                                       compatible = "fixed-partitions";
> +                                       #address-cells = <1>;
> +                                       #size-cells = <1>;
> +                                       u-boot at 0 {
> +                                               label = "u-boot";
> +                                               reg = <0x0000000 0xf0000>;
> +                                       };
> +                                       image-descriptor at f0000 {
> +                                               label = "image-descriptor";
> +                                               reg = <0xf0000 0x10000>;
> +                                       };
> +                                       hoth-update at 100000 {
> +                                               label = "hoth-update";
> +                                               reg = <0x100000 0x100000>;
> +                                       };

Is this layout common for all nuvoton openbmc machines?

> +                                       kernel at 200000 {
> +                                               label = "kernel";
> +                                               reg = <0x200000 0x500000>;
> +                                       };
> +                                       rofs at 700000 {
> +                                               label = "rofs";
> +                                               reg = <0x700000 0x35f0000>;
> +                                       };
> +                                       rwfs at 3cf0000 {
> +                                               label = "rwfs";
> +                                               reg = <0x3cf0000 0x300000>;
> +                                       };
> +                                       hoth-mailbox at 3ff0000 {
> +                                               label = "hoth-mailbox";
> +                                               reg = <0x3ff0000 0x10000>;
> +                                       };
> +                               };
> +                       };
> +               };

> +
> +               gmac0: eth at f0802000 {

Please take a look at the latest version of the other nuvoton device
trees. They now follow the convention of using phandles to enable
devices. eg:

&gmac {
   status = "okay";
   phy-mode = "rgmii-id";
   snps,eee-force-disable;
};

Please update all of the nodes to use this style.

> +                       status = "okay";
> +                       phy-mode = "rgmii-id";
> +                       snps,eee-force-disable;
> +               };
> +
>


More information about the openbmc mailing list