arm64: Add ARCH_THUNDER2
Subsystems (2)
cover arm64: Add ARCH_THUNDER2
I had send this out few weeks back (before -rc5), hoping that it would be picked up for 4.11 thru arm-soc. Posting again with the Ack, in case it fell thru the cracks.
This patchset adds support for the new ThunderX2 CN99XX processor family.
Changes are to add the config option, the required device tree files, the device tree bindings documentation and the defconfig entry.
JC.
Jayachandran C (3):
arm64: add THUNDER2 processor family
dt-bindings: arm64 ARCH_THUNDER2 platform documentation
arm64: add ARCH_THUNDER2 to defconfig
.../devicetree/bindings/arm/cavium-thunder2.txt | 5 + Documentation/devicetree/bindings/arm/cpus.txt | 1 + arch/arm64/Kconfig.platforms | 7 + arch/arm64/boot/dts/cavium/Makefile | 1 + arch/arm64/boot/dts/cavium/thunder-99xx.dts | 34 +++++ arch/arm64/boot/dts/cavium/thunder-99xx.dtsi | 147 +++++++++++++++++++++ arch/arm64/configs/defconfig | 1 + 7 files changed, 196 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/cavium-thunder2.txt create mode 100644 arch/arm64/boot/dts/cavium/thunder-99xx.dts create mode 100644 arch/arm64/boot/dts/cavium/thunder-99xx.dtsi
Signature · 1 line
2.7.4
PATCH RESEND 1/3 arm64: add THUNDER2 processor family
Add support for ThunderX2 CN99XX arm64 server processors.
Introduce a new arm64 platform config option ARCH_THUNDER2 for these processors. Add device tree files boot/dts/cavium/thunder-99xx.dtsi for on-chip devices and boot/dts/cavium/thunder-99xx.dts for the evaluation board.
--- arch/arm64/Kconfig.platforms | 7 ++ arch/arm64/boot/dts/cavium/Makefile | 1 + arch/arm64/boot/dts/cavium/thunder-99xx.dts | 34 +++++++ arch/arm64/boot/dts/cavium/thunder-99xx.dtsi | 147 +++++++++++++++++++++++++++ 4 files changed, 189 insertions(+) create mode 100644 arch/arm64/boot/dts/cavium/thunder-99xx.dts create mode 100644 arch/arm64/boot/dts/cavium/thunder-99xx.dtsi
arch/arm64/Kconfig.platforms +7 -0
@@ -190,6 +190,13 @@ config ARCH_THUNDER help This enables support for Cavium's Thunder Family of SoCs. +config ARCH_THUNDER2 + bool "Cavium ThunderX2 Server Processors" + select GPIOLIB + help + This enables support for Cavium's ThunderX2 CN99XX family of + server processors. + config ARCH_UNIPHIER bool "Socionext UniPhier SoC Family" select ARCH_HAS_RESET_CONTROLLER
arch/arm64/boot/dts/cavium/Makefile +1 -0
@@ -1,4 +1,5 @@ dtb-$(CONFIG_ARCH_THUNDER) += thunder-88xx.dtb +dtb-$(CONFIG_ARCH_THUNDER2) += thunder-99xx.dtb always := $(dtb-y) subdir-y := $(dts-dirs)
arch/arm64/boot/dts/cavium/thunder-99xx.dts new file +34 -0
@@ -0,0 +1,34 @@ +/* + * dts file for Cavium ThunderX2 CN99XX based Evaluation Boards + * + * Copyright (c) 2017 Cavium Inc. + * Copyright (c) 2013-2016 Broadcom + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +/dts-v1/; + +#include "thunder-99xx.dtsi" + +/ { + model = "Cavium ThunderX2 CN99XX"; + compatible = "cavium,thunder-99xx"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x80000000 0x0 0x80000000>, /* 2G @ 2G */ + <0x00000008 0x80000000 0x0 0x80000000>; /* 2G @ 34G */ + }; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +};
arch/arm64/boot/dts/cavium/thunder-99xx.dtsi new file +147 -0
147 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH RESEND 1/3 arm64: add THUNDER2 processor family
Quoted 7 lines · Jayachandran C
Add support for ThunderX2 CN99XX arm64 server processors.
Introduce a new arm64 platform config option
ARCH_THUNDER2for these processors. Add device tree filesboot/dts/cavium/thunder-99xx.dtsifor on-chip devices andboot/dts/cavium/thunder-99xx.dtsfor the evaluation board.
Quoted 6 lines
Signed-off-by Jayachandran C <[email protected]>--- arch/arm64/Kconfig.platforms | 7 ++ arch/arm64/boot/dts/cavium/Makefile | 1 + arch/arm64/boot/dts/cavium/thunder-99xx.dts | 34 +++++++ arch/arm64/boot/dts/cavium/thunder-99xx.dtsi | 147 +++++++++++++++++++++++++++
This is basically identical to vulcan.dtsi. Do we really need both in the tree?
Will
PATCH RESEND 1/3 arm64: add THUNDER2 processor family
Quoted 15 lines · Will Deacon
Quoted 7 lines · Jayachandran C
Add support for ThunderX2 CN99XX arm64 server processors.
Introduce a new arm64 platform config option
ARCH_THUNDER2for these processors. Add device tree filesboot/dts/cavium/thunder-99xx.dtsifor on-chip devices andboot/dts/cavium/thunder-99xx.dtsfor the evaluation board.Quoted 6 lines
Signed-off-by Jayachandran C <[email protected]>--- arch/arm64/Kconfig.platforms | 7 ++ arch/arm64/boot/dts/cavium/Makefile | 1 + arch/arm64/boot/dts/cavium/thunder-99xx.dts | 34 +++++++ arch/arm64/boot/dts/cavium/thunder-99xx.dtsi | 147 +++++++++++++++++++++++++++
Quoted 2 lines
This is basically identical to
vulcan.dtsi. Do we really need both in the tree?
Hmm, an alternative would be to add the new .dtsi file and start out with an #include of the existing file, with overrides for anything that needs changing. Similarly, the Kconfig symbol could just 'select ARCH_VULCAN' for now.
Arnd
PATCH RESEND 1/3 arm64: add THUNDER2 processor family
Quoted 16 lines · Arnd Bergmann
Quoted 15 lines · Will Deacon
Quoted 13 lines · Jayachandran C
Add support for ThunderX2 CN99XX arm64 server processors.
Introduce a new arm64 platform config option
ARCH_THUNDER2for these processors. Add device tree filesboot/dts/cavium/thunder-99xx.dtsifor on-chip devices andboot/dts/cavium/thunder-99xx.dtsfor the evaluation board.Signed-off-by Jayachandran C <[email protected]>--- arch/arm64/Kconfig.platforms | 7 ++ arch/arm64/boot/dts/cavium/Makefile | 1 + arch/arm64/boot/dts/cavium/thunder-99xx.dts | 34 +++++++ arch/arm64/boot/dts/cavium/thunder-99xx.dtsi | 147 +++++++++++++++++++++++++++
Quoted 2 lines
Quoted 2 lines
This is basically identical to
vulcan.dtsi. Do we really need both in the tree?
The Vulcan architecture has been discontinued by Broadcom, so the platform and device tree files should go away soon. Renames are going to be messy, it will be better to keep Vulcan around until the transition is complete, and then delete it.
Quoted 3 lines
Hmm, an alternative would be to add the new .dtsi file and start out with an #include of the existing file, with overrides for anything that needs changing. Similarly, the
Kconfigsymbol could just 'selectARCH_VULCAN' for now.
Even in this case, we will need to copy the files from boot/dts/broadcom to boot/dts/cavium along the way. The current patchset is (in my opinion) the least messy way to accomplish the transition. But it is the maintainer's call, so if you think it has to be done differently, I can update the patchset and post again.
Thanks,
JC.
PATCH RESEND 1/3 arm64: add THUNDER2 processor family
Quoted 7 lines · Jayachandran C
Quoted 1 line · Arnd Bergmann
On Mon, Feb 6, 2017 at 11:06 AM, Will Deacon <[email protected]> wrote:
The Vulcan architecture has been discontinued by Broadcom, so the platform and device tree files should go away soon. Renames are going to be messy, it will be better to keep Vulcan around until the transition is complete, and then delete it.
What are the disadvantages of a rename in your opinion? Are you mainly worried about merge conflicts or something else?
Quoted 9 lines
Quoted 3 lines
Hmm, an alternative would be to add the new .dtsi file and start out with an #include of the existing file, with overrides for anything that needs changing. Similarly, the
Kconfigsymbol could just 'selectARCH_VULCAN' for now.Even in this case, we will need to copy the files from boot/dts/broadcom to boot/dts/cavium along the way. The current patchset is (in my opinion) the least messy way to accomplish the transition. But it is the maintainer's call, so if you think it has to be done differently, I can update the patchset and post again.
I don't see the need to copy if we can do an #include and later move the file into the new place. I also see only three references to ARCH_VULCAN at all aside from the dts file.
arch/arm64/configs/defconfig:CONFIG_ARCH_VULCAN=ydrivers/gpio/Kconfig: depends on OF_GPIO && (CPU_XLP || ARCH_VULCAN
|| COMPILE_TEST) drivers/i2c/busses/Kconfig: depends on CPU_XLP || ARCH_VULCAN ||
COMPILE_TESTdrivers/spi/Kconfig: depends on CPU_XLP || ARCH_VULCAN || COMPILE_TEST
We can probably manage to have a single patch to rename them all at the same time, or we do the add+remove over two merge windows.
I also noticed now that you dropped the vulcan "compatible" strings in the .dtsi files, I think we should keep those as a fallback, and to avoid having interdependencies with the driver updates, e.g. the top-level compatible string should be
compatible = "cavium,thunder-9900", "brcm,vulcan-soc";
for the SoC, plus of course the board specific identifier in front of that. Same for the CPU, the i2c, gpio, and pmu.
Arnd
PATCH RESEND 1/3 arm64: add THUNDER2 processor family
Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · Jayachandran C
Quoted 1 line · Arnd Bergmann
On Mon, Feb 6, 2017 at 11:06 AM, Will Deacon <[email protected]> wrote:
The Vulcan architecture has been discontinued by Broadcom, so the platform and device tree files should go away soon. Renames are going to be messy, it will be better to keep Vulcan around until the transition is complete, and then delete it.
What are the disadvantages of a rename in your opinion? Are you mainly worried about merge conflicts or something else?
Ok, we are talking about 2 renames,
1. ARCH_VULCAN -> ARCH_THUNDER2, please see below, but I think there is board agreement on steps:
- add ARCH_THUNDER2 in a patchset in a dev cycle
- when it is mainline, replace ARCH_VULCAN with ARCH_THUNDER2 in the next cycle for drivers
2. boot/dts/broadcom/vulcan* -> boot/dts/cavium/thunder-99* If I understand correctly, the main sticking point here is the duplication of the dtsi file for SoC, instead of just including vulcan.dtsi in thunder-99xx board file.
It is not so bad in my view to have the duplication in a kernel version until vulcan is removed. I think you would prefer something like this:
- have a patchset in this dev cycle to include vulcan.dtsi in thunder-99xx.dts (the 99xx name to match 88xx already there)
- patchset in an upcoming dev cycle to:
* remove ARCH_VULCAN
* move vulcan.dtsi -> thunder-99xx.dtsi, drop vulcan ids which are removed.
This seems reasonable to me, I will send out a patch to do this (if you do not have any further comments)
Quoted 16 lines
Quoted 9 lines
Quoted 3 lines
Hmm, an alternative would be to add the new .dtsi file and start out with an #include of the existing file, with overrides for anything that needs changing. Similarly, the
Kconfigsymbol could just 'selectARCH_VULCAN' for now.Even in this case, we will need to copy the files from boot/dts/broadcom to boot/dts/cavium along the way. The current patchset is (in my opinion) the least messy way to accomplish the transition. But it is the maintainer's call, so if you think it has to be done differently, I can update the patchset and post again.
I don't see the need to copy if we can do an #include and later move the file into the new place. I also see only three references to
ARCH_VULCANat all aside from the dts file.arch/arm64/configs/defconfig:CONFIG_ARCH_VULCAN=y
drivers/gpio/Kconfig: depends onOF_GPIO&& (CPU_XLP||ARCH_VULCAN
Quoted 7 lines
|| COMPILE_TEST) drivers/i2c/busses/Kconfig: depends on CPU_XLP || ARCH_VULCAN ||
COMPILE_TESTdrivers/spi/Kconfig: depends onCPU_XLP||ARCH_VULCAN||COMPILE_TESTWe can probably manage to have a single patch to rename them all at the same time, or we do the add+remove over two merge windows.
Doing it in a single patch has to be acked by 3 maintainers, and merged thru the arm-soc tree.
The simpler solution is to change these in 3 different patches, and then remove ARCH_VULCAN Kconfig entry and defconfig entry when all the references in the tree is gone.
Quoted 9 lines
I also noticed now that you dropped the vulcan "compatible" strings in the .dtsi files, I think we should keep those as a fallback, and to avoid having interdependencies with the driver updates, e.g. the top-level compatible string should be
compatible = "cavium,thunder-9900", "brcm,vulcan-soc";
for the SoC, plus of course the board specific identifier in front of that. Same for the CPU, the i2c, gpio, and pmu.
The board, SoC, and cpu compat strings will go away with the platform, so I did not add them here. With the updated plan above, I think we can take care of this while deleting vulcan.
There is no plan to change compat properties in drivers, we can add cavium compat properties when necessary. PMU is a slightly special case, but we can be compatible with vulcan there too, until things change.
Thanks,
JC.
PATCH RESEND 2/3 dt-bindings: arm64 ARCH_THUNDER2 platform documentation
In reply to Jayachandran CAdd documentation for Cavium ThunderX2 CN99XX ARM64 processor family. The processor core will use cavium,thunder2 as ID and the SoC will use cavium,thunder-99xx
--- Documentation/devicetree/bindings/arm/cavium-thunder2.txt | 5 +++++ Documentation/devicetree/bindings/arm/cpus.txt | 1 + 2 files changed, 6 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/cavium-thunder2.txt
Documentation/devicetree/bindings/arm/cavium-thunder2.txt new file +5 -0
@@ -0,0 +1,5 @@ +Cavium Thunder2 Family device tree bindings +------------------------------------------- + +Boards with Cavium ThunderX2 CN99XX shall have the root property: + compatible = "cavium,thunder-99xx";
Documentation/devicetree/bindings/arm/cpus.txt +1 -0
@@ -169,6 +169,7 @@ nodes to be present and contain the properties described below. "brcm,brahma-b15" "brcm,vulcan" "cavium,thunder" + "cavium,thunder2" "faraday,fa526" "intel,sa110" "intel,sa1100"
Signature · 1 line
2.7.4
PATCH RESEND 3/3 arm64: add ARCH_THUNDER2 to defconfig
In reply to Jayachandran CThis will allow the default kernel build to boot on Cavium ThunderX2 CN99XX processors.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_ARCH_STRATIX10=y CONFIG_ARCH_TEGRA=y CONFIG_ARCH_SPRD=y CONFIG_ARCH_THUNDER=y +CONFIG_ARCH_THUNDER2=y CONFIG_ARCH_UNIPHIER=y CONFIG_ARCH_VEXPRESS=y CONFIG_ARCH_VULCAN=y
Signature · 1 line
2.7.4