162306a36Sopenharmony_ci// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Device Tree Source for the RZ/G2UL SoC
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2022 Renesas Electronics Corp.
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#include <dt-bindings/interrupt-controller/arm-gic.h>
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#define SOC_PERIPHERAL_IRQ(nr)		GIC_SPI nr
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#include "r9a07g043.dtsi"
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci/ {
1562306a36Sopenharmony_ci	cpus {
1662306a36Sopenharmony_ci		#address-cells = <1>;
1762306a36Sopenharmony_ci		#size-cells = <0>;
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci		cpu0: cpu@0 {
2062306a36Sopenharmony_ci			compatible = "arm,cortex-a55";
2162306a36Sopenharmony_ci			reg = <0>;
2262306a36Sopenharmony_ci			device_type = "cpu";
2362306a36Sopenharmony_ci			#cooling-cells = <2>;
2462306a36Sopenharmony_ci			next-level-cache = <&L3_CA55>;
2562306a36Sopenharmony_ci			enable-method = "psci";
2662306a36Sopenharmony_ci			clocks = <&cpg CPG_CORE R9A07G043_CLK_I>;
2762306a36Sopenharmony_ci			operating-points-v2 = <&cluster0_opp>;
2862306a36Sopenharmony_ci		};
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci		L3_CA55: cache-controller-0 {
3162306a36Sopenharmony_ci			compatible = "cache";
3262306a36Sopenharmony_ci			cache-unified;
3362306a36Sopenharmony_ci			cache-size = <0x40000>;
3462306a36Sopenharmony_ci			cache-level = <3>;
3562306a36Sopenharmony_ci		};
3662306a36Sopenharmony_ci	};
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci	pmu {
3962306a36Sopenharmony_ci		compatible = "arm,cortex-a55-pmu";
4062306a36Sopenharmony_ci		interrupts-extended = <&gic GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
4162306a36Sopenharmony_ci	};
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci	psci {
4462306a36Sopenharmony_ci		compatible = "arm,psci-1.0", "arm,psci-0.2";
4562306a36Sopenharmony_ci		method = "smc";
4662306a36Sopenharmony_ci	};
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci	timer {
4962306a36Sopenharmony_ci		compatible = "arm,armv8-timer";
5062306a36Sopenharmony_ci		interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
5162306a36Sopenharmony_ci				      <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
5262306a36Sopenharmony_ci				      <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
5362306a36Sopenharmony_ci				      <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
5462306a36Sopenharmony_ci	};
5562306a36Sopenharmony_ci};
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci&pinctrl {
5862306a36Sopenharmony_ci	interrupt-parent = <&irqc>;
5962306a36Sopenharmony_ci};
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci&soc {
6262306a36Sopenharmony_ci	interrupt-parent = <&gic>;
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci	irqc: interrupt-controller@110a0000 {
6562306a36Sopenharmony_ci		compatible = "renesas,r9a07g043u-irqc",
6662306a36Sopenharmony_ci			     "renesas,rzg2l-irqc";
6762306a36Sopenharmony_ci		reg = <0 0x110a0000 0 0x10000>;
6862306a36Sopenharmony_ci		#interrupt-cells = <2>;
6962306a36Sopenharmony_ci		#address-cells = <0>;
7062306a36Sopenharmony_ci		interrupt-controller;
7162306a36Sopenharmony_ci		interrupts = <SOC_PERIPHERAL_IRQ(0) IRQ_TYPE_LEVEL_HIGH>,
7262306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(1) IRQ_TYPE_LEVEL_HIGH>,
7362306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(2) IRQ_TYPE_LEVEL_HIGH>,
7462306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(3) IRQ_TYPE_LEVEL_HIGH>,
7562306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(4) IRQ_TYPE_LEVEL_HIGH>,
7662306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(5) IRQ_TYPE_LEVEL_HIGH>,
7762306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(6) IRQ_TYPE_LEVEL_HIGH>,
7862306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(7) IRQ_TYPE_LEVEL_HIGH>,
7962306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(8) IRQ_TYPE_LEVEL_HIGH>,
8062306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(444) IRQ_TYPE_LEVEL_HIGH>,
8162306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(445) IRQ_TYPE_LEVEL_HIGH>,
8262306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(446) IRQ_TYPE_LEVEL_HIGH>,
8362306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(447) IRQ_TYPE_LEVEL_HIGH>,
8462306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(448) IRQ_TYPE_LEVEL_HIGH>,
8562306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(449) IRQ_TYPE_LEVEL_HIGH>,
8662306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(450) IRQ_TYPE_LEVEL_HIGH>,
8762306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(451) IRQ_TYPE_LEVEL_HIGH>,
8862306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(452) IRQ_TYPE_LEVEL_HIGH>,
8962306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(453) IRQ_TYPE_LEVEL_HIGH>,
9062306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(454) IRQ_TYPE_LEVEL_HIGH>,
9162306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(455) IRQ_TYPE_LEVEL_HIGH>,
9262306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(456) IRQ_TYPE_LEVEL_HIGH>,
9362306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(457) IRQ_TYPE_LEVEL_HIGH>,
9462306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(458) IRQ_TYPE_LEVEL_HIGH>,
9562306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(459) IRQ_TYPE_LEVEL_HIGH>,
9662306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(460) IRQ_TYPE_LEVEL_HIGH>,
9762306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(461) IRQ_TYPE_LEVEL_HIGH>,
9862306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(462) IRQ_TYPE_LEVEL_HIGH>,
9962306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(463) IRQ_TYPE_LEVEL_HIGH>,
10062306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(464) IRQ_TYPE_LEVEL_HIGH>,
10162306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(465) IRQ_TYPE_LEVEL_HIGH>,
10262306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(466) IRQ_TYPE_LEVEL_HIGH>,
10362306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(467) IRQ_TYPE_LEVEL_HIGH>,
10462306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(468) IRQ_TYPE_LEVEL_HIGH>,
10562306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(469) IRQ_TYPE_LEVEL_HIGH>,
10662306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(470) IRQ_TYPE_LEVEL_HIGH>,
10762306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(471) IRQ_TYPE_LEVEL_HIGH>,
10862306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(472) IRQ_TYPE_LEVEL_HIGH>,
10962306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(473) IRQ_TYPE_LEVEL_HIGH>,
11062306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(474) IRQ_TYPE_LEVEL_HIGH>,
11162306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(475) IRQ_TYPE_LEVEL_HIGH>,
11262306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(25) IRQ_TYPE_EDGE_RISING>,
11362306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(34) IRQ_TYPE_EDGE_RISING>,
11462306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(35) IRQ_TYPE_EDGE_RISING>,
11562306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(36) IRQ_TYPE_EDGE_RISING>,
11662306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(37) IRQ_TYPE_EDGE_RISING>,
11762306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(38) IRQ_TYPE_EDGE_RISING>,
11862306a36Sopenharmony_ci			     <SOC_PERIPHERAL_IRQ(39) IRQ_TYPE_EDGE_RISING>;
11962306a36Sopenharmony_ci		interrupt-names = "nmi",
12062306a36Sopenharmony_ci				  "irq0", "irq1", "irq2", "irq3",
12162306a36Sopenharmony_ci				  "irq4", "irq5", "irq6", "irq7",
12262306a36Sopenharmony_ci				  "tint0", "tint1", "tint2", "tint3",
12362306a36Sopenharmony_ci				  "tint4", "tint5", "tint6", "tint7",
12462306a36Sopenharmony_ci				  "tint8", "tint9", "tint10", "tint11",
12562306a36Sopenharmony_ci				  "tint12", "tint13", "tint14", "tint15",
12662306a36Sopenharmony_ci				  "tint16", "tint17", "tint18", "tint19",
12762306a36Sopenharmony_ci				  "tint20", "tint21", "tint22", "tint23",
12862306a36Sopenharmony_ci				  "tint24", "tint25", "tint26", "tint27",
12962306a36Sopenharmony_ci				  "tint28", "tint29", "tint30", "tint31",
13062306a36Sopenharmony_ci				  "bus-err", "ec7tie1-0", "ec7tie2-0",
13162306a36Sopenharmony_ci				  "ec7tiovf-0", "ec7tie1-1", "ec7tie2-1",
13262306a36Sopenharmony_ci				  "ec7tiovf-1";
13362306a36Sopenharmony_ci		clocks = <&cpg CPG_MOD R9A07G043_IA55_CLK>,
13462306a36Sopenharmony_ci			<&cpg CPG_MOD R9A07G043_IA55_PCLK>;
13562306a36Sopenharmony_ci		clock-names = "clk", "pclk";
13662306a36Sopenharmony_ci		power-domains = <&cpg>;
13762306a36Sopenharmony_ci		resets = <&cpg R9A07G043_IA55_RESETN>;
13862306a36Sopenharmony_ci	};
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci	gic: interrupt-controller@11900000 {
14162306a36Sopenharmony_ci		compatible = "arm,gic-v3";
14262306a36Sopenharmony_ci		#interrupt-cells = <3>;
14362306a36Sopenharmony_ci		#address-cells = <0>;
14462306a36Sopenharmony_ci		interrupt-controller;
14562306a36Sopenharmony_ci		reg = <0x0 0x11900000 0 0x40000>,
14662306a36Sopenharmony_ci		      <0x0 0x11940000 0 0x60000>;
14762306a36Sopenharmony_ci		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
14862306a36Sopenharmony_ci	};
14962306a36Sopenharmony_ci};
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ci&sysc {
15262306a36Sopenharmony_ci	interrupts = <SOC_PERIPHERAL_IRQ(42) IRQ_TYPE_LEVEL_HIGH>,
15362306a36Sopenharmony_ci		     <SOC_PERIPHERAL_IRQ(43) IRQ_TYPE_LEVEL_HIGH>,
15462306a36Sopenharmony_ci		     <SOC_PERIPHERAL_IRQ(44) IRQ_TYPE_LEVEL_HIGH>,
15562306a36Sopenharmony_ci		     <SOC_PERIPHERAL_IRQ(45) IRQ_TYPE_LEVEL_HIGH>;
15662306a36Sopenharmony_ci	interrupt-names = "lpm_int", "ca55stbydone_int",
15762306a36Sopenharmony_ci			  "cm33stbyr_int", "ca55_deny";
15862306a36Sopenharmony_ci};
159