xref: /rk3399_ARM-atf/fdts/arm_fpga.dts (revision c3ce73be0bfe31fa28805fe92b3e727232ffd37a)
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>;
31*c3ce73beSAndre 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		clock-frequency = <10000000>;
44b48883c7SAndre Przywara		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
45b48883c7SAndre Przywara			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
46b48883c7SAndre Przywara			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
47b48883c7SAndre Przywara			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
48b48883c7SAndre Przywara	};
49b48883c7SAndre Przywara
50b48883c7SAndre Przywara	pmu {
51b48883c7SAndre Przywara		compatible = "arm,armv8-pmuv3";
52b48883c7SAndre Przywara		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
53b48883c7SAndre Przywara	};
54b48883c7SAndre Przywara
55b48883c7SAndre Przywara	/* This node will be removed at runtime on cores without SPE. */
56b48883c7SAndre Przywara	spe-pmu {
57b48883c7SAndre Przywara		compatible = "arm,statistical-profiling-extension-v1";
58b48883c7SAndre Przywara		interrupts = <GIC_PPI 5 IRQ_TYPE_LEVEL_HIGH>;
59b48883c7SAndre Przywara	};
60b48883c7SAndre Przywara
61b48883c7SAndre Przywara	memory@80000000 {
62b48883c7SAndre Przywara		device_type = "memory";
63b48883c7SAndre Przywara		reg = <0x0 0x80000000 0x0 0x80000000>,
64b48883c7SAndre Przywara		      <0x8 0x80000000 0x1 0x80000000>;
65b48883c7SAndre Przywara	};
66b48883c7SAndre Przywara
67b48883c7SAndre Przywara
68b48883c7SAndre Przywara	bus_refclk: refclk {
69b48883c7SAndre Przywara		compatible = "fixed-clock";
70b48883c7SAndre Przywara		#clock-cells = <0>;
71b48883c7SAndre Przywara		clock-frequency = <100000000>;
72b48883c7SAndre Przywara		clock-output-names = "apb_pclk";
73b48883c7SAndre Przywara	};
74b48883c7SAndre Przywara
75b48883c7SAndre Przywara	uartclk: baudclock {
76b48883c7SAndre Przywara		compatible = "fixed-clock";
77b48883c7SAndre Przywara		#clock-cells = <0>;
78b48883c7SAndre Przywara		clock-frequency = <10000000>;
79b48883c7SAndre Przywara		clock-output-names = "uartclk";
80b48883c7SAndre Przywara	};
81b48883c7SAndre Przywara
82b48883c7SAndre Przywara	dbg_uart: serial@7ff80000 {
83b48883c7SAndre Przywara		compatible = "arm,pl011", "arm,primecell";
84b48883c7SAndre Przywara		reg = <0x0 0x7ff80000 0x0 0x00001000>;
85b48883c7SAndre Przywara		interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
86b48883c7SAndre Przywara		clocks = <&uartclk>, <&bus_refclk>;
87b48883c7SAndre Przywara		clock-names = "uartclk", "apb_pclk";
88b48883c7SAndre Przywara	};
89b48883c7SAndre Przywara
90b48883c7SAndre Przywara	gic: interrupt-controller@30000000 {
91b48883c7SAndre Przywara		compatible = "arm,gic-v3";
92b48883c7SAndre Przywara		#address-cells = <2>;
93b48883c7SAndre Przywara		#interrupt-cells = <3>;
94b48883c7SAndre Przywara		#size-cells = <2>;
95b48883c7SAndre Przywara		ranges;
96b48883c7SAndre Przywara		interrupt-controller;
97b48883c7SAndre Przywara		reg = <0x0 0x30000000 0x0 0x00010000>,	/* GICD */
98b48883c7SAndre Przywara	/* The GICR size will be adjusted at runtime to match the cores. */
99b48883c7SAndre Przywara		      <0x0 0x30040000 0x0 0x00020000>;	/* GICR for one core */
100b48883c7SAndre Przywara		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
101b48883c7SAndre Przywara	};
102b48883c7SAndre Przywara};
103