xref: /freebsd/sys/contrib/device-tree/src/arm64/amazon/alpine-v2.dtsi (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot/*
2*c66ec88fSEmmanuel Vadot * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3*c66ec88fSEmmanuel Vadot *
4*c66ec88fSEmmanuel Vadot * Antoine Tenart <antoine.tenart@free-electrons.com>
5*c66ec88fSEmmanuel Vadot *
6*c66ec88fSEmmanuel Vadot * This software is available to you under a choice of one of two
7*c66ec88fSEmmanuel Vadot * licenses.  You may choose to be licensed under the terms of the GNU
8*c66ec88fSEmmanuel Vadot * General Public License (GPL) Version 2, available from the file
9*c66ec88fSEmmanuel Vadot * COPYING in the main directory of this source tree, or the
10*c66ec88fSEmmanuel Vadot * BSD license below:
11*c66ec88fSEmmanuel Vadot *
12*c66ec88fSEmmanuel Vadot *     Redistribution and use in source and binary forms, with or
13*c66ec88fSEmmanuel Vadot *     without modification, are permitted provided that the following
14*c66ec88fSEmmanuel Vadot *     conditions are met:
15*c66ec88fSEmmanuel Vadot *
16*c66ec88fSEmmanuel Vadot *      - Redistributions of source code must retain the above
17*c66ec88fSEmmanuel Vadot *        copyright notice, this list of conditions and the following
18*c66ec88fSEmmanuel Vadot *        disclaimer.
19*c66ec88fSEmmanuel Vadot *
20*c66ec88fSEmmanuel Vadot *      - Redistributions in binary form must reproduce the above
21*c66ec88fSEmmanuel Vadot *        copyright notice, this list of conditions and the following
22*c66ec88fSEmmanuel Vadot *        disclaimer in the documentation and/or other materials
23*c66ec88fSEmmanuel Vadot *        provided with the distribution.
24*c66ec88fSEmmanuel Vadot *
25*c66ec88fSEmmanuel Vadot * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26*c66ec88fSEmmanuel Vadot * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27*c66ec88fSEmmanuel Vadot * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28*c66ec88fSEmmanuel Vadot * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29*c66ec88fSEmmanuel Vadot * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30*c66ec88fSEmmanuel Vadot * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31*c66ec88fSEmmanuel Vadot * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32*c66ec88fSEmmanuel Vadot * SOFTWARE.
33*c66ec88fSEmmanuel Vadot */
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel Vadot/dts-v1/;
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel Vadot#include <dt-bindings/interrupt-controller/arm-gic.h>
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel Vadot/ {
40*c66ec88fSEmmanuel Vadot	model = "Annapurna Labs Alpine v2";
41*c66ec88fSEmmanuel Vadot	compatible = "al,alpine-v2";
42*c66ec88fSEmmanuel Vadot	#address-cells = <2>;
43*c66ec88fSEmmanuel Vadot	#size-cells = <2>;
44*c66ec88fSEmmanuel Vadot
45*c66ec88fSEmmanuel Vadot	cpus {
46*c66ec88fSEmmanuel Vadot		#address-cells = <2>;
47*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
48*c66ec88fSEmmanuel Vadot
49*c66ec88fSEmmanuel Vadot		cpu@0 {
50*c66ec88fSEmmanuel Vadot			compatible = "arm,cortex-a57";
51*c66ec88fSEmmanuel Vadot			device_type = "cpu";
52*c66ec88fSEmmanuel Vadot			reg = <0x0 0x0>;
53*c66ec88fSEmmanuel Vadot			enable-method = "psci";
54*c66ec88fSEmmanuel Vadot		};
55*c66ec88fSEmmanuel Vadot
56*c66ec88fSEmmanuel Vadot		cpu@1 {
57*c66ec88fSEmmanuel Vadot			compatible = "arm,cortex-a57";
58*c66ec88fSEmmanuel Vadot			device_type = "cpu";
59*c66ec88fSEmmanuel Vadot			reg = <0x0 0x1>;
60*c66ec88fSEmmanuel Vadot			enable-method = "psci";
61*c66ec88fSEmmanuel Vadot		};
62*c66ec88fSEmmanuel Vadot
63*c66ec88fSEmmanuel Vadot		cpu@2 {
64*c66ec88fSEmmanuel Vadot			compatible = "arm,cortex-a57";
65*c66ec88fSEmmanuel Vadot			device_type = "cpu";
66*c66ec88fSEmmanuel Vadot			reg = <0x0 0x2>;
67*c66ec88fSEmmanuel Vadot			enable-method = "psci";
68*c66ec88fSEmmanuel Vadot		};
69*c66ec88fSEmmanuel Vadot
70*c66ec88fSEmmanuel Vadot		cpu@3 {
71*c66ec88fSEmmanuel Vadot			compatible = "arm,cortex-a57";
72*c66ec88fSEmmanuel Vadot			device_type = "cpu";
73*c66ec88fSEmmanuel Vadot			reg = <0x0 0x3>;
74*c66ec88fSEmmanuel Vadot			enable-method = "psci";
75*c66ec88fSEmmanuel Vadot		};
76*c66ec88fSEmmanuel Vadot	};
77*c66ec88fSEmmanuel Vadot
78*c66ec88fSEmmanuel Vadot	psci {
79*c66ec88fSEmmanuel Vadot		compatible = "arm,psci-0.2", "arm,psci";
80*c66ec88fSEmmanuel Vadot		method = "smc";
81*c66ec88fSEmmanuel Vadot		cpu_suspend = <0x84000001>;
82*c66ec88fSEmmanuel Vadot		cpu_off = <0x84000002>;
83*c66ec88fSEmmanuel Vadot		cpu_on = <0x84000003>;
84*c66ec88fSEmmanuel Vadot	};
85*c66ec88fSEmmanuel Vadot
86*c66ec88fSEmmanuel Vadot	sbclk: sbclk {
87*c66ec88fSEmmanuel Vadot		compatible = "fixed-clock";
88*c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
89*c66ec88fSEmmanuel Vadot		clock-frequency = <1000000>;
90*c66ec88fSEmmanuel Vadot	};
91*c66ec88fSEmmanuel Vadot
92*c66ec88fSEmmanuel Vadot	soc {
93*c66ec88fSEmmanuel Vadot		compatible = "simple-bus";
94*c66ec88fSEmmanuel Vadot		#address-cells = <2>;
95*c66ec88fSEmmanuel Vadot		#size-cells = <2>;
96*c66ec88fSEmmanuel Vadot
97*c66ec88fSEmmanuel Vadot		interrupt-parent = <&gic>;
98*c66ec88fSEmmanuel Vadot		ranges;
99*c66ec88fSEmmanuel Vadot
100*c66ec88fSEmmanuel Vadot		timer {
101*c66ec88fSEmmanuel Vadot			compatible = "arm,armv8-timer";
102*c66ec88fSEmmanuel Vadot			interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
103*c66ec88fSEmmanuel Vadot				     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
104*c66ec88fSEmmanuel Vadot				     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
105*c66ec88fSEmmanuel Vadot				     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
106*c66ec88fSEmmanuel Vadot		};
107*c66ec88fSEmmanuel Vadot
108*c66ec88fSEmmanuel Vadot		pmu {
109*c66ec88fSEmmanuel Vadot			compatible = "arm,armv8-pmuv3";
110*c66ec88fSEmmanuel Vadot			interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
111*c66ec88fSEmmanuel Vadot				     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
112*c66ec88fSEmmanuel Vadot				     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
113*c66ec88fSEmmanuel Vadot				     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
114*c66ec88fSEmmanuel Vadot		};
115*c66ec88fSEmmanuel Vadot
116*c66ec88fSEmmanuel Vadot		gic: gic@f0100000 {
117*c66ec88fSEmmanuel Vadot			compatible = "arm,gic-v3";
118*c66ec88fSEmmanuel Vadot			reg = <0x0 0xf0200000 0x0 0x10000>,	/* GIC Dist */
119*c66ec88fSEmmanuel Vadot			      <0x0 0xf0280000 0x0 0x200000>,	/* GICR */
120*c66ec88fSEmmanuel Vadot			      <0x0 0xf0100000 0x0 0x2000>,	/* GICC */
121*c66ec88fSEmmanuel Vadot			      <0x0 0xf0110000 0x0 0x2000>,	/* GICV */
122*c66ec88fSEmmanuel Vadot			      <0x0 0xf0120000 0x0 0x2000>;	/* GICH */
123*c66ec88fSEmmanuel Vadot			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
124*c66ec88fSEmmanuel Vadot			interrupt-controller;
125*c66ec88fSEmmanuel Vadot			#interrupt-cells = <3>;
126*c66ec88fSEmmanuel Vadot		};
127*c66ec88fSEmmanuel Vadot
128*c66ec88fSEmmanuel Vadot		pci@fbc00000 {
129*c66ec88fSEmmanuel Vadot			compatible = "pci-host-ecam-generic";
130*c66ec88fSEmmanuel Vadot			device_type = "pci";
131*c66ec88fSEmmanuel Vadot			#size-cells = <2>;
132*c66ec88fSEmmanuel Vadot			#address-cells = <3>;
133*c66ec88fSEmmanuel Vadot			#interrupt-cells = <1>;
134*c66ec88fSEmmanuel Vadot			reg = <0x0 0xfbc00000 0x0 0x100000>;
135*c66ec88fSEmmanuel Vadot			interrupt-map-mask = <0xf800 0 0 7>;
136*c66ec88fSEmmanuel Vadot			/* add legacy interrupts for SATA only */
137*c66ec88fSEmmanuel Vadot			interrupt-map = <0x4000 0 0 1 &gic 0 53 4>,
138*c66ec88fSEmmanuel Vadot					<0x4800 0 0 1 &gic 0 54 4>;
139*c66ec88fSEmmanuel Vadot			/* 32 bit non prefetchable memory space */
140*c66ec88fSEmmanuel Vadot			ranges = <0x2000000 0x0 0xfe000000 0x0 0xfe000000 0x0 0x1000000>;
141*c66ec88fSEmmanuel Vadot			bus-range = <0x00 0x00>;
142*c66ec88fSEmmanuel Vadot			msi-parent = <&msix>;
143*c66ec88fSEmmanuel Vadot		};
144*c66ec88fSEmmanuel Vadot
145*c66ec88fSEmmanuel Vadot		msix: msix@fbe00000 {
146*c66ec88fSEmmanuel Vadot			compatible = "al,alpine-msix";
147*c66ec88fSEmmanuel Vadot			reg = <0x0 0xfbe00000 0x0 0x100000>;
148*c66ec88fSEmmanuel Vadot			interrupt-controller;
149*c66ec88fSEmmanuel Vadot			msi-controller;
150*c66ec88fSEmmanuel Vadot			al,msi-base-spi = <160>;
151*c66ec88fSEmmanuel Vadot			al,msi-num-spis = <160>;
152*c66ec88fSEmmanuel Vadot		};
153*c66ec88fSEmmanuel Vadot
154*c66ec88fSEmmanuel Vadot		io-fabric {
155*c66ec88fSEmmanuel Vadot			compatible = "simple-bus";
156*c66ec88fSEmmanuel Vadot			#address-cells = <1>;
157*c66ec88fSEmmanuel Vadot			#size-cells = <1>;
158*c66ec88fSEmmanuel Vadot			ranges = <0x0 0x0 0xfc000000 0x2000000>;
159*c66ec88fSEmmanuel Vadot
160*c66ec88fSEmmanuel Vadot			uart0: serial@1883000 {
161*c66ec88fSEmmanuel Vadot				compatible = "ns16550a";
162*c66ec88fSEmmanuel Vadot				device_type = "serial";
163*c66ec88fSEmmanuel Vadot				reg = <0x1883000 0x1000>;
164*c66ec88fSEmmanuel Vadot				interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
165*c66ec88fSEmmanuel Vadot				clock-frequency = <500000000>;
166*c66ec88fSEmmanuel Vadot				reg-shift = <2>;
167*c66ec88fSEmmanuel Vadot				reg-io-width = <4>;
168*c66ec88fSEmmanuel Vadot				status = "disabled";
169*c66ec88fSEmmanuel Vadot			};
170*c66ec88fSEmmanuel Vadot
171*c66ec88fSEmmanuel Vadot			uart1: serial@1884000 {
172*c66ec88fSEmmanuel Vadot				compatible = "ns16550a";
173*c66ec88fSEmmanuel Vadot				device_type = "serial";
174*c66ec88fSEmmanuel Vadot				reg = <0x1884000 0x1000>;
175*c66ec88fSEmmanuel Vadot				interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
176*c66ec88fSEmmanuel Vadot				clock-frequency = <500000000>;
177*c66ec88fSEmmanuel Vadot				reg-shift = <2>;
178*c66ec88fSEmmanuel Vadot				reg-io-width = <4>;
179*c66ec88fSEmmanuel Vadot				status = "disabled";
180*c66ec88fSEmmanuel Vadot			};
181*c66ec88fSEmmanuel Vadot
182*c66ec88fSEmmanuel Vadot			uart2: serial@1885000 {
183*c66ec88fSEmmanuel Vadot				compatible = "ns16550a";
184*c66ec88fSEmmanuel Vadot				device_type = "serial";
185*c66ec88fSEmmanuel Vadot				reg = <0x1885000 0x1000>;
186*c66ec88fSEmmanuel Vadot				interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
187*c66ec88fSEmmanuel Vadot				clock-frequency = <500000000>;
188*c66ec88fSEmmanuel Vadot				reg-shift = <2>;
189*c66ec88fSEmmanuel Vadot				reg-io-width = <4>;
190*c66ec88fSEmmanuel Vadot				status = "disabled";
191*c66ec88fSEmmanuel Vadot			};
192*c66ec88fSEmmanuel Vadot
193*c66ec88fSEmmanuel Vadot			uart3: serial@1886000 {
194*c66ec88fSEmmanuel Vadot				compatible = "ns16550a";
195*c66ec88fSEmmanuel Vadot				device_type = "serial";
196*c66ec88fSEmmanuel Vadot				reg = <0x1886000 0x1000>;
197*c66ec88fSEmmanuel Vadot				interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
198*c66ec88fSEmmanuel Vadot				clock-frequency = <500000000>;
199*c66ec88fSEmmanuel Vadot				reg-shift = <2>;
200*c66ec88fSEmmanuel Vadot				reg-io-width = <4>;
201*c66ec88fSEmmanuel Vadot				status = "disabled";
202*c66ec88fSEmmanuel Vadot			};
203*c66ec88fSEmmanuel Vadot
204*c66ec88fSEmmanuel Vadot			timer0: timer@1890000 {
205*c66ec88fSEmmanuel Vadot				compatible = "arm,sp804", "arm,primecell";
206*c66ec88fSEmmanuel Vadot				reg = <0x1890000 0x1000>;
207*c66ec88fSEmmanuel Vadot				interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
208*c66ec88fSEmmanuel Vadot				clocks = <&sbclk>;
209*c66ec88fSEmmanuel Vadot			};
210*c66ec88fSEmmanuel Vadot
211*c66ec88fSEmmanuel Vadot			timer1: timer@1891000 {
212*c66ec88fSEmmanuel Vadot				compatible = "arm,sp804", "arm,primecell";
213*c66ec88fSEmmanuel Vadot				reg = <0x1891000 0x1000>;
214*c66ec88fSEmmanuel Vadot				interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
215*c66ec88fSEmmanuel Vadot				clocks = <&sbclk>;
216*c66ec88fSEmmanuel Vadot				status = "disabled";
217*c66ec88fSEmmanuel Vadot			};
218*c66ec88fSEmmanuel Vadot
219*c66ec88fSEmmanuel Vadot			timer2: timer@1892000 {
220*c66ec88fSEmmanuel Vadot				compatible = "arm,sp804", "arm,primecell";
221*c66ec88fSEmmanuel Vadot				reg = <0x1892000 0x1000>;
222*c66ec88fSEmmanuel Vadot				interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
223*c66ec88fSEmmanuel Vadot				clocks = <&sbclk>;
224*c66ec88fSEmmanuel Vadot				status = "disabled";
225*c66ec88fSEmmanuel Vadot			};
226*c66ec88fSEmmanuel Vadot
227*c66ec88fSEmmanuel Vadot			timer3: timer@1893000 {
228*c66ec88fSEmmanuel Vadot				compatible = "arm,sp804", "arm,primecell";
229*c66ec88fSEmmanuel Vadot				reg = <0x1893000 0x1000>;
230*c66ec88fSEmmanuel Vadot				interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
231*c66ec88fSEmmanuel Vadot				clocks = <&sbclk>;
232*c66ec88fSEmmanuel Vadot				status = "disabled";
233*c66ec88fSEmmanuel Vadot			};
234*c66ec88fSEmmanuel Vadot		};
235*c66ec88fSEmmanuel Vadot	};
236*c66ec88fSEmmanuel Vadot};
237