149669da6SLad Prabhakar// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
249669da6SLad Prabhakar/*
349669da6SLad Prabhakar * Device Tree Source for the RZ/G2UL SoC
449669da6SLad Prabhakar *
549669da6SLad Prabhakar * Copyright (C) 2022 Renesas Electronics Corp.
649669da6SLad Prabhakar */
749669da6SLad Prabhakar
849669da6SLad Prabhakar#include <dt-bindings/interrupt-controller/arm-gic.h>
949669da6SLad Prabhakar
1049669da6SLad Prabhakar#define SOC_PERIPHERAL_IRQ(nr)		GIC_SPI nr
1149669da6SLad Prabhakar
1249669da6SLad Prabhakar#include "r9a07g043.dtsi"
13b9a0be20SLad Prabhakar
14b9a0be20SLad Prabhakar/ {
15b9a0be20SLad Prabhakar	cpus {
16b9a0be20SLad Prabhakar		#address-cells = <1>;
17b9a0be20SLad Prabhakar		#size-cells = <0>;
18b9a0be20SLad Prabhakar
19b9a0be20SLad Prabhakar		cpu0: cpu@0 {
20b9a0be20SLad Prabhakar			compatible = "arm,cortex-a55";
21b9a0be20SLad Prabhakar			reg = <0>;
22b9a0be20SLad Prabhakar			device_type = "cpu";
23b9a0be20SLad Prabhakar			#cooling-cells = <2>;
24b9a0be20SLad Prabhakar			next-level-cache = <&L3_CA55>;
25b9a0be20SLad Prabhakar			enable-method = "psci";
26b9a0be20SLad Prabhakar			clocks = <&cpg CPG_CORE R9A07G043_CLK_I>;
27b9a0be20SLad Prabhakar			operating-points-v2 = <&cluster0_opp>;
28b9a0be20SLad Prabhakar		};
29b9a0be20SLad Prabhakar
30b9a0be20SLad Prabhakar		L3_CA55: cache-controller-0 {
31b9a0be20SLad Prabhakar			compatible = "cache";
32b9a0be20SLad Prabhakar			cache-unified;
33b9a0be20SLad Prabhakar			cache-size = <0x40000>;
344662d6e8SPierre Gondois			cache-level = <3>;
35b9a0be20SLad Prabhakar		};
36b9a0be20SLad Prabhakar	};
37b9a0be20SLad Prabhakar
38805ed6d6SLad Prabhakar	pmu {
39805ed6d6SLad Prabhakar		compatible = "arm,cortex-a55-pmu";
40805ed6d6SLad Prabhakar		interrupts-extended = <&gic GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
41805ed6d6SLad Prabhakar	};
42805ed6d6SLad Prabhakar
43b9a0be20SLad Prabhakar	psci {
44b9a0be20SLad Prabhakar		compatible = "arm,psci-1.0", "arm,psci-0.2";
45b9a0be20SLad Prabhakar		method = "smc";
46b9a0be20SLad Prabhakar	};
47b9a0be20SLad Prabhakar
48b9a0be20SLad Prabhakar	timer {
49b9a0be20SLad Prabhakar		compatible = "arm,armv8-timer";
508b6a006cSLad Prabhakar		interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
518b6a006cSLad Prabhakar				      <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
528b6a006cSLad Prabhakar				      <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
5335dcc7e3SGeert Uytterhoeven				      <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>,
5435dcc7e3SGeert Uytterhoeven				      <&gic GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>;
5535dcc7e3SGeert Uytterhoeven		interrupt-names = "sec-phys", "phys", "virt", "hyp-phys",
5635dcc7e3SGeert Uytterhoeven				  "hyp-virt";
57b9a0be20SLad Prabhakar	};
58b9a0be20SLad Prabhakar};
59b9a0be20SLad Prabhakar
6085169df7SLad Prabhakar&pinctrl {
6185169df7SLad Prabhakar	interrupt-parent = <&irqc>;
6285169df7SLad Prabhakar};
6385169df7SLad Prabhakar
64b9a0be20SLad Prabhakar&soc {
65b9a0be20SLad Prabhakar	interrupt-parent = <&gic>;
66b9a0be20SLad Prabhakar
6748ab6eddSLad Prabhakar	irqc: interrupt-controller@110a0000 {
6848ab6eddSLad Prabhakar		compatible = "renesas,r9a07g043u-irqc",
6948ab6eddSLad Prabhakar			     "renesas,rzg2l-irqc";
7048ab6eddSLad Prabhakar		reg = <0 0x110a0000 0 0x10000>;
7148ab6eddSLad Prabhakar		#interrupt-cells = <2>;
7248ab6eddSLad Prabhakar		#address-cells = <0>;
7348ab6eddSLad Prabhakar		interrupt-controller;
7448ab6eddSLad Prabhakar		interrupts = <SOC_PERIPHERAL_IRQ(0) IRQ_TYPE_LEVEL_HIGH>,
7548ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(1) IRQ_TYPE_LEVEL_HIGH>,
7648ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(2) IRQ_TYPE_LEVEL_HIGH>,
7748ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(3) IRQ_TYPE_LEVEL_HIGH>,
7848ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(4) IRQ_TYPE_LEVEL_HIGH>,
7948ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(5) IRQ_TYPE_LEVEL_HIGH>,
8048ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(6) IRQ_TYPE_LEVEL_HIGH>,
8148ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(7) IRQ_TYPE_LEVEL_HIGH>,
8248ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(8) IRQ_TYPE_LEVEL_HIGH>,
8348ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(444) IRQ_TYPE_LEVEL_HIGH>,
8448ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(445) IRQ_TYPE_LEVEL_HIGH>,
8548ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(446) IRQ_TYPE_LEVEL_HIGH>,
8648ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(447) IRQ_TYPE_LEVEL_HIGH>,
8748ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(448) IRQ_TYPE_LEVEL_HIGH>,
8848ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(449) IRQ_TYPE_LEVEL_HIGH>,
8948ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(450) IRQ_TYPE_LEVEL_HIGH>,
9048ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(451) IRQ_TYPE_LEVEL_HIGH>,
9148ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(452) IRQ_TYPE_LEVEL_HIGH>,
9248ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(453) IRQ_TYPE_LEVEL_HIGH>,
9348ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(454) IRQ_TYPE_LEVEL_HIGH>,
9448ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(455) IRQ_TYPE_LEVEL_HIGH>,
9548ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(456) IRQ_TYPE_LEVEL_HIGH>,
9648ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(457) IRQ_TYPE_LEVEL_HIGH>,
9748ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(458) IRQ_TYPE_LEVEL_HIGH>,
9848ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(459) IRQ_TYPE_LEVEL_HIGH>,
9948ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(460) IRQ_TYPE_LEVEL_HIGH>,
10048ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(461) IRQ_TYPE_LEVEL_HIGH>,
10148ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(462) IRQ_TYPE_LEVEL_HIGH>,
10248ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(463) IRQ_TYPE_LEVEL_HIGH>,
10348ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(464) IRQ_TYPE_LEVEL_HIGH>,
10448ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(465) IRQ_TYPE_LEVEL_HIGH>,
10548ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(466) IRQ_TYPE_LEVEL_HIGH>,
10648ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(467) IRQ_TYPE_LEVEL_HIGH>,
10748ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(468) IRQ_TYPE_LEVEL_HIGH>,
10848ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(469) IRQ_TYPE_LEVEL_HIGH>,
10948ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(470) IRQ_TYPE_LEVEL_HIGH>,
11048ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(471) IRQ_TYPE_LEVEL_HIGH>,
11148ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(472) IRQ_TYPE_LEVEL_HIGH>,
11248ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(473) IRQ_TYPE_LEVEL_HIGH>,
11348ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(474) IRQ_TYPE_LEVEL_HIGH>,
11448ab6eddSLad Prabhakar			     <SOC_PERIPHERAL_IRQ(475) IRQ_TYPE_LEVEL_HIGH>,
11525d7fe04SLad Prabhakar			     <SOC_PERIPHERAL_IRQ(25) IRQ_TYPE_EDGE_RISING>,
11625d7fe04SLad Prabhakar			     <SOC_PERIPHERAL_IRQ(34) IRQ_TYPE_EDGE_RISING>,
11725d7fe04SLad Prabhakar			     <SOC_PERIPHERAL_IRQ(35) IRQ_TYPE_EDGE_RISING>,
11825d7fe04SLad Prabhakar			     <SOC_PERIPHERAL_IRQ(36) IRQ_TYPE_EDGE_RISING>,
11925d7fe04SLad Prabhakar			     <SOC_PERIPHERAL_IRQ(37) IRQ_TYPE_EDGE_RISING>,
12025d7fe04SLad Prabhakar			     <SOC_PERIPHERAL_IRQ(38) IRQ_TYPE_EDGE_RISING>,
12125d7fe04SLad Prabhakar			     <SOC_PERIPHERAL_IRQ(39) IRQ_TYPE_EDGE_RISING>;
12248ab6eddSLad Prabhakar		interrupt-names = "nmi",
12348ab6eddSLad Prabhakar				  "irq0", "irq1", "irq2", "irq3",
12448ab6eddSLad Prabhakar				  "irq4", "irq5", "irq6", "irq7",
12548ab6eddSLad Prabhakar				  "tint0", "tint1", "tint2", "tint3",
12648ab6eddSLad Prabhakar				  "tint4", "tint5", "tint6", "tint7",
12748ab6eddSLad Prabhakar				  "tint8", "tint9", "tint10", "tint11",
12848ab6eddSLad Prabhakar				  "tint12", "tint13", "tint14", "tint15",
12948ab6eddSLad Prabhakar				  "tint16", "tint17", "tint18", "tint19",
13048ab6eddSLad Prabhakar				  "tint20", "tint21", "tint22", "tint23",
13148ab6eddSLad Prabhakar				  "tint24", "tint25", "tint26", "tint27",
13248ab6eddSLad Prabhakar				  "tint28", "tint29", "tint30", "tint31",
13325d7fe04SLad Prabhakar				  "bus-err", "ec7tie1-0", "ec7tie2-0",
13425d7fe04SLad Prabhakar				  "ec7tiovf-0", "ec7tie1-1", "ec7tie2-1",
13525d7fe04SLad Prabhakar				  "ec7tiovf-1";
13648ab6eddSLad Prabhakar		clocks = <&cpg CPG_MOD R9A07G043_IA55_CLK>,
13748ab6eddSLad Prabhakar			<&cpg CPG_MOD R9A07G043_IA55_PCLK>;
13848ab6eddSLad Prabhakar		clock-names = "clk", "pclk";
13948ab6eddSLad Prabhakar		power-domains = <&cpg>;
14048ab6eddSLad Prabhakar		resets = <&cpg R9A07G043_IA55_RESETN>;
14148ab6eddSLad Prabhakar	};
14248ab6eddSLad Prabhakar
143b9a0be20SLad Prabhakar	gic: interrupt-controller@11900000 {
144b9a0be20SLad Prabhakar		compatible = "arm,gic-v3";
145b9a0be20SLad Prabhakar		#interrupt-cells = <3>;
146b9a0be20SLad Prabhakar		#address-cells = <0>;
147b9a0be20SLad Prabhakar		interrupt-controller;
148*7d0be362SLad Prabhakar		reg = <0x0 0x11900000 0 0x20000>,
149*7d0be362SLad Prabhakar		      <0x0 0x11940000 0 0x40000>;
150b9a0be20SLad Prabhakar		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
151b9a0be20SLad Prabhakar	};
152b9a0be20SLad Prabhakar};
153b9a0be20SLad Prabhakar
154b9a0be20SLad Prabhakar&sysc {
155b9a0be20SLad Prabhakar	interrupts = <SOC_PERIPHERAL_IRQ(42) IRQ_TYPE_LEVEL_HIGH>,
156b9a0be20SLad Prabhakar		     <SOC_PERIPHERAL_IRQ(43) IRQ_TYPE_LEVEL_HIGH>,
157b9a0be20SLad Prabhakar		     <SOC_PERIPHERAL_IRQ(44) IRQ_TYPE_LEVEL_HIGH>,
158b9a0be20SLad Prabhakar		     <SOC_PERIPHERAL_IRQ(45) IRQ_TYPE_LEVEL_HIGH>;
159b9a0be20SLad Prabhakar	interrupt-names = "lpm_int", "ca55stbydone_int",
160b9a0be20SLad Prabhakar			  "cm33stbyr_int", "ca55_deny";
161b9a0be20SLad Prabhakar};
162