add support for the gigabyte mp30-ar0 board
Hi,
following two patches add support for the gigabyte mp30-ar0 mainboard based on the APM X-Gene Storm (APM883408). The only difference to the APM88320T used in the mustang board seems to be that it has 4 instead of 2 DDR memory controllers.
Every device defined in 4.2-rc8's apm-storm.dtsi appears to work. I haven't tested the 10G ethernet device and the PCIexpress slots. The second 10G device is missing. It boots only with clk_ignored_unused. I haven't had a chance to investigate why. The bootloader doesn't clear x2 and x3.
The board ships with u-boot (U-Boot 2013.04 (Jun 02 2015 - 10:54:10)
REV: 1.15.01-F05), Linux 3.12 and a buildroot based initrd. There seems
no sources available for the shipped binaries. There is no mention of
the GPL in the handbook or shipped materials. The handbook is available
from http://b2b.gigabyte.com/products/product-page.aspx?pid=5422#manual .
The binaries are also available as download from http://b2b.gigabyte.com/products/product-page.aspx?pid=5422#bios .
I asked Thursday for sources of the GPL licensed parts but have of course no answer yet.
cheers,
Janne
arch/arm64/boot/dts/apm/Makefile | 1 + arch/arm64/boot/dts/apm/apm-mustang.dts | 1 + arch/arm64/boot/dts/apm/apm-storm-883208.dtsi | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/apm/apm-storm-883408.dtsi | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/apm/apm-storm.dtsi | 87 -------------------------------------------- arch/arm64/boot/dts/apm/mp30ar0.dts | 85 +++++++++++++++++++++++++++++++++++++++++++
PATCH 1/2 arm64/apm: create X-Gene storm chip variant dtsi
The CPU and timer table and GIC registers differ between APM883208 and APM883408 chip variants. Move them to their own file so the soc node in apm-storm.dtsi can be shared.
--- arch/arm64/boot/dts/apm/apm-mustang.dts | 1 + arch/arm64/boot/dts/apm/apm-storm-883208.dtsi | 99 +++++++++++++++++++++++++++ arch/arm64/boot/dts/apm/apm-storm.dtsi | 87 ----------------------- 3 files changed, 100 insertions(+), 87 deletions(-) create mode 100644 arch/arm64/boot/dts/apm/apm-storm-883208.dtsi
arch/arm64/boot/dts/apm/apm-mustang.dts +1 -0
@@ -11,6 +11,7 @@ /dts-v1/; +/include/ "apm-storm-883208.dtsi" /include/ "apm-storm.dtsi" / {
arch/arm64/boot/dts/apm/apm-storm-883208.dtsi new file +99 -0
99 lines not on this page · raw message
arch/arm64/boot/dts/apm/apm-storm.dtsi +0 -87
93 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH 2/2 arm64/apm: add dts for Gigabyte MP30-AR0 board
In reply to Janne GrunauCreates apm-storm-883408.dtsi which should be shareable with the HP Moonshot m400 cartridge.
--- arch/arm64/boot/dts/apm/Makefile | 1 + arch/arm64/boot/dts/apm/apm-storm-883408.dtsi | 98 +++++++++++++++++++++++++++ arch/arm64/boot/dts/apm/mp30ar0.dts | 85 +++++++++++++++++++++++ 3 files changed, 184 insertions(+) create mode 100644 arch/arm64/boot/dts/apm/apm-storm-883408.dtsi create mode 100644 arch/arm64/boot/dts/apm/mp30ar0.dts
arch/arm64/boot/dts/apm/Makefile +1 -0
@@ -1,4 +1,5 @@ dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb +dtb-$(CONFIG_ARCH_XGENE) += mp30ar0.dtb always := $(dtb-y) subdir-y := $(dts-dirs)
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +98 -0
98 lines not on this page · raw message
arch/arm64/boot/dts/apm/mp30ar0.dts new file +85 -0
85 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH 2/2 arm64/apm: add dts for Gigabyte MP30-AR0 board
Quoted 23 lines · Janne Grunau
Creates
apm-storm-883408.dtsiwhich should be shareable with the HP Moonshot m400 cartridge.Signed-off-by Janne Grunau <[email protected]>--- arch/arm64/boot/dts/apm/Makefile | 1 + arch/arm64/boot/dts/apm/apm-storm-883408.dtsi | 98 +++++++++++++++++++++++++++ arch/arm64/boot/dts/apm/mp30ar0.dts | 85 +++++++++++++++++++++++ 3 files changed, 184 insertions(+) create mode 100644 arch/arm64/boot/dts/apm/apm-storm-883408.dtsi create mode 100644 arch/arm64/boot/dts/apm/mp30ar0.dtsarch/arm64/boot/dts/apm/mp30ar0.dts new file +5
-0@@ -0,0 +1,85 @@ +/* + * dts file for Gigabyte MP30-AR0 board + * + * Copyright (C) 2013, Applied Micro Circuits Corporation + *
arch/arm64/boot/dts/apm/mp30ar0.dts line 15
Quoted 10 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +10
-0+ * 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/ "apm-storm-883408.dtsi" +/include/ "apm-storm-soc.dtsi"
/include/ "apm-storm.dtsi"
I split the soc node first into its own file but then decided that keeping the larger part in the same file introduces less merge conflicts.
Quoted 15 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +15
-0+ +/ { + pmu { + compatible = "arm,armv8-pmuv3"; + interrupts = <0x1 0xc 0xff04>; + }; + + memory { + #address-cells = <0x2>; + #size-cells = <0x2>; + device_type = "memory"; + reg = <0x0 0x0 0x0 0x2000000>; + }; + + poweroff_mbox: poweroff_mbox at 10548000 {
arch/arm64/boot/dts/apm/mp30ar0.dts line 40
Quoted 10 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +10
-0+ compatible = "syscon"; + reg = <0x0 0x10548000 0x0 0x100>; + }; + + poweroff at 10548010 { + compatible = "syscon-poweroff"; + regmap = <&poweroff_mbox>; + offset = <0x10>; + mask = <0x1>; + };
This doesn't seem to work, even with the poweroff/reset patches for mustang.
Janne
PATCH 2/2 arm64/apm: add dts for Gigabyte MP30-AR0 board
In reply to Janne GrunauQuoted 46 lines · Janne Grunau
Creates
apm-storm-883408.dtsiwhich should be shareable with the HP Moonshot m400 cartridge.Signed-off-by Janne Grunau <[email protected]>--- arch/arm64/boot/dts/apm/Makefile | 1 + arch/arm64/boot/dts/apm/apm-storm-883408.dtsi | 98 +++++++++++++++++++++++++++ arch/arm64/boot/dts/apm/mp30ar0.dts | 85 +++++++++++++++++++++++ 3 files changed, 184 insertions(+) create mode 100644 arch/arm64/boot/dts/apm/apm-storm-883408.dtsi create mode 100644 arch/arm64/boot/dts/apm/mp30ar0.dtsarch/arm64/boot/dts/apm/Makefile +1
-0@@ -1,4 +1,5 @@ dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb +dtb-$(CONFIG_ARCH_XGENE) += mp30ar0.dtb always := $(dtb-y) subdir-y := $(dts-dirs)arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +18
-0@@ -0,0 +1,98 @@ +/* + * dts file for AppliedMicro (APM) X-Gene Storm SOC APM883408 + * + * Copyright (C) 2013, Applied Micro Circuits Corporation + * + * 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. + */ + +/ { + compatible = "apm,xgene-storm"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + cpus {
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi line 28
Quoted 10 lines
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +10
-0+ #address-cells = <2>; + #size-cells = <0>; + + cpu at 000 { + device_type = "cpu"; + compatible = "apm,potenza", "arm,armv8"; + reg = <0x0 0x000>; + enable-method = "spin-table"; + cpu-release-addr = <0x40 0x0000fff8>; + };
This release address doesn't fall in the region described by the memory node, and I don't see any /memreserve/. That worries me.
Does the bootlaoder override the memory node?
Does it add the requisite memreserve?
Does it override the cpu-release-addr?
[...]
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi line 89
Quoted 10 lines
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +10
-0+ gic: interrupt-controller at 78090000 { + compatible = "arm,cortex-a15-gic"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0x0 0x78090000 0x0 0x10000>, /* GIC Dist */ + <0x0 0x780a0000 0x0 0x10000>, /* GIC CPU */ + <0x0 0x780c0000 0x0 0x20000>, /* GIC VCPU Control */ + <0x0 0x780e0000 0x0 0x20000>; /* GIC VCPU */ + interrupts = <1 9 0xf04>; + };
Nit: add a blank line here.
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi line 97
Quoted 8 lines
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +8
-0+ timer { + compatible = "arm,armv8-timer"; + interrupts = <1 0 0xff04>, /* Secure Phys IRQ */ + <1 13 0xff04>, /* Non-secure Phys IRQ */ + <1 14 0xff04>, /* Virt IRQ */ + <1 15 0xff04>; /* Hyp IRQ */ + clock-frequency = <50000000>; + };
Surely the firmware is configuring CNTFRQ, and it's not necessary to have a clock-frequency property?
Quoted 22 lines
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +1
-0+};arch/arm64/boot/dts/apm/mp30ar0.dts new file +15
-0@@ -0,0 +1,85 @@ +/* + * dts file for Gigabyte MP30-AR0 board + * + * Copyright (C) 2013, Applied Micro Circuits Corporation + * + * 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/ "apm-storm-883408.dtsi" +/include/ "apm-storm-soc.dtsi"
arch/arm64/boot/dts/apm/mp30ar0.dts line 25
Quoted 10 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +10
-0+ +/ { + pmu { + compatible = "arm,armv8-pmuv3"; + interrupts = <0x1 0xc 0xff04>; + }; + + memory { + #address-cells = <0x2>; + #size-cells = <0x2>;
I don't see why these properties should be here.
arch/arm64/boot/dts/apm/mp30ar0.dts line 27
Quoted 2 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +2
-0+ device_type = "memory"; + reg = <0x0 0x0 0x0 0x2000000>;
Is this overriden by the bootloader? It seems a tad small...
Quoted 6 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +6
-0+ }; + + poweroff_mbox: poweroff_mbox at 10548000 { + compatible = "syscon"; + reg = <0x0 0x10548000 0x0 0x100>; + };
arch/arm64/boot/dts/apm/mp30ar0.dts line 43
Quoted 10 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +10
-0+ + poweroff at 10548010 { + compatible = "syscon-poweroff"; + regmap = <&poweroff_mbox>; + offset = <0x10>; + mask = <0x1>; + }; + + chosen { + linux,stdout-path = "/soc/serial at 1c020000";
Please use stdout-path rather than linux,stdout-path.
No rate configuration?
This would look nicer with an alias.
Thanks,
Mark.
PATCH 2/2 arm64/apm: add dts for Gigabyte MP30-AR0 board
Quoted 61 lines · Mark Rutland
Quoted 46 lines · Janne Grunau
Creates
apm-storm-883408.dtsiwhich should be shareable with the HP Moonshot m400 cartridge.Signed-off-by Janne Grunau <[email protected]>--- arch/arm64/boot/dts/apm/Makefile | 1 + arch/arm64/boot/dts/apm/apm-storm-883408.dtsi | 98 +++++++++++++++++++++++++++ arch/arm64/boot/dts/apm/mp30ar0.dts | 85 +++++++++++++++++++++++ 3 files changed, 184 insertions(+) create mode 100644 arch/arm64/boot/dts/apm/apm-storm-883408.dtsi create mode 100644 arch/arm64/boot/dts/apm/mp30ar0.dtsarch/arm64/boot/dts/apm/Makefile +1
-0@@ -1,4 +1,5 @@ dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb +dtb-$(CONFIG_ARCH_XGENE) += mp30ar0.dtb always := $(dtb-y) subdir-y := $(dts-dirs)arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +18
-0@@ -0,0 +1,98 @@ +/* + * dts file for AppliedMicro (APM) X-Gene Storm SOC APM883408 + * + * Copyright (C) 2013, Applied Micro Circuits Corporation + * + * 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. + */ + +/ { + compatible = "apm,xgene-storm"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + cpus {arch/arm64/boot/dts/apm/apm-storm-883408.dtsi line 28
Quoted 10 lines
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +10
-0+ #address-cells = <2>; + #size-cells = <0>; + + cpu at 000 { + device_type = "cpu"; + compatible = "apm,potenza", "arm,armv8"; + reg = <0x0 0x000>; + enable-method = "spin-table"; + cpu-release-addr = <0x40 0x0000fff8>; + };This release address doesn't fall in the region described by the memory node, and I don't see any /memreserve/. That worries me.
Quoted 1 line
Does the bootlaoder override the memory node?
The bootloader overrides the memory node and memory starts at 0x40 0x0
Quoted 3 lines
Does it add the requisite memreserve?
Does it override the cpu-release-addr?
neither of that
Quoted 11 lines
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi line 97
Quoted 8 lines
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +8
-0+ timer { + compatible = "arm,armv8-timer"; + interrupts = <1 0 0xff04>, /* Secure Phys IRQ */ + <1 13 0xff04>, /* Non-secure Phys IRQ */ + <1 14 0xff04>, /* Virt IRQ */ + <1 15 0xff04>; /* Hyp IRQ */ + clock-frequency = <50000000>; + };Surely the firmware is configuring CNTFRQ, and it's not necessary to have a clock-frequency property?
it does, clock-frequency removed
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/apm/apm-storm-883408.dtsi new file +1
-0+};arch/arm64/boot/dts/apm/mp30ar0.dts new file +0
-0
[...]
Quoted 5 lines
arch/arm64/boot/dts/apm/mp30ar0.dts line 25
Quoted 3 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +3
-0+ memory { + #address-cells = <0x2>; + #size-cells = <0x2>;I don't see why these properties should be here.
removed
Quoted 4 lines
arch/arm64/boot/dts/apm/mp30ar0.dts line 27
Quoted 2 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +2
-0+ device_type = "memory"; + reg = <0x0 0x0 0x0 0x2000000>;Is this overriden by the bootloader? It seems a tad small...
yes, it is overriden by the bootloader. It requires a memory node in the dts but will overwrite the contents. I'll set size to zero and add a comment that it is updated by the bootloader. I could set start to 0x40 0x00 or leave it at zero.
Quoted 19 lines
Quoted 6 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +6
-0+ }; + + poweroff_mbox: poweroff_mbox at 10548000 { + compatible = "syscon"; + reg = <0x0 0x10548000 0x0 0x100>; + };arch/arm64/boot/dts/apm/mp30ar0.dts line 43
Quoted 10 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +10
-0+ + poweroff at 10548010 { + compatible = "syscon-poweroff"; + regmap = <&poweroff_mbox>; + offset = <0x10>; + mask = <0x1>; + }; + + chosen { + linux,stdout-path = "/soc/serial at 1c020000";Please use stdout-path rather than linux,stdout-path.
Quoted 3 lines
No rate configuration?
This would look nicer with an alias.
I can change that but the bootloader will add a 'linux,stdout-path' and the stdout-path will override it. OTOH the bootloader seems to always add this exact string so it will be fine to "override" it from the dts. The alternative would to remove it.
Thanks,
Janne
Quoted 5 lines
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 2/2 arm64/apm: add dts for Gigabyte MP30-AR0 board
Quoted 22 lines
Quoted 6 lines
Quoted 6 lines
(quoted diff) +1
-0+};arch/arm64/boot/dts/apm/mp30ar0.dts new file +0
-0[...]
Quoted 5 lines
arch/arm64/boot/dts/apm/mp30ar0.dts line 25
Quoted 3 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +3
-0+ memory { + #address-cells = <0x2>; + #size-cells = <0x2>;I don't see why these properties should be here.
removed
Quoted 4 lines
arch/arm64/boot/dts/apm/mp30ar0.dts line 27
Quoted 2 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +2
-0+ device_type = "memory"; + reg = <0x0 0x0 0x0 0x2000000>;Is this overriden by the bootloader? It seems a tad small...
Quoted 4 lines
yes, it is overriden by the bootloader. It requires a memory node in the dts but will overwrite the contents. I'll set size to zero and add a comment that it is updated by the bootloader. I could set start to
0x400x00or leave it at zero.
I think all zeroes is preferable. The comment is definitely worthwhile.
Quoted 19 lines
Quoted 19 lines
Quoted 6 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +6
-0+ }; + + poweroff_mbox: poweroff_mbox at 10548000 { + compatible = "syscon"; + reg = <0x0 0x10548000 0x0 0x100>; + };arch/arm64/boot/dts/apm/mp30ar0.dts line 43
Quoted 10 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +10
-0+ + poweroff at 10548010 { + compatible = "syscon-poweroff"; + regmap = <&poweroff_mbox>; + offset = <0x10>; + mask = <0x1>; + }; + + chosen { + linux,stdout-path = "/soc/serial at 1c020000";Please use stdout-path rather than linux,stdout-path.
Quoted 8 lines
Quoted 3 lines
No rate configuration?
This would look nicer with an alias.
I can change that but the bootloader will add a 'linux,stdout-path' and the stdout-path will override it. OTOH the bootloader seems to always add this exact string so it will be fine to "override" it from the dts. The alternative would to remove it.
I guess it doesn't fill in the rate, which is somewhat unfortunate.
Does it override an existing linux,stdout-path? If not, we could add the rate.
I think we should have a comment about the bootlaoder filling in linux,stdout-path, but other than that I'm not really sure what the best option is.
Thanks,
Mark.
PATCH 2/2 arm64/apm: add dts for Gigabyte MP30-AR0 board
Quoted 6 lines · Mark Rutland
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
(quoted diff) +1
-0+};arch/arm64/boot/dts/apm/mp30ar0.dts new file +0
-0
[...]
Quoted 28 lines
Quoted 19 lines
Quoted 19 lines
Quoted 6 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +6
-0+ }; + + poweroff_mbox: poweroff_mbox at 10548000 { + compatible = "syscon"; + reg = <0x0 0x10548000 0x0 0x100>; + };arch/arm64/boot/dts/apm/mp30ar0.dts line 43
Quoted 10 lines
arch/arm64/boot/dts/apm/mp30ar0.dts new file +10
-0+ + poweroff at 10548010 { + compatible = "syscon-poweroff"; + regmap = <&poweroff_mbox>; + offset = <0x10>; + mask = <0x1>; + }; + + chosen { + linux,stdout-path = "/soc/serial at 1c020000";Please use stdout-path rather than linux,stdout-path.
Quoted 8 lines
Quoted 3 lines
No rate configuration?
This would look nicer with an alias.
I can change that but the bootloader will add a 'linux,stdout-path' and the stdout-path will override it. OTOH the bootloader seems to always add this exact string so it will be fine to "override" it from the dts. The alternative would to remove it.
Quoted 4 lines
I guess it doesn't fill in the rate, which is somewhat unfortunate.
Does it override an existing linux,stdout-path? If not, we could add the rate.
yes, it overrides an existing linux,stdout-path and it looks like an hardcoded string.
Quoted 3 lines
I think we should have a comment about the bootlaoder filling in linux,stdout-path, but other than that I'm not really sure what the best option is.
I'll add the comment and a stdout-path with alias and rate. There is at least some hope that Gigabyte or APM will realease a newer/fixed bootloader. The installed bootloader doesn't clear x2/x3.
Thanks Janne