This adds platform code and the device tree for the Phytium Durian Board.
The initial support comprises the UART the GMAC and the PCIE.
v3:
- Change the board name from ft2004 to durian.
The dts does not on mainline Kernel. @ Kever Yang
- Add pcie driver and boot kernel from scsi-pci card.
Add README about durian board.
The system initialization is worked in BPF that
we do not want to open source.
But the hex file can be gitted referring to the board README. @Tom
v2:
- Some printf() are removed or replaced by debug(). @Tom
- The ft2004_defconfig file is generated with savedefconfig.
@Tom, @Heinrich
Cc: Kever Yang
Cc: Tom Rini
Cc: Heinrich Schuchardt
Signed-off-by: Steven Hao
---
MAINTAINERS | 7 ++
arch/arm/Kconfig | 8 ++
arch/arm/dts/Makefile| 2 +
arch/arm/dts/phytium-durian.dts | 45 +
board/phytium/durian/Kconfig | 12 +++
board/phytium/durian/MAINTAINERS | 8 ++
board/phytium/durian/Makefile| 9 ++
board/phytium/durian/README | 65 +
board/phytium/durian/cpu.h | 23 +
board/phytium/durian/durian.c| 110 +
configs/durian_defconfig | 36 +++
drivers/pci/Kconfig | 7 ++
drivers/pci/Makefile | 1 +
drivers/pci/pcie_phytium.c | 200 +++
include/configs/durian.h | 44 +
15 files changed, 577 insertions(+)
create mode 100644 arch/arm/dts/phytium-durian.dts
create mode 100644 board/phytium/durian/Kconfig
create mode 100644 board/phytium/durian/MAINTAINERS
create mode 100644 board/phytium/durian/Makefile
create mode 100644 board/phytium/durian/README
create mode 100644 board/phytium/durian/cpu.h
create mode 100644 board/phytium/durian/durian.c
create mode 100644 configs/durian_defconfig
create mode 100644 drivers/pci/pcie_phytium.c
create mode 100644 include/configs/durian.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 2ef2976..1ce7498 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -472,6 +472,13 @@ S: Maintained
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
F: arch/arm/mach-zynqmp-r5/
+ARM PHYTIUM
+M: liuhao
+M: shuyiqi
+S: Maintained
+F: drivers/pci/pcie_phytium.c
+F: arch/arm/dts/phytium-durian.dts
+
BINMAN
M: Simon Glass
S: Maintained
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1df2aba..2e2416b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1635,6 +1635,13 @@ config ARCH_ASPEED
select OF_CONTROL
imply CMD_DM
+config TARGET_DURIAN
+ bool "Support Phytium Durian Platform"
+ select ARM64
+ help
+ Support for durian platform.
+ It has 2GB Sdram, uart, gmac and pcie.
+
endchoice
config ARCH_SUPPORT_TFABOOT
@@ -1835,6 +1842,7 @@ source "board/woodburn/Kconfig"
source "board/xilinx/Kconfig"
source "board/xilinx/zynq/Kconfig"
source "board/xilinx/zynqmp/Kconfig"
+source "board/phytium/durian/Kconfig"
source "arch/arm/Kconfig.debug"
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7d1de94..9336426 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -822,6 +822,8 @@ dtb-$(CONFIG_TARGET_VEXPRESS_CA5X2) += vexpress-v2p-ca5s.dtb
dtb-$(CONFIG_TARGET_VEXPRESS_CA9X4) += vexpress-v2p-ca9.dtb
dtb-$(CONFIG_TARGET_VEXPRESS_CA15_TC2) += vexpress-v2p-ca15_a7.dtb
+dtb-$(CONFIG_TARGET_DURIAN) += phytium-durian.dtb
+
targets += $(dtb-y)
# Add any required device tree compiler flags here
diff --git a/arch/arm/dts/phytium-durian.dts b/arch/arm/dts/phytium-durian.dts
new file mode 100644
index 000..811d50b
--- /dev/null
+++ b/arch/arm/dts/phytium-durian.dts
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2019, Phytium Ltd.
+ * shuyiqi
+ */
+
+/dts-v1/;
+
+/ {
+ model = "Phytium Durian";
+ compatible = "phytium,durian";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ pcie-controller@4000 {
+ compatible = "phytium,pcie-host-1.0";
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ reg = <0x0 0x4000 0x0 0x1000>;
+ bus-range = <0x0 0xff>;
+ ranges = <0x100 0x0 0x0 0x0 0x5000 0x0 0xF0>,
+ <0x200 0x0 0x5800 0x0 0x5800 0x0 0x2800>,
+ <0x4300 0x10 0x 0x10 0x 0x10 0x>;
+ };
+
+ ethernet@2820c000 {
+ compatible = "st,stm32-dwmac";
+ reg = <0x0 0x2820C000 0x0 0x2000>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet@2821 {
+ compatible = "st,stm32-dwmac";
+ reg = <0x0 0x2821 0x0 0x2000>;
+ phy-mode = "rgmii";
+ };
+
+ uart@28001000 {
+ compatible = "arm,pl011";
+ reg = <0x0 0x28