18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * dtsi file for Cavium ThunderX2 CN99XX processor
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (c) 2017 Cavium Inc.
68c2ecf20Sopenharmony_ci * Copyright (c) 2013-2016 Broadcom
78c2ecf20Sopenharmony_ci * Author: Zi Shen Lim <zlim@broadcom.com>
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#include <dt-bindings/interrupt-controller/arm-gic.h>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci/ {
138c2ecf20Sopenharmony_ci	model = "Cavium ThunderX2 CN99XX";
148c2ecf20Sopenharmony_ci	compatible = "cavium,thunderx2-cn9900", "brcm,vulcan-soc";
158c2ecf20Sopenharmony_ci	interrupt-parent = <&gic>;
168c2ecf20Sopenharmony_ci	#address-cells = <2>;
178c2ecf20Sopenharmony_ci	#size-cells = <2>;
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci	/* just 4 cpus now, 128 needed in full config */
208c2ecf20Sopenharmony_ci	cpus {
218c2ecf20Sopenharmony_ci		#address-cells = <0x2>;
228c2ecf20Sopenharmony_ci		#size-cells = <0x0>;
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci		cpu@0 {
258c2ecf20Sopenharmony_ci			device_type = "cpu";
268c2ecf20Sopenharmony_ci			compatible = "cavium,thunder2", "brcm,vulcan";
278c2ecf20Sopenharmony_ci			reg = <0x0 0x0>;
288c2ecf20Sopenharmony_ci			enable-method = "psci";
298c2ecf20Sopenharmony_ci		};
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci		cpu@1 {
328c2ecf20Sopenharmony_ci			device_type = "cpu";
338c2ecf20Sopenharmony_ci			compatible = "cavium,thunder2", "brcm,vulcan";
348c2ecf20Sopenharmony_ci			reg = <0x0 0x1>;
358c2ecf20Sopenharmony_ci			enable-method = "psci";
368c2ecf20Sopenharmony_ci		};
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci		cpu@2 {
398c2ecf20Sopenharmony_ci			device_type = "cpu";
408c2ecf20Sopenharmony_ci			compatible = "cavium,thunder2", "brcm,vulcan";
418c2ecf20Sopenharmony_ci			reg = <0x0 0x2>;
428c2ecf20Sopenharmony_ci			enable-method = "psci";
438c2ecf20Sopenharmony_ci		};
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci		cpu@3 {
468c2ecf20Sopenharmony_ci			device_type = "cpu";
478c2ecf20Sopenharmony_ci			compatible = "cavium,thunder2", "brcm,vulcan";
488c2ecf20Sopenharmony_ci			reg = <0x0 0x3>;
498c2ecf20Sopenharmony_ci			enable-method = "psci";
508c2ecf20Sopenharmony_ci		};
518c2ecf20Sopenharmony_ci	};
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci	psci {
548c2ecf20Sopenharmony_ci		compatible = "arm,psci-0.2";
558c2ecf20Sopenharmony_ci		method = "smc";
568c2ecf20Sopenharmony_ci	};
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci	gic: interrupt-controller@400080000 {
598c2ecf20Sopenharmony_ci		compatible = "arm,gic-v3";
608c2ecf20Sopenharmony_ci		#interrupt-cells = <3>;
618c2ecf20Sopenharmony_ci		#address-cells = <2>;
628c2ecf20Sopenharmony_ci		#size-cells = <2>;
638c2ecf20Sopenharmony_ci		ranges;
648c2ecf20Sopenharmony_ci		interrupt-controller;
658c2ecf20Sopenharmony_ci		#redistributor-regions = <1>;
668c2ecf20Sopenharmony_ci		reg = <0x04 0x00080000 0x0 0x20000>,	/* GICD */
678c2ecf20Sopenharmony_ci		      <0x04 0x01000000 0x0 0x1000000>;	/* GICR */
688c2ecf20Sopenharmony_ci		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci		gicits: gic-its@40010000 {
718c2ecf20Sopenharmony_ci			compatible = "arm,gic-v3-its";
728c2ecf20Sopenharmony_ci			msi-controller;
738c2ecf20Sopenharmony_ci			reg = <0x04 0x00100000 0x0 0x20000>;	/* GIC ITS */
748c2ecf20Sopenharmony_ci		};
758c2ecf20Sopenharmony_ci	};
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci	timer {
788c2ecf20Sopenharmony_ci		compatible = "arm,armv8-timer";
798c2ecf20Sopenharmony_ci		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>,
808c2ecf20Sopenharmony_ci			     <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>,
818c2ecf20Sopenharmony_ci			     <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>,
828c2ecf20Sopenharmony_ci			     <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>;
838c2ecf20Sopenharmony_ci	};
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci	pmu {
868c2ecf20Sopenharmony_ci		compatible = "brcm,vulcan-pmu", "arm,armv8-pmuv3";
878c2ecf20Sopenharmony_ci		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>; /* PMU overflow */
888c2ecf20Sopenharmony_ci	};
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ci	clk125mhz: uart_clk125mhz {
918c2ecf20Sopenharmony_ci		compatible = "fixed-clock";
928c2ecf20Sopenharmony_ci		#clock-cells = <0>;
938c2ecf20Sopenharmony_ci		clock-frequency = <125000000>;
948c2ecf20Sopenharmony_ci		clock-output-names = "clk125mhz";
958c2ecf20Sopenharmony_ci	};
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci	pcie@30000000 {
988c2ecf20Sopenharmony_ci		compatible = "pci-host-ecam-generic";
998c2ecf20Sopenharmony_ci		device_type = "pci";
1008c2ecf20Sopenharmony_ci		#interrupt-cells = <1>;
1018c2ecf20Sopenharmony_ci		#address-cells = <3>;
1028c2ecf20Sopenharmony_ci		#size-cells = <2>;
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci		/* ECAM at 0x3000_0000 - 0x4000_0000 */
1058c2ecf20Sopenharmony_ci		reg = <0x0 0x30000000  0x0 0x10000000>;
1068c2ecf20Sopenharmony_ci		reg-names = "PCI ECAM";
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci		/*
1098c2ecf20Sopenharmony_ci		 * PCI ranges:
1108c2ecf20Sopenharmony_ci		 *   IO		no supported
1118c2ecf20Sopenharmony_ci		 *   MEM        0x4000_0000 - 0x6000_0000
1128c2ecf20Sopenharmony_ci		 *   MEM64 pref 0x40_0000_0000 - 0x60_0000_0000
1138c2ecf20Sopenharmony_ci		 */
1148c2ecf20Sopenharmony_ci		ranges =
1158c2ecf20Sopenharmony_ci		  <0x02000000    0 0x40000000    0 0x40000000    0 0x20000000
1168c2ecf20Sopenharmony_ci		   0x43000000 0x40 0x00000000 0x40 0x00000000 0x20 0x00000000>;
1178c2ecf20Sopenharmony_ci		bus-range = <0 0xff>;
1188c2ecf20Sopenharmony_ci		interrupt-map-mask = <0 0 0 7>;
1198c2ecf20Sopenharmony_ci		interrupt-map =
1208c2ecf20Sopenharmony_ci		      /* addr  pin  ic   icaddr  icintr */
1218c2ecf20Sopenharmony_ci			<0 0 0  1  &gic   0 0    GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH
1228c2ecf20Sopenharmony_ci			 0 0 0  2  &gic   0 0    GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH
1238c2ecf20Sopenharmony_ci			 0 0 0  3  &gic   0 0    GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH
1248c2ecf20Sopenharmony_ci			 0 0 0  4  &gic   0 0    GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
1258c2ecf20Sopenharmony_ci		msi-parent = <&gicits>;
1268c2ecf20Sopenharmony_ci		dma-coherent;
1278c2ecf20Sopenharmony_ci	};
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci	soc {
1308c2ecf20Sopenharmony_ci		compatible = "simple-bus";
1318c2ecf20Sopenharmony_ci		#address-cells = <2>;
1328c2ecf20Sopenharmony_ci		#size-cells = <2>;
1338c2ecf20Sopenharmony_ci		ranges;
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_ci		uart0: serial@402020000 {
1368c2ecf20Sopenharmony_ci			compatible = "arm,pl011", "arm,primecell";
1378c2ecf20Sopenharmony_ci			reg = <0x04 0x02020000 0x0 0x1000>;
1388c2ecf20Sopenharmony_ci			interrupt-parent = <&gic>;
1398c2ecf20Sopenharmony_ci			interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
1408c2ecf20Sopenharmony_ci			clocks = <&clk125mhz>;
1418c2ecf20Sopenharmony_ci			clock-names = "apb_pclk";
1428c2ecf20Sopenharmony_ci		};
1438c2ecf20Sopenharmony_ci	};
1448c2ecf20Sopenharmony_ci
1458c2ecf20Sopenharmony_ci};
146