u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: nicholas_zheng@outlook.com
Cc: Tom Rini <trini@konsulko.com>,
	Bharat Gooty <bharat.gooty@broadcom.com>,
	 Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	 Andre Przywara <andre.przywara@arm.com>,
	Fabio Estevam <festevam@gmail.com>,
	 Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Tim Harvey <tharvey@gateworks.com>,
	 Peter Robinson <pbrobinson@gmail.com>,
	Heiko Schocher <hs@denx.de>, Lokesh Vutla <lokeshvutla@ti.com>,
	 Dave Gerlach <d-gerlach@ti.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v7] arm: add initial support for the Phytium Pomelo Board
Date: Tue, 2 Nov 2021 13:07:13 -0500	[thread overview]
Message-ID: <CAL_JsqJ2CkCj=VZewvRX7+dig6PAdezAzYKzH9EmAwG+8kTQmg@mail.gmail.com> (raw)
In-Reply-To: <OSBPR01MB207144E2BFB6C49AE521899DE0D99@OSBPR01MB2071.jpnprd01.prod.outlook.com>

On Mon, Sep 13, 2021 at 12:59 AM <nicholas_zheng@outlook.com> wrote:
>
> From: weichangzheng <nicholas_zheng@outlook.com>
>
> This adds platform code and the device tree for the Phytium Pomelo Board.
> The initial support comprises the UART and the PCIE.
>
> Signed-off-by: weichangzheng <nicholas_zheng@outlook.com>
> Changes since v1:
>         updated to DT
> Changes since v2:
>         Modify some explicit types and macro
> Changes since v3:
>         Modify some SDRAM related macro definitions and distro_bootcmd
> Changes since v4:
>         Modify distro_bootcmd
> Changes since v5:
>         Modify the CPU node description of the DT
> Changes since v6:
>         Modify  DT
> ---
>  arch/arm/Kconfig                 |  20 ++++
>  arch/arm/dts/Makefile            |   1 +
>  arch/arm/dts/phytium-pomelo.dts  | 118 ++++++++++++++++++++++
>  board/phytium/pomelo/Kconfig     |  12 +++
>  board/phytium/pomelo/MAINTAINERS |   8 ++
>  board/phytium/pomelo/Makefile    |  14 +++
>  board/phytium/pomelo/cpu.h       |  73 ++++++++++++++
>  board/phytium/pomelo/ddr.c       | 161 +++++++++++++++++++++++++++++++
>  board/phytium/pomelo/pcie.c      |  60 ++++++++++++
>  board/phytium/pomelo/pll.c       |  73 ++++++++++++++
>  board/phytium/pomelo/pomelo.c    | 118 ++++++++++++++++++++++
>  board/phytium/pomelo/sec.c       |  37 +++++++
>  configs/pomelo_defconfig         |  18 ++++
>  include/configs/pomelo.h         |  44 +++++++++
>  14 files changed, 757 insertions(+)
>  create mode 100644 arch/arm/dts/phytium-pomelo.dts
>  create mode 100644 board/phytium/pomelo/Kconfig
>  create mode 100644 board/phytium/pomelo/MAINTAINERS
>  create mode 100644 board/phytium/pomelo/Makefile
>  create mode 100644 board/phytium/pomelo/cpu.h
>  create mode 100644 board/phytium/pomelo/ddr.c
>  create mode 100644 board/phytium/pomelo/pcie.c
>  create mode 100644 board/phytium/pomelo/pll.c
>  create mode 100644 board/phytium/pomelo/pomelo.c
>  create mode 100644 board/phytium/pomelo/sec.c
>  create mode 100644 configs/pomelo_defconfig
>  create mode 100644 include/configs/pomelo.h
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 0448787b8b..029af85fcb 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1818,6 +1818,25 @@ config TARGET_DURIAN
>           Support for durian platform.
>           It has 2GB Sdram, uart and pcie.
>
> +config TARGET_POMELO
> +       bool "Support Phytium Pomelo Platform"
> +       select ARM64
> +       select DM
> +       select AHCI
> +       select SCSI_AHCI
> +       select AHCI_PCI
> +       select BLK
> +       select PCI
> +       select DM_PCI
> +       select SCSI
> +       select DM_SCSI
> +       select DM_SERIAL
> +       select DM_ETH if NET
> +       imply CMD_PCI
> +       help
> +          Support for pomelo platform.
> +          It has 8GB Sdram, uart and pcie.
> +
>  config TARGET_PRESIDIO_ASIC
>         bool "Support Cortina Presidio ASIC Platform"
>         select ARM64
> @@ -2038,6 +2057,7 @@ source "board/toradex/colibri_pxa270/Kconfig"
>  source "board/variscite/dart_6ul/Kconfig"
>  source "board/vscom/baltos/Kconfig"
>  source "board/phytium/durian/Kconfig"
> +source "board/phytium/pomelo/Kconfig"
>  source "board/xen/xenguest_arm64/Kconfig"
>  source "board/keymile/Kconfig"
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 9fb38682e6..45d0340bd3 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -1107,6 +1107,7 @@ dtb-$(CONFIG_TARGET_MX53PPD) += imx53-ppd.dtb
>  dtb-$(CONFIG_TARGET_TOTAL_COMPUTE) += total_compute.dtb
>
>  dtb-$(CONFIG_TARGET_DURIAN) += phytium-durian.dtb
> +dtb-$(CONFIG_TARGET_POMELO) += phytium-pomelo.dtb
>
>  dtb-$(CONFIG_TARGET_PRESIDIO_ASIC) += ca-presidio-engboard.dtb
>
> diff --git a/arch/arm/dts/phytium-pomelo.dts b/arch/arm/dts/phytium-pomelo.dts
> new file mode 100644
> index 0000000000..4ed97e090d
> --- /dev/null
> +++ b/arch/arm/dts/phytium-pomelo.dts
> @@ -0,0 +1,118 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * dts file for Phytium Pomelo board
> + * Copyright (C) 2021, Phytium Ltd.
> + * lixinde         <lixinde@phytium.com.cn>
> + * weichangzheng   <weichangzheng@phytium.com.cn>
> + */
> +/dts-v1/;
> +
> +/ {
> +       model = "Phytium Pomelo";
> +       compatible = "phytium,d2000";

Again, this should typically have both a board AND SoC compatible strings.

> +       #address-cells = <2>;
> +       #size-cells = <2>;
> +
> +       aliases {
> +               serial0 = &uart0;
> +       };
> +
> +       cpus {
> +               #address-cells = <0x2>;
> +               #size-cells = <0x0>;
> +
> +               cpu0: cpu@0 {
> +                       device_type = "cpu";
> +                       compatible = "arm,armv8";

For the 3rd time, 'arm,armv8' is only valid for emulation models.

> +                       reg = <0x0 0x0>;
> +                       enable-method = "psci";
> +               };
> +
> +               cpu1: cpu@1 {
> +                       device_type = "cpu";
> +                       compatible = "arm,armv8";
> +                       reg = <0x0 0x1>;
> +                       enable-method = "psci";
> +               };
> +
> +               cpu2: cpu@100 {
> +                       device_type = "cpu";
> +                       compatible = "arm,armv8";
> +                       reg = <0x0 0x100>;
> +                       enable-method = "psci";
> +               };
> +
> +               cpu3: cpu@101 {
> +                       device_type = "cpu";
> +                       compatible = "arm,armv8";
> +                       reg = <0x0 0x101>;
> +                       enable-method = "psci";
> +               };
> +
> +               cpu4: cpu@200 {
> +                       device_type = "cpu";
> +                       compatible = "arm,armv8";
> +                       reg = <0x0 0x200>;
> +                       enable-method = "psci";
> +               };
> +
> +               cpu5: cpu@201 {
> +                       device_type = "cpu";
> +                       compatible = "arm,armv8";
> +                       reg = <0x0 0x201>;
> +                       enable-method = "psci";
> +               };
> +
> +               cpu6: cpu@300 {
> +                       device_type = "cpu";
> +                       compatible = "arm,armv8";
> +                       reg = <0x0 0x300>;
> +                       enable-method = "psci";
> +               };
> +
> +               cpu7: cpu@301 {
> +                       device_type = "cpu";
> +                       compatible = "arm,armv8";
> +                       reg = <0x0 0x301>;
> +                       enable-method = "psci";
> +               };
> +       };
> +
> +       clocks {
> +               #address-cells = <2>;
> +               #size-cells = <2>;
> +               ranges;
> +
> +               sysclk_48mhz: clk48mhz {

Move this to the top level. No need for a 'clocks' node.

> +                       compatible = "fixed-clock";
> +                       #clock-cells = <0x0>;
> +                       clock-frequency = <48000000>;
> +                       clock-output-names = "sysclk_48mhz";
> +               };
> +       };
> +
> +       soc {
> +               compatible = "simple-bus";
> +               #address-cells = <2>;
> +               #size-cells = <2>;
> +               ranges;
> +
> +               uart0: serial@28001000 {
> +                       compatible = "arm,pl011";

Missing an 'arm,primecell' compatible string.


> +                       reg = <0x0 0x28001000 0x0 0x1000>;
> +                       clocks = <&sysclk_48mhz>;
> +               };
> +
> +               pcie@40000000 {
> +                       compatible = "pci-host-ecam-generic";
> +                       device_type = "pci";
> +                       #address-cells = <3>;
> +                       #size-cells = <2>;
> +                       reg = <0x0 0x40000000 0x0 0x10000000>;
> +                       bus-range = <0x0 0xff>;

That's the default, you can drop.


> +                       ranges = <0x01000000 0x00 0x00000000 0x0  0x50000000 0x0  0x00F00000>,
> +                        <0x02000000 0x00 0x58000000 0x0  0x58000000 0x0  0x28000000>,
> +                        <0x43000000 0x10 0x00000000 0x10 0x00000000 0x10  0x00000000>;
> +               };
> +       };
> +};

      parent reply	other threads:[~2021-11-02 18:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  5:59 [PATCH v7] arm: add initial support for the Phytium Pomelo Board nicholas_zheng
2021-10-29 15:32 ` Tom Rini
2021-11-02 18:07 ` Rob Herring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL_JsqJ2CkCj=VZewvRX7+dig6PAdezAzYKzH9EmAwG+8kTQmg@mail.gmail.com' \
    --to=robh+dt@kernel.org \
    --cc=andre.przywara@arm.com \
    --cc=bharat.gooty@broadcom.com \
    --cc=d-gerlach@ti.com \
    --cc=festevam@gmail.com \
    --cc=hs@denx.de \
    --cc=jagan@amarulasolutions.com \
    --cc=lokeshvutla@ti.com \
    --cc=nicholas_zheng@outlook.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=pbrobinson@gmail.com \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=tharvey@gateworks.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).