1b8545f9dSAswath Govindraju// SPDX-License-Identifier: GPL-2.0
2b8545f9dSAswath Govindraju/*
3b8545f9dSAswath Govindraju * Device Tree Source for J721S2 SoC Family
4b8545f9dSAswath Govindraju *
5b8545f9dSAswath Govindraju * TRM (SPRUJ28 – NOVEMBER 2021) : http://www.ti.com/lit/pdf/spruj28
6b8545f9dSAswath Govindraju *
7b8545f9dSAswath Govindraju * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
8b8545f9dSAswath Govindraju *
9b8545f9dSAswath Govindraju */
10b8545f9dSAswath Govindraju
11b8545f9dSAswath Govindraju#include <dt-bindings/interrupt-controller/irq.h>
12b8545f9dSAswath Govindraju#include <dt-bindings/interrupt-controller/arm-gic.h>
13b8545f9dSAswath Govindraju#include <dt-bindings/soc/ti,sci_pm_domain.h>
14b8545f9dSAswath Govindraju
15fe49f2d7SNishanth Menon#include "k3-pinctrl.h"
16fe49f2d7SNishanth Menon
17b8545f9dSAswath Govindraju/ {
18b8545f9dSAswath Govindraju
19b8545f9dSAswath Govindraju	model = "Texas Instruments K3 J721S2 SoC";
20b8545f9dSAswath Govindraju	compatible = "ti,j721s2";
21b8545f9dSAswath Govindraju	interrupt-parent = <&gic500>;
22b8545f9dSAswath Govindraju	#address-cells = <2>;
23b8545f9dSAswath Govindraju	#size-cells = <2>;
24b8545f9dSAswath Govindraju
25b8545f9dSAswath Govindraju	chosen { };
26b8545f9dSAswath Govindraju
27b8545f9dSAswath Govindraju	cpus {
28b8545f9dSAswath Govindraju		#address-cells = <1>;
29b8545f9dSAswath Govindraju		#size-cells = <0>;
30b8545f9dSAswath Govindraju		cpu-map {
31b8545f9dSAswath Govindraju			cluster0: cluster0 {
32b8545f9dSAswath Govindraju				core0 {
33b8545f9dSAswath Govindraju					cpu = <&cpu0>;
34b8545f9dSAswath Govindraju				};
35b8545f9dSAswath Govindraju
36b8545f9dSAswath Govindraju				core1 {
37b8545f9dSAswath Govindraju					cpu = <&cpu1>;
38b8545f9dSAswath Govindraju				};
39b8545f9dSAswath Govindraju			};
40b8545f9dSAswath Govindraju		};
41b8545f9dSAswath Govindraju
42b8545f9dSAswath Govindraju		cpu0: cpu@0 {
43b8545f9dSAswath Govindraju			compatible = "arm,cortex-a72";
44b8545f9dSAswath Govindraju			reg = <0x000>;
45b8545f9dSAswath Govindraju			device_type = "cpu";
46b8545f9dSAswath Govindraju			enable-method = "psci";
47b8545f9dSAswath Govindraju			i-cache-size = <0xc000>;
48b8545f9dSAswath Govindraju			i-cache-line-size = <64>;
49b8545f9dSAswath Govindraju			i-cache-sets = <256>;
50b8545f9dSAswath Govindraju			d-cache-size = <0x8000>;
51b8545f9dSAswath Govindraju			d-cache-line-size = <64>;
52b8545f9dSAswath Govindraju			d-cache-sets = <256>;
53b8545f9dSAswath Govindraju			next-level-cache = <&L2_0>;
54b8545f9dSAswath Govindraju		};
55b8545f9dSAswath Govindraju
56b8545f9dSAswath Govindraju		cpu1: cpu@1 {
57b8545f9dSAswath Govindraju			compatible = "arm,cortex-a72";
58b8545f9dSAswath Govindraju			reg = <0x001>;
59b8545f9dSAswath Govindraju			device_type = "cpu";
60b8545f9dSAswath Govindraju			enable-method = "psci";
61b8545f9dSAswath Govindraju			i-cache-size = <0xc000>;
62b8545f9dSAswath Govindraju			i-cache-line-size = <64>;
63b8545f9dSAswath Govindraju			i-cache-sets = <256>;
64b8545f9dSAswath Govindraju			d-cache-size = <0x8000>;
65b8545f9dSAswath Govindraju			d-cache-line-size = <64>;
66b8545f9dSAswath Govindraju			d-cache-sets = <256>;
67b8545f9dSAswath Govindraju			next-level-cache = <&L2_0>;
68b8545f9dSAswath Govindraju		};
69b8545f9dSAswath Govindraju	};
70b8545f9dSAswath Govindraju
71b8545f9dSAswath Govindraju	L2_0: l2-cache0 {
72b8545f9dSAswath Govindraju		compatible = "cache";
73880932e6SPierre Gondois		cache-unified;
74b8545f9dSAswath Govindraju		cache-level = <2>;
75b8545f9dSAswath Govindraju		cache-size = <0x100000>;
76b8545f9dSAswath Govindraju		cache-line-size = <64>;
77b8545f9dSAswath Govindraju		cache-sets = <1024>;
78b8545f9dSAswath Govindraju		next-level-cache = <&msmc_l3>;
79b8545f9dSAswath Govindraju	};
80b8545f9dSAswath Govindraju
81b8545f9dSAswath Govindraju	msmc_l3: l3-cache0 {
82b8545f9dSAswath Govindraju		compatible = "cache";
83b8545f9dSAswath Govindraju		cache-level = <3>;
84*9b8c6da0SKrzysztof Kozlowski		cache-unified;
85b8545f9dSAswath Govindraju	};
86b8545f9dSAswath Govindraju
87b8545f9dSAswath Govindraju	firmware {
88b8545f9dSAswath Govindraju		optee {
89b8545f9dSAswath Govindraju			compatible = "linaro,optee-tz";
90b8545f9dSAswath Govindraju			method = "smc";
91b8545f9dSAswath Govindraju		};
92b8545f9dSAswath Govindraju
93b8545f9dSAswath Govindraju		psci: psci {
94b8545f9dSAswath Govindraju			compatible = "arm,psci-1.0";
95b8545f9dSAswath Govindraju			method = "smc";
96b8545f9dSAswath Govindraju		};
97b8545f9dSAswath Govindraju	};
98b8545f9dSAswath Govindraju
99b8545f9dSAswath Govindraju	a72_timer0: timer-cl0-cpu0 {
100b8545f9dSAswath Govindraju		compatible = "arm,armv8-timer";
101b8545f9dSAswath Govindraju		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, /* cntpsirq */
102b8545f9dSAswath Govindraju			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, /* cntpnsirq */
103b8545f9dSAswath Govindraju			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, /* cntvirq */
104b8545f9dSAswath Govindraju			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; /* cnthpirq */
105b8545f9dSAswath Govindraju
106b8545f9dSAswath Govindraju	};
107b8545f9dSAswath Govindraju
108b8545f9dSAswath Govindraju	pmu: pmu {
109b8545f9dSAswath Govindraju		compatible = "arm,cortex-a72-pmu";
110b8545f9dSAswath Govindraju		/* Recommendation from GIC500 TRM Table A.3 */
111b8545f9dSAswath Govindraju		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
112b8545f9dSAswath Govindraju	};
113b8545f9dSAswath Govindraju
114b8545f9dSAswath Govindraju	cbass_main: bus@100000 {
115b8545f9dSAswath Govindraju		compatible = "simple-bus";
116b8545f9dSAswath Govindraju		#address-cells = <2>;
117b8545f9dSAswath Govindraju		#size-cells = <2>;
118b8545f9dSAswath Govindraju		ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
119b8545f9dSAswath Govindraju			 <0x00 0x00600000 0x00 0x00600000 0x00 0x00031100>, /* GPIO */
120b8545f9dSAswath Govindraju			 <0x00 0x01000000 0x00 0x01000000 0x00 0x0d000000>, /* Most peripherals */
121b8545f9dSAswath Govindraju			 <0x00 0x0d800000 0x00 0x0d800000 0x00 0x00800000>, /* PCIe Core*/
122b8545f9dSAswath Govindraju			 <0x00 0x18000000 0x00 0x18000000 0x00 0x08000000>, /* PCIe1 DAT0 */
123b8545f9dSAswath Govindraju			 <0x00 0x64800000 0x00 0x64800000 0x00 0x0070c000>, /* C71_1 */
124b8545f9dSAswath Govindraju			 <0x00 0x65800000 0x00 0x65800000 0x00 0x0070c000>, /* C71_2 */
125a9668037SNishanth Menon			 <0x00 0x6f000000 0x00 0x6f000000 0x00 0x00310000>, /* A72 PERIPHBASE */
126b8545f9dSAswath Govindraju			 <0x00 0x70000000 0x00 0x70000000 0x00 0x00400000>, /* MSMC RAM */
127b8545f9dSAswath Govindraju			 <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>, /* MAIN NAVSS */
128b8545f9dSAswath Govindraju			 <0x41 0x00000000 0x41 0x00000000 0x01 0x00000000>, /* PCIe1 DAT1 */
129b8545f9dSAswath Govindraju			 <0x4e 0x20000000 0x4e 0x20000000 0x00 0x00080000>, /* GPU */
130b8545f9dSAswath Govindraju
131b8545f9dSAswath Govindraju			 /* MCUSS_WKUP Range */
132b8545f9dSAswath Govindraju			 <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>,
133b8545f9dSAswath Govindraju			 <0x00 0x40200000 0x00 0x40200000 0x00 0x00998400>,
134b8545f9dSAswath Govindraju			 <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>,
135b8545f9dSAswath Govindraju			 <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>,
136b8545f9dSAswath Govindraju			 <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>,
137b8545f9dSAswath Govindraju			 <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00100000>,
138b8545f9dSAswath Govindraju			 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>,
139b8545f9dSAswath Govindraju			 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>,
140b8545f9dSAswath Govindraju			 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>,
141b8545f9dSAswath Govindraju			 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>,
142b8545f9dSAswath Govindraju			 <0x00 0x50000000 0x00 0x50000000 0x00 0x10000000>,
143b8545f9dSAswath Govindraju			 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>,
144b8545f9dSAswath Govindraju			 <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>;
145b8545f9dSAswath Govindraju
146b8545f9dSAswath Govindraju		cbass_mcu_wakeup: bus@28380000 {
147b8545f9dSAswath Govindraju			compatible = "simple-bus";
148b8545f9dSAswath Govindraju			#address-cells = <2>;
149b8545f9dSAswath Govindraju			#size-cells = <2>;
150b8545f9dSAswath Govindraju			ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, /* MCU NAVSS*/
151b8545f9dSAswath Govindraju				 <0x00 0x40200000 0x00 0x40200000 0x00 0x00998400>, /* First peripheral window */
152b8545f9dSAswath Govindraju				 <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>, /* CTRL_MMR0 */
153b8545f9dSAswath Govindraju				 <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>, /* MCU R5F Core0 */
154b8545f9dSAswath Govindraju				 <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>, /* MCU R5F Core1 */
155b8545f9dSAswath Govindraju				 <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00100000>, /* MCU SRAM */
156b8545f9dSAswath Govindraju				 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>, /* WKUP peripheral window */
157b8545f9dSAswath Govindraju				 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>, /* MMRs, remaining NAVSS */
158b8545f9dSAswath Govindraju				 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>, /* CPSW */
159b8545f9dSAswath Govindraju				 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>, /* OSPI register space */
160b8545f9dSAswath Govindraju				 <0x00 0x50000000 0x00 0x50000000 0x00 0x10000000>, /* FSS OSPI0/1 data region 0 */
161b8545f9dSAswath Govindraju				 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS OSPI0 data region 3 */
162b8545f9dSAswath Govindraju				 <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>; /* FSS OSPI1 data region 3*/
163b8545f9dSAswath Govindraju
164b8545f9dSAswath Govindraju		};
165b8545f9dSAswath Govindraju
166b8545f9dSAswath Govindraju	};
167b8545f9dSAswath Govindraju};
168b8545f9dSAswath Govindraju
169b8545f9dSAswath Govindraju/* Now include peripherals from each bus segment */
170b8545f9dSAswath Govindraju#include "k3-j721s2-main.dtsi"
171b8545f9dSAswath Govindraju#include "k3-j721s2-mcu-wakeup.dtsi"
172