18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Antoine Tenart <antoine.tenart@free-electrons.com>
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two
78c2ecf20Sopenharmony_ci * licenses.  You may choose to be licensed under the terms of the GNU
88c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file
98c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the
108c2ecf20Sopenharmony_ci * BSD license below:
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci *     Redistribution and use in source and binary forms, with or
138c2ecf20Sopenharmony_ci *     without modification, are permitted provided that the following
148c2ecf20Sopenharmony_ci *     conditions are met:
158c2ecf20Sopenharmony_ci *
168c2ecf20Sopenharmony_ci *      - Redistributions of source code must retain the above
178c2ecf20Sopenharmony_ci *        copyright notice, this list of conditions and the following
188c2ecf20Sopenharmony_ci *        disclaimer.
198c2ecf20Sopenharmony_ci *
208c2ecf20Sopenharmony_ci *      - Redistributions in binary form must reproduce the above
218c2ecf20Sopenharmony_ci *        copyright notice, this list of conditions and the following
228c2ecf20Sopenharmony_ci *        disclaimer in the documentation and/or other materials
238c2ecf20Sopenharmony_ci *        provided with the distribution.
248c2ecf20Sopenharmony_ci *
258c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
268c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
278c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
288c2ecf20Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
298c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
308c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
318c2ecf20Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
328c2ecf20Sopenharmony_ci * SOFTWARE.
338c2ecf20Sopenharmony_ci */
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci/dts-v1/;
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci#include <dt-bindings/interrupt-controller/arm-gic.h>
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci/ {
408c2ecf20Sopenharmony_ci	model = "Annapurna Labs Alpine v2";
418c2ecf20Sopenharmony_ci	compatible = "al,alpine-v2";
428c2ecf20Sopenharmony_ci	#address-cells = <2>;
438c2ecf20Sopenharmony_ci	#size-cells = <2>;
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci	cpus {
468c2ecf20Sopenharmony_ci		#address-cells = <2>;
478c2ecf20Sopenharmony_ci		#size-cells = <0>;
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci		cpu@0 {
508c2ecf20Sopenharmony_ci			compatible = "arm,cortex-a57";
518c2ecf20Sopenharmony_ci			device_type = "cpu";
528c2ecf20Sopenharmony_ci			reg = <0x0 0x0>;
538c2ecf20Sopenharmony_ci			enable-method = "psci";
548c2ecf20Sopenharmony_ci		};
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci		cpu@1 {
578c2ecf20Sopenharmony_ci			compatible = "arm,cortex-a57";
588c2ecf20Sopenharmony_ci			device_type = "cpu";
598c2ecf20Sopenharmony_ci			reg = <0x0 0x1>;
608c2ecf20Sopenharmony_ci			enable-method = "psci";
618c2ecf20Sopenharmony_ci		};
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci		cpu@2 {
648c2ecf20Sopenharmony_ci			compatible = "arm,cortex-a57";
658c2ecf20Sopenharmony_ci			device_type = "cpu";
668c2ecf20Sopenharmony_ci			reg = <0x0 0x2>;
678c2ecf20Sopenharmony_ci			enable-method = "psci";
688c2ecf20Sopenharmony_ci		};
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci		cpu@3 {
718c2ecf20Sopenharmony_ci			compatible = "arm,cortex-a57";
728c2ecf20Sopenharmony_ci			device_type = "cpu";
738c2ecf20Sopenharmony_ci			reg = <0x0 0x3>;
748c2ecf20Sopenharmony_ci			enable-method = "psci";
758c2ecf20Sopenharmony_ci		};
768c2ecf20Sopenharmony_ci	};
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci	psci {
798c2ecf20Sopenharmony_ci		compatible = "arm,psci-0.2", "arm,psci";
808c2ecf20Sopenharmony_ci		method = "smc";
818c2ecf20Sopenharmony_ci		cpu_suspend = <0x84000001>;
828c2ecf20Sopenharmony_ci		cpu_off = <0x84000002>;
838c2ecf20Sopenharmony_ci		cpu_on = <0x84000003>;
848c2ecf20Sopenharmony_ci	};
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ci	sbclk: sbclk {
878c2ecf20Sopenharmony_ci		compatible = "fixed-clock";
888c2ecf20Sopenharmony_ci		#clock-cells = <0>;
898c2ecf20Sopenharmony_ci		clock-frequency = <1000000>;
908c2ecf20Sopenharmony_ci	};
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci	soc {
938c2ecf20Sopenharmony_ci		compatible = "simple-bus";
948c2ecf20Sopenharmony_ci		#address-cells = <2>;
958c2ecf20Sopenharmony_ci		#size-cells = <2>;
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci		interrupt-parent = <&gic>;
988c2ecf20Sopenharmony_ci		ranges;
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ci		timer {
1018c2ecf20Sopenharmony_ci			compatible = "arm,armv8-timer";
1028c2ecf20Sopenharmony_ci			interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
1038c2ecf20Sopenharmony_ci				     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
1048c2ecf20Sopenharmony_ci				     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
1058c2ecf20Sopenharmony_ci				     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
1068c2ecf20Sopenharmony_ci		};
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci		pmu {
1098c2ecf20Sopenharmony_ci			compatible = "arm,armv8-pmuv3";
1108c2ecf20Sopenharmony_ci			interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
1118c2ecf20Sopenharmony_ci				     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
1128c2ecf20Sopenharmony_ci				     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
1138c2ecf20Sopenharmony_ci				     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
1148c2ecf20Sopenharmony_ci		};
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci		gic: interrupt-controller@f0200000 {
1178c2ecf20Sopenharmony_ci			compatible = "arm,gic-v3";
1188c2ecf20Sopenharmony_ci			reg = <0x0 0xf0200000 0x0 0x10000>,	/* GIC Dist */
1198c2ecf20Sopenharmony_ci			      <0x0 0xf0280000 0x0 0x200000>,	/* GICR */
1208c2ecf20Sopenharmony_ci			      <0x0 0xf0100000 0x0 0x2000>,	/* GICC */
1218c2ecf20Sopenharmony_ci			      <0x0 0xf0110000 0x0 0x2000>,	/* GICV */
1228c2ecf20Sopenharmony_ci			      <0x0 0xf0120000 0x0 0x2000>;	/* GICH */
1238c2ecf20Sopenharmony_ci			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
1248c2ecf20Sopenharmony_ci			interrupt-controller;
1258c2ecf20Sopenharmony_ci			#interrupt-cells = <3>;
1268c2ecf20Sopenharmony_ci		};
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci		pci@fbc00000 {
1298c2ecf20Sopenharmony_ci			compatible = "pci-host-ecam-generic";
1308c2ecf20Sopenharmony_ci			device_type = "pci";
1318c2ecf20Sopenharmony_ci			#size-cells = <2>;
1328c2ecf20Sopenharmony_ci			#address-cells = <3>;
1338c2ecf20Sopenharmony_ci			#interrupt-cells = <1>;
1348c2ecf20Sopenharmony_ci			reg = <0x0 0xfbc00000 0x0 0x100000>;
1358c2ecf20Sopenharmony_ci			interrupt-map-mask = <0xf800 0 0 7>;
1368c2ecf20Sopenharmony_ci			/* add legacy interrupts for SATA only */
1378c2ecf20Sopenharmony_ci			interrupt-map = <0x4000 0 0 1 &gic 0 53 4>,
1388c2ecf20Sopenharmony_ci					<0x4800 0 0 1 &gic 0 54 4>;
1398c2ecf20Sopenharmony_ci			/* 32 bit non prefetchable memory space */
1408c2ecf20Sopenharmony_ci			ranges = <0x2000000 0x0 0xfe000000 0x0 0xfe000000 0x0 0x1000000>;
1418c2ecf20Sopenharmony_ci			bus-range = <0x00 0x00>;
1428c2ecf20Sopenharmony_ci			msi-parent = <&msix>;
1438c2ecf20Sopenharmony_ci		};
1448c2ecf20Sopenharmony_ci
1458c2ecf20Sopenharmony_ci		msix: msix@fbe00000 {
1468c2ecf20Sopenharmony_ci			compatible = "al,alpine-msix";
1478c2ecf20Sopenharmony_ci			reg = <0x0 0xfbe00000 0x0 0x100000>;
1488c2ecf20Sopenharmony_ci			interrupt-controller;
1498c2ecf20Sopenharmony_ci			msi-controller;
1508c2ecf20Sopenharmony_ci			al,msi-base-spi = <160>;
1518c2ecf20Sopenharmony_ci			al,msi-num-spis = <160>;
1528c2ecf20Sopenharmony_ci		};
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ci		io-fabric {
1558c2ecf20Sopenharmony_ci			compatible = "simple-bus";
1568c2ecf20Sopenharmony_ci			#address-cells = <1>;
1578c2ecf20Sopenharmony_ci			#size-cells = <1>;
1588c2ecf20Sopenharmony_ci			ranges = <0x0 0x0 0xfc000000 0x2000000>;
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ci			uart0: serial@1883000 {
1618c2ecf20Sopenharmony_ci				compatible = "ns16550a";
1628c2ecf20Sopenharmony_ci				device_type = "serial";
1638c2ecf20Sopenharmony_ci				reg = <0x1883000 0x1000>;
1648c2ecf20Sopenharmony_ci				interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
1658c2ecf20Sopenharmony_ci				clock-frequency = <500000000>;
1668c2ecf20Sopenharmony_ci				reg-shift = <2>;
1678c2ecf20Sopenharmony_ci				reg-io-width = <4>;
1688c2ecf20Sopenharmony_ci				status = "disabled";
1698c2ecf20Sopenharmony_ci			};
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci			uart1: serial@1884000 {
1728c2ecf20Sopenharmony_ci				compatible = "ns16550a";
1738c2ecf20Sopenharmony_ci				device_type = "serial";
1748c2ecf20Sopenharmony_ci				reg = <0x1884000 0x1000>;
1758c2ecf20Sopenharmony_ci				interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
1768c2ecf20Sopenharmony_ci				clock-frequency = <500000000>;
1778c2ecf20Sopenharmony_ci				reg-shift = <2>;
1788c2ecf20Sopenharmony_ci				reg-io-width = <4>;
1798c2ecf20Sopenharmony_ci				status = "disabled";
1808c2ecf20Sopenharmony_ci			};
1818c2ecf20Sopenharmony_ci
1828c2ecf20Sopenharmony_ci			uart2: serial@1885000 {
1838c2ecf20Sopenharmony_ci				compatible = "ns16550a";
1848c2ecf20Sopenharmony_ci				device_type = "serial";
1858c2ecf20Sopenharmony_ci				reg = <0x1885000 0x1000>;
1868c2ecf20Sopenharmony_ci				interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
1878c2ecf20Sopenharmony_ci				clock-frequency = <500000000>;
1888c2ecf20Sopenharmony_ci				reg-shift = <2>;
1898c2ecf20Sopenharmony_ci				reg-io-width = <4>;
1908c2ecf20Sopenharmony_ci				status = "disabled";
1918c2ecf20Sopenharmony_ci			};
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ci			uart3: serial@1886000 {
1948c2ecf20Sopenharmony_ci				compatible = "ns16550a";
1958c2ecf20Sopenharmony_ci				device_type = "serial";
1968c2ecf20Sopenharmony_ci				reg = <0x1886000 0x1000>;
1978c2ecf20Sopenharmony_ci				interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
1988c2ecf20Sopenharmony_ci				clock-frequency = <500000000>;
1998c2ecf20Sopenharmony_ci				reg-shift = <2>;
2008c2ecf20Sopenharmony_ci				reg-io-width = <4>;
2018c2ecf20Sopenharmony_ci				status = "disabled";
2028c2ecf20Sopenharmony_ci			};
2038c2ecf20Sopenharmony_ci
2048c2ecf20Sopenharmony_ci			timer0: timer@1890000 {
2058c2ecf20Sopenharmony_ci				compatible = "arm,sp804", "arm,primecell";
2068c2ecf20Sopenharmony_ci				reg = <0x1890000 0x1000>;
2078c2ecf20Sopenharmony_ci				interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
2088c2ecf20Sopenharmony_ci				clocks = <&sbclk>;
2098c2ecf20Sopenharmony_ci			};
2108c2ecf20Sopenharmony_ci
2118c2ecf20Sopenharmony_ci			timer1: timer@1891000 {
2128c2ecf20Sopenharmony_ci				compatible = "arm,sp804", "arm,primecell";
2138c2ecf20Sopenharmony_ci				reg = <0x1891000 0x1000>;
2148c2ecf20Sopenharmony_ci				interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
2158c2ecf20Sopenharmony_ci				clocks = <&sbclk>;
2168c2ecf20Sopenharmony_ci				status = "disabled";
2178c2ecf20Sopenharmony_ci			};
2188c2ecf20Sopenharmony_ci
2198c2ecf20Sopenharmony_ci			timer2: timer@1892000 {
2208c2ecf20Sopenharmony_ci				compatible = "arm,sp804", "arm,primecell";
2218c2ecf20Sopenharmony_ci				reg = <0x1892000 0x1000>;
2228c2ecf20Sopenharmony_ci				interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
2238c2ecf20Sopenharmony_ci				clocks = <&sbclk>;
2248c2ecf20Sopenharmony_ci				status = "disabled";
2258c2ecf20Sopenharmony_ci			};
2268c2ecf20Sopenharmony_ci
2278c2ecf20Sopenharmony_ci			timer3: timer@1893000 {
2288c2ecf20Sopenharmony_ci				compatible = "arm,sp804", "arm,primecell";
2298c2ecf20Sopenharmony_ci				reg = <0x1893000 0x1000>;
2308c2ecf20Sopenharmony_ci				interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
2318c2ecf20Sopenharmony_ci				clocks = <&sbclk>;
2328c2ecf20Sopenharmony_ci				status = "disabled";
2338c2ecf20Sopenharmony_ci			};
2348c2ecf20Sopenharmony_ci		};
2358c2ecf20Sopenharmony_ci	};
2368c2ecf20Sopenharmony_ci};
237