arm: add initial support for the Phytium Durian Board
Subsystems (2)
PATCH v3 1/1 arm: add initial support for the Phytium Durian Board
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
--- 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
MAINTAINERS +7 -0
@@ -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 <[email protected]> +M: shuyiqi <[email protected]> +S: Maintained +F: drivers/pci/pcie_phytium.c +F: arch/arm/dts/phytium-durian.dts + BINMAN M: Simon Glass <[email protected]> S: Maintained
arch/arm/Kconfig +8 -0
@@ -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"
arch/arm/dts/Makefile +2 -0
@@ -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
arch/arm/dts/phytium-durian.dts new file +45 -0
45 lines not on this page · raw message
board/phytium/durian/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_DURIAN + +config SYS_BOARD + default "durian" + +config SYS_VENDOR + default "phytium" + +config SYS_CONFIG_NAME + default "durian" + +endif
board/phytium/durian/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +DURIAN BOARD +M: liuhao <[email protected]> +M: shuyiqi <[email protected]> +S: Maintained +F: board/phytium/durian/* +F: include/configs/durian.h +F: configs/durian_defconfig +
board/phytium/durian/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2019 +# shuyiqi <[email protected]> +# liuhao <[email protected]> +# + +obj-y += durian.o +
board/phytium/durian/README new file +65 -0
65 lines not on this page · raw message
board/phytium/durian/cpu.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* (C) Copyright 2019 +* Phytium Technology Ltd <www.phytium.com> +* shuyiqi <[email protected]> +*/ + +#ifndef _FT_DURIAN_H +#define _FT_DURIAN_H + +/* FLUSH L3 CASHE */ +#define HNF_COUNT 0x8 +#define HNF_PSTATE_REQ (HNF_BASE + 0x10) +#define HNF_PSTATE_STAT (HNF_BASE + 0x18) +#define HNF_PSTATE_OFF 0x0 +#define HNF_PSTATE_SFONLY 0x1 +#define HNF_PSTATE_HALF 0x2 +#define HNF_PSTATE_FULL 0x3 +#define HNF_STRIDE 0x10000 +#define HNF_BASE (unsigned long)(0x3A200000) + +#endif /* _FT_DURIAN_H */ +
board/phytium/durian/durian.c new file +110 -0
110 lines not on this page · raw message
configs/durian_defconfig new file +36 -0
@@ -0,0 +1,36 @@ +CONFIG_ARM=y +CONFIG_ARM_SMCCC=y +CONFIG_TARGET_DURIAN=y +CONFIG_SYS_TEXT_BASE=0x500000 +CONFIG_NR_DRAM_BANKS=1 +# CONFIG_PSCI_RESET is not set +CONFIG_AHCI=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="console=ttyAMA0,115200 earlycon=pl011,0x28001000 root=/dev/sda2 rw" +# CONFIG_DISPLAY_CPUINFO is not set +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_LAST_STAGE_INIT=y +CONFIG_SYS_PROMPT="durian#" +# CONFIG_CMD_LZMADEC is not set +# CONFIG_CMD_UNZIP is not set +CONFIG_CMD_PCI=y +CONFIG_CMD_TFTPPUT=y +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="phytium-durian" +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_DM=y +CONFIG_SCSI_AHCI=y +CONFIG_AHCI_PCI=y +CONFIG_BLK=y +# CONFIG_MMC is not set +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_DM_PCI_COMPAT=y +CONFIG_PCI_PHYTIUM=y +CONFIG_SCSI=y +CONFIG_DM_SCSI=y +CONFIG_DM_SERIAL=y +CONFIG_PL01X_SERIAL=y
drivers/pci/Kconfig +7 -0
@@ -51,6 +51,13 @@ config PCIE_ECAM_GENERIC Say Y here if you want to enable support for generic ECAM-based PCIe host controllers, such as the one emulated by QEMU. +config PCI_PHYTIUM + bool "Phytium PCIe support" + depends on DM_PCI + help + Say Y here if you want to enable PCIe controller support on + Phytium SoCs. + config PCIE_DW_MVEBU bool "Enable Armada-8K PCIe driver (DesignWare core)" depends on DM_PCI
drivers/pci/Makefile +1 -0
@@ -37,6 +37,7 @@ obj-$(CONFIG_PCIE_LAYERSCAPE) += pcie_layerscape_fixup.o obj-$(CONFIG_PCIE_LAYERSCAPE_GEN4) += pcie_layerscape_gen4.o \ pcie_layerscape_gen4_fixup.o obj-$(CONFIG_PCI_XILINX) += pcie_xilinx.o +obj-$(CONFIG_PCI_PHYTIUM) += pcie_phytium.o obj-$(CONFIG_PCIE_INTEL_FPGA) += pcie_intel_fpga.o obj-$(CONFIG_PCI_KEYSTONE) += pcie_dw_ti.o obj-$(CONFIG_PCIE_MEDIATEK) += pcie_mediatek.o
drivers/pci/pcie_phytium.c new file +200 -0
200 lines not on this page · raw message
include/configs/durian.h new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v3 1/1 arm: add initial support for the Phytium Durian Board
Quoted 8 lines · liu hao
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
Hello Hao,
for U-Boot this is fine.
Please, chmod 755 dopack in the https://github.com/phytium-durian/bpf
Git repository.
The ft-all.bin binary file seems to be based on the ARM Trusted Firmware. Other companies like Marvell have opted to provide the ATF source code and only keep BL2 closed source. This provides a bit more flexibility.
Best regards
Heinrich
Dear Heinrich:
According to you comments, I have modified the files
in the https://github.com/phytium-durian/bpf Git repository, such as chmod 755 dopack, create README, create LICENSE about BSD-3.
Although the BPF is created referring to the ATF, but it is very different from ATF. There are too many designed details about CPU in the BPF.
Because of the commerce application, we do not want to open source now. But we may open source in the future.
I hope you can understand it.
Thank you
Hao
________________________________
发件人: Heinrich Schuchardt <[email protected]>
发送时间: 2019年10月18日 0:44
收件人: liu hao <[email protected]>; trini at konsulko.com <[email protected]>
抄送: liuhao at phytium.com.cn <[email protected]>; jagan at amarulasolutions.com <[email protected]>; sr at denx.de <[email protected]>; marek.vasut at gmail.com <[email protected]>; michal.simek at xilinx.com <[email protected]>; horatiu.vultur at microchip.com <[email protected]>; afd at ti.com <[email protected]>; bmeng.cn at gmail.com <[email protected]>; narmstrong at baylibre.com <[email protected]>; ryder.lee at mediatek.com <[email protected]>; patrick.delaunay at st.com <[email protected]>; igor.opaniuk at gmail.com <[email protected]>; eugen.hristev at microchip.com <[email protected]>; kever.yang at rock-chips.com <[email protected]>; yamada.masahiro at socionext.com <[email protected]>; troy.kisky at boundarydevices.com <[email protected]>; festevam at gmail.com <[email protected]>; prabhakar.kushwaha at nxp.com <[email protected]>; Zhiqiang.Hou at nxp.com <[email protected]>; frank-w at public-files.de <[email protected]>; nsekhar at ti.com <[email protected]>; u-boot at lists.denx.de <[email protected]> 主题: Re: [PATCH v3] arm: add initial support for the Phytium Durian Board
Quoted 8 lines · liu hao
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
Hello Hao,
for U-Boot this is fine.
Please, chmod 755 dopack in the https://github.com/phytium-durian/bpf
Git repository.
The ft-all.bin binary file seems to be based on the ARM Trusted Firmware. Other companies like Marvell have opted to provide the ATF source code and only keep BL2 closed source. This provides a bit more flexibility.
Best regards
Heinrich
PATCH v3 1/1 arm: add initial support for the Phytium Durian Board
In reply to liu haoQuoted 17 lines · liu hao
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. @Tomv2:
- Someprintf()are removed or replaced bydebug(). @Tom
- Theft2004_defconfigfile is generated with savedefconfig. @Tom, @Heinrich
Quoted 5 lines
Cc Kever Yang <[email protected]>Cc Tom Rini <[email protected]>Cc Heinrich Schuchardt <[email protected]>Signed-off-by Steven Hao <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191017/968abdd5/attachment.sig>
PATCH v3 1/1 arm: add initial support for the Phytium Durian Board
Quoted 7 lines · Tom Rini
Quoted 4 lines · liu hao
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:
Please drop these changelog from the commit message. The changelog should be after ---
Quoted 13 lines
Quoted 13 lines
- 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. @Tomv2:
- Someprintf()are removed or replaced bydebug(). @Tom
- Theft2004_defconfigfile is generated with savedefconfig. @Tom, @Heinrich
Quoted 8 lines
Quoted 5 lines
Cc Kever Yang <[email protected]>Cc Tom Rini <[email protected]>Cc Heinrich Schuchardt <[email protected]>Signed-off-by Steven Hao <[email protected]>Reviewed-by Tom Rini <[email protected]>
Regards,
Bin