xref: /rk3399_ARM-atf/fdts/arm_fpga.dts (revision ae2289b93f8631f328e44e603a17bfe3df90f459)
1b48883c7SAndre Przywara// SPDX-License-Identifier: (GPL-2.0 or BSD-3-Clause)
2b48883c7SAndre Przywara/*
3b48883c7SAndre Przywara * Copyright (c) 2020, Arm Limited. All rights reserved.
4b48883c7SAndre Przywara *
5b48883c7SAndre Przywara * Devicetree for the Arm Ltd. FPGA platform
6b48883c7SAndre Przywara * Number and kind of CPU cores differs from image to image, so the
7b48883c7SAndre Przywara * topology is auto-detected by BL31, and the /cpus node is created and
8b48883c7SAndre Przywara * populated accordingly at runtime.
9b48883c7SAndre Przywara */
10b48883c7SAndre Przywara
11b48883c7SAndre Przywara#include <dt-bindings/interrupt-controller/arm-gic.h>
12b48883c7SAndre Przywara
13b48883c7SAndre Przywara/dts-v1/;
14b48883c7SAndre Przywara
15b48883c7SAndre Przywara/ {
16b48883c7SAndre Przywara	model = "ARM FPGA";
17b48883c7SAndre Przywara	compatible = "arm,fpga", "arm,vexpress";
18b48883c7SAndre Przywara	interrupt-parent = <&gic>;
19b48883c7SAndre Przywara	#address-cells = <2>;
20b48883c7SAndre Przywara	#size-cells = <2>;
21b48883c7SAndre Przywara
22b48883c7SAndre Przywara	aliases {
23b48883c7SAndre Przywara		serial0 = &dbg_uart;
24b48883c7SAndre Przywara	};
25b48883c7SAndre Przywara
26b48883c7SAndre Przywara	chosen {
27b48883c7SAndre Przywara		stdout-path = "serial0:38400n8";
28b48883c7SAndre Przywara		bootargs = "console=ttyAMA0,38400n8 earlycon";
29b48883c7SAndre Przywara		/* Allow to upload a generous 100MB initrd payload. */
30b48883c7SAndre Przywara		linux,initrd-start = <0x0 0x84000000>;
31c3ce73beSAndre Przywara		linux,initrd-end = <0x0 0x8a400000>;
32b48883c7SAndre Przywara	};
33b48883c7SAndre Przywara
34b48883c7SAndre Przywara	/* /cpus node will be added by BL31 at runtime. */
35b48883c7SAndre Przywara
36b48883c7SAndre Przywara	psci {
37b48883c7SAndre Przywara		compatible = "arm,psci-0.2";
38b48883c7SAndre Przywara		method = "smc";
39b48883c7SAndre Przywara	};
40b48883c7SAndre Przywara
41b48883c7SAndre Przywara	timer {
42b48883c7SAndre Przywara		compatible = "arm,armv8-timer";
43b48883c7SAndre Przywara		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
44b48883c7SAndre Przywara			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
45b48883c7SAndre Przywara			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
46b48883c7SAndre Przywara			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
47b48883c7SAndre Przywara	};
48b48883c7SAndre Przywara
49b48883c7SAndre Przywara	pmu {
50b48883c7SAndre Przywara		compatible = "arm,armv8-pmuv3";
51b48883c7SAndre Przywara		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
52b48883c7SAndre Przywara	};
53b48883c7SAndre Przywara
54b48883c7SAndre Przywara	/* This node will be removed at runtime on cores without SPE. */
55b48883c7SAndre Przywara	spe-pmu {
56b48883c7SAndre Przywara		compatible = "arm,statistical-profiling-extension-v1";
57b48883c7SAndre Przywara		interrupts = <GIC_PPI 5 IRQ_TYPE_LEVEL_HIGH>;
58b48883c7SAndre Przywara	};
59b48883c7SAndre Przywara
60b48883c7SAndre Przywara	memory@80000000 {
61b48883c7SAndre Przywara		device_type = "memory";
62b48883c7SAndre Przywara		reg = <0x0 0x80000000 0x0 0x80000000>,
63b48883c7SAndre Przywara		      <0x8 0x80000000 0x1 0x80000000>;
64b48883c7SAndre Przywara	};
65b48883c7SAndre Przywara
66b48883c7SAndre Przywara
67b48883c7SAndre Przywara	bus_refclk: refclk {
68b48883c7SAndre Przywara		compatible = "fixed-clock";
69b48883c7SAndre Przywara		#clock-cells = <0>;
70b48883c7SAndre Przywara		clock-frequency = <100000000>;
71b48883c7SAndre Przywara		clock-output-names = "apb_pclk";
72b48883c7SAndre Przywara	};
73b48883c7SAndre Przywara
74b48883c7SAndre Przywara	uartclk: baudclock {
75b48883c7SAndre Przywara		compatible = "fixed-clock";
76b48883c7SAndre Przywara		#clock-cells = <0>;
77b48883c7SAndre Przywara		clock-frequency = <10000000>;
78b48883c7SAndre Przywara		clock-output-names = "uartclk";
79b48883c7SAndre Przywara	};
80b48883c7SAndre Przywara
81b48883c7SAndre Przywara	dbg_uart: serial@7ff80000 {
82b48883c7SAndre Przywara		compatible = "arm,pl011", "arm,primecell";
83b48883c7SAndre Przywara		reg = <0x0 0x7ff80000 0x0 0x00001000>;
84*195381a9SAndre Przywara		interrupts = <GIC_SPI 415 IRQ_TYPE_LEVEL_HIGH>;
85b48883c7SAndre Przywara		clocks = <&uartclk>, <&bus_refclk>;
86b48883c7SAndre Przywara		clock-names = "uartclk", "apb_pclk";
87b48883c7SAndre Przywara	};
88b48883c7SAndre Przywara
89b48883c7SAndre Przywara	gic: interrupt-controller@30000000 {
90b48883c7SAndre Przywara		compatible = "arm,gic-v3";
91b48883c7SAndre Przywara		#address-cells = <2>;
92b48883c7SAndre Przywara		#interrupt-cells = <3>;
93b48883c7SAndre Przywara		#size-cells = <2>;
94b48883c7SAndre Przywara		ranges;
95b48883c7SAndre Przywara		interrupt-controller;
96b48883c7SAndre Przywara		reg = <0x0 0x30000000 0x0 0x00010000>,	/* GICD */
97b48883c7SAndre Przywara	/* The GICR size will be adjusted at runtime to match the cores. */
98b48883c7SAndre Przywara		      <0x0 0x30040000 0x0 0x00020000>;	/* GICR for one core */
99b48883c7SAndre Przywara		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
100d7e39c43SAndre Przywara
101d7e39c43SAndre Przywara		its: msi-controller@30040000 {
102d7e39c43SAndre Przywara			compatible = "arm,gic-v3-its";
103d7e39c43SAndre Przywara			reg = <0x0 0x30040000 0x0 0x40000>;
104d7e39c43SAndre Przywara			#msi-cells = <1>;
105d7e39c43SAndre Przywara			msi-controller;
106d7e39c43SAndre Przywara		};
107b48883c7SAndre Przywara	};
108b48883c7SAndre Przywara};
109