Skip to contentSkip to conversation

arm64: dts: Add base stratix 10 dtsi

PATCH Superseded [email protected] 2 participants 4 messages Aug 11, 2015 – Aug 20, 2015

Subsystems (4)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm64: dts: Add base stratix 10 dtsi

From: Dinh Nguyen <[email protected]>

Add the base DTS for Altera's SoCFPGA Stratix 10 platform.

---
v2: use interrupt-affinity for pmu node

---
 arch/arm64/Kconfig                                 |   5 +
 arch/arm64/boot/dts/Makefile                       |   1 +
 arch/arm64/boot/dts/altera/Makefile                |   5 +
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 358 +++++++++++++++++++++
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    |  38 +++
 arch/arm64/configs/defconfig                       |   1 +
 6 files changed, 408 insertions(+)
 create mode 100644 arch/arm64/boot/dts/altera/Makefile
 create mode 100644 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
 create mode 100644 arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
arch/arm64/Kconfig +5 -0
index 318175f..0f8ab2b 100644
@@ -207,6 +207,11 @@ config ARCH_SEATTLE
 	help
 	  This enables support for AMD Seattle SOC Family
 
+config ARCH_STRATIX10
+	bool "Altera's Stratix 10 SoCFPGA Family"
+	help
+	  This enables support for Altera's Stratix 10 SoCFPGA Family
+
 config ARCH_TEGRA
 	bool "NVIDIA Tegra SoC Family"
 	select ARCH_HAS_RESET_CONTROLLER
arch/arm64/boot/dts/Makefile +1 -0
index 38913be..7fb421a 100644
@@ -1,3 +1,4 @@
+dts-dirs += altera
 dts-dirs += amd
 dts-dirs += apm
 dts-dirs += arm
arch/arm64/boot/dts/altera/Makefile new file +5 -0
new file mode 100644
index 0000000..d7a6416
@@ -0,0 +1,5 @@
+dtb-$(CONFIG_ARCH_STRATIX10) += socfpga_stratix10_socdk.dtb
+
+always		:= $(dtb-y)
+subdir-y	:= $(dts-dirs)
+clean-files	:= *.dtb
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi new file +358 -0

358 lines not on this page · raw message

arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts new file +38 -0
new file mode 100644
index 0000000..8b162ef
@@ -0,0 +1,38 @@
+/*
+ * Copyright Altera Corporation (C) 2015. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/include/ "socfpga_stratix10.dtsi"
+
+/ {
+	model = "SoCFPGA Stratix 10 SoCDK";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x40000000>;
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
arch/arm64/configs/defconfig +1 -0
index 4e17e7e..ad3b636 100644
@@ -36,6 +36,7 @@ CONFIG_ARCH_FSL_LS2085A=y
 CONFIG_ARCH_HISI=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_ARCH_SEATTLE=y
+CONFIG_ARCH_STRATIX10=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_ARCH_TEGRA_132_SOC=y
 CONFIG_ARCH_QCOM=y
Signature · 1 line
2.4.5
#1 lore raw
Quoted 7 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Add the base DTS for Altera's SoCFPGA Stratix 10 platform.

---
v2: use interrupt-affinity for pmu node

Quoted 12 lines
---
 arch/arm64/Kconfig                                 |   5 +
 arch/arm64/boot/dts/Makefile                       |   1 +
 arch/arm64/boot/dts/altera/Makefile                |   5 +
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 358 +++++++++++++++++++++
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    |  38 +++
 arch/arm64/configs/defconfig                       |   1 +
 6 files changed, 408 insertions(+)
 create mode 100644 arch/arm64/boot/dts/altera/Makefile
 create mode 100644 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
 create mode 100644 arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts

Soft ping on this pach?

BR,
Dinh

reviewer
#2 lore raw
In reply to [email protected]

Hi,

arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi line 22

Quoted 4 lines
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi new file +4 -0
+/ {
+	compatible = "altr,socfpga-stratix10";
+	#address-cells = <1>;
+	#size-cells = <1>;

I would recommend that you make your root #address-cells and #size-cells equal to 2, as that will simplify matters later if/when you need to add anything beyond the first 4GB for some particular board.

If everything in the SoC falls within the first 4GB you can have a ranges property on your /soc node and have only one cell below that.

[...]

arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi line 74

Quoted 1 line
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi new file +1 -0
+	intc: intc at ffff8000 {

The unit-address doesn't match the first address in the reg entry.

arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi line 82

Quoted 8 lines
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi new file +8 -0
+		compatible = "arm,gic-400", "arm,cortex-a15-gic";
+		#interrupt-cells = <3>;
+		interrupt-controller;
+		reg = <0x0 0xffff9000 0x1000>,
+		      <0x0 0xffffa000 0x2000>,
+		      <0x0 0xffffc000 0x1000>,
+		      <0x0 0xffffd000 0x1000>;
+	};

Shouldn't the virtual CPU interface also be 0x2000 long?

Mark.

#3 lore raw
Quoted 11 lines · Mark Rutland

Hi,

arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi line 22

Quoted 4 lines
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi new file +4 -0
+/ {
+	compatible = "altr,socfpga-stratix10";
+	#address-cells = <1>;
+	#size-cells = <1>;

I would recommend that you make your root #address-cells and #size-cells equal to 2, as that will simplify matters later if/when you need to add anything beyond the first 4GB for some particular board.

Quoted 3 lines

If everything in the SoC falls within the first 4GB you can have a ranges property on your /soc node and have only one cell below that.

Ok, will update.

Quoted 6 lines

[...]

arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi line 74

Quoted 1 line
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi new file +1 -0
+	intc: intc at ffff8000 {

The unit-address doesn't match the first address in the reg entry.

Right, according to the GIC-400 r0p1 TRM, section 3.2 register map, shows that

0x0000 - 0x0fff Reserved
0x1000 - 0x1fff Distibutor
...

So even though the GIC address starts at 0xffff8000, the first usable register is at 0xffff9000. I'll have to ask the hw folks if the 0xffff8000 represents the distributor or the reserved block.

Quoted 11 lines

arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi line 82

Quoted 8 lines
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi new file +8 -0
+		compatible = "arm,gic-400", "arm,cortex-a15-gic";
+		#interrupt-cells = <3>;
+		interrupt-controller;
+		reg = <0x0 0xffff9000 0x1000>,
+		      <0x0 0xffffa000 0x2000>,
+		      <0x0 0xffffc000 0x1000>,
+		      <0x0 0xffffd000 0x1000>;
+	};

Shouldn't the virtual CPU interface also be 0x2000 long?

Yes, it is. Will update

Thanks for reviewing.

Dinh