18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Device Tree Source for J7200 SoC Family
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#include <dt-bindings/interrupt-controller/irq.h>
98c2ecf20Sopenharmony_ci#include <dt-bindings/interrupt-controller/arm-gic.h>
108c2ecf20Sopenharmony_ci#include <dt-bindings/pinctrl/k3.h>
118c2ecf20Sopenharmony_ci#include <dt-bindings/soc/ti,sci_pm_domain.h>
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/ {
148c2ecf20Sopenharmony_ci	model = "Texas Instruments K3 J7200 SoC";
158c2ecf20Sopenharmony_ci	compatible = "ti,j7200";
168c2ecf20Sopenharmony_ci	interrupt-parent = <&gic500>;
178c2ecf20Sopenharmony_ci	#address-cells = <2>;
188c2ecf20Sopenharmony_ci	#size-cells = <2>;
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci	aliases {
218c2ecf20Sopenharmony_ci		serial0 = &wkup_uart0;
228c2ecf20Sopenharmony_ci		serial1 = &mcu_uart0;
238c2ecf20Sopenharmony_ci		serial2 = &main_uart0;
248c2ecf20Sopenharmony_ci		serial3 = &main_uart1;
258c2ecf20Sopenharmony_ci		serial4 = &main_uart2;
268c2ecf20Sopenharmony_ci		serial5 = &main_uart3;
278c2ecf20Sopenharmony_ci		serial6 = &main_uart4;
288c2ecf20Sopenharmony_ci		serial7 = &main_uart5;
298c2ecf20Sopenharmony_ci		serial8 = &main_uart6;
308c2ecf20Sopenharmony_ci		serial9 = &main_uart7;
318c2ecf20Sopenharmony_ci		serial10 = &main_uart8;
328c2ecf20Sopenharmony_ci		serial11 = &main_uart9;
338c2ecf20Sopenharmony_ci	};
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci	chosen { };
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci	cpus {
388c2ecf20Sopenharmony_ci		#address-cells = <1>;
398c2ecf20Sopenharmony_ci		#size-cells = <0>;
408c2ecf20Sopenharmony_ci		cpu-map {
418c2ecf20Sopenharmony_ci			cluster0: cluster0 {
428c2ecf20Sopenharmony_ci				core0 {
438c2ecf20Sopenharmony_ci					cpu = <&cpu0>;
448c2ecf20Sopenharmony_ci				};
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci				core1 {
478c2ecf20Sopenharmony_ci					cpu = <&cpu1>;
488c2ecf20Sopenharmony_ci				};
498c2ecf20Sopenharmony_ci			};
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci		};
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci		cpu0: cpu@0 {
548c2ecf20Sopenharmony_ci			compatible = "arm,cortex-a72";
558c2ecf20Sopenharmony_ci			reg = <0x000>;
568c2ecf20Sopenharmony_ci			device_type = "cpu";
578c2ecf20Sopenharmony_ci			enable-method = "psci";
588c2ecf20Sopenharmony_ci			i-cache-size = <0xc000>;
598c2ecf20Sopenharmony_ci			i-cache-line-size = <64>;
608c2ecf20Sopenharmony_ci			i-cache-sets = <256>;
618c2ecf20Sopenharmony_ci			d-cache-size = <0x8000>;
628c2ecf20Sopenharmony_ci			d-cache-line-size = <64>;
638c2ecf20Sopenharmony_ci			d-cache-sets = <256>;
648c2ecf20Sopenharmony_ci			next-level-cache = <&L2_0>;
658c2ecf20Sopenharmony_ci		};
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci		cpu1: cpu@1 {
688c2ecf20Sopenharmony_ci			compatible = "arm,cortex-a72";
698c2ecf20Sopenharmony_ci			reg = <0x001>;
708c2ecf20Sopenharmony_ci			device_type = "cpu";
718c2ecf20Sopenharmony_ci			enable-method = "psci";
728c2ecf20Sopenharmony_ci			i-cache-size = <0xc000>;
738c2ecf20Sopenharmony_ci			i-cache-line-size = <64>;
748c2ecf20Sopenharmony_ci			i-cache-sets = <256>;
758c2ecf20Sopenharmony_ci			d-cache-size = <0x8000>;
768c2ecf20Sopenharmony_ci			d-cache-line-size = <64>;
778c2ecf20Sopenharmony_ci			d-cache-sets = <256>;
788c2ecf20Sopenharmony_ci			next-level-cache = <&L2_0>;
798c2ecf20Sopenharmony_ci		};
808c2ecf20Sopenharmony_ci	};
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci	L2_0: l2-cache0 {
838c2ecf20Sopenharmony_ci		compatible = "cache";
848c2ecf20Sopenharmony_ci		cache-level = <2>;
858c2ecf20Sopenharmony_ci		cache-size = <0x100000>;
868c2ecf20Sopenharmony_ci		cache-line-size = <64>;
878c2ecf20Sopenharmony_ci		cache-sets = <1024>;
888c2ecf20Sopenharmony_ci		next-level-cache = <&msmc_l3>;
898c2ecf20Sopenharmony_ci	};
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci	msmc_l3: l3-cache0 {
928c2ecf20Sopenharmony_ci		compatible = "cache";
938c2ecf20Sopenharmony_ci		cache-level = <3>;
948c2ecf20Sopenharmony_ci	};
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ci	firmware {
978c2ecf20Sopenharmony_ci		optee {
988c2ecf20Sopenharmony_ci			compatible = "linaro,optee-tz";
998c2ecf20Sopenharmony_ci			method = "smc";
1008c2ecf20Sopenharmony_ci		};
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci		psci: psci {
1038c2ecf20Sopenharmony_ci			compatible = "arm,psci-1.0";
1048c2ecf20Sopenharmony_ci			method = "smc";
1058c2ecf20Sopenharmony_ci		};
1068c2ecf20Sopenharmony_ci	};
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci	a72_timer0: timer-cl0-cpu0 {
1098c2ecf20Sopenharmony_ci		compatible = "arm,armv8-timer";
1108c2ecf20Sopenharmony_ci		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, /* cntpsirq */
1118c2ecf20Sopenharmony_ci			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, /* cntpnsirq */
1128c2ecf20Sopenharmony_ci			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, /* cntvirq */
1138c2ecf20Sopenharmony_ci			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; /* cnthpirq */
1148c2ecf20Sopenharmony_ci	};
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci	pmu: pmu {
1178c2ecf20Sopenharmony_ci		compatible = "arm,armv8-pmuv3";
1188c2ecf20Sopenharmony_ci		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
1198c2ecf20Sopenharmony_ci	};
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci	cbass_main: bus@100000 {
1228c2ecf20Sopenharmony_ci		compatible = "simple-bus";
1238c2ecf20Sopenharmony_ci		#address-cells = <2>;
1248c2ecf20Sopenharmony_ci		#size-cells = <2>;
1258c2ecf20Sopenharmony_ci		ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
1268c2ecf20Sopenharmony_ci			 <0x00 0x00600000 0x00 0x00600000 0x00 0x00031100>, /* GPIO */
1278c2ecf20Sopenharmony_ci			 <0x00 0x00a40000 0x00 0x00a40000 0x00 0x00000800>, /* timesync router */
1288c2ecf20Sopenharmony_ci			 <0x00 0x01000000 0x00 0x01000000 0x00 0x0d000000>, /* Most peripherals */
1298c2ecf20Sopenharmony_ci			 <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>, /* MAIN NAVSS */
1308c2ecf20Sopenharmony_ci			 <0x00 0x6f000000 0x00 0x6f000000 0x00 0x00310000>, /* A72 PERIPHBASE */
1318c2ecf20Sopenharmony_ci			 <0x00 0x70000000 0x00 0x70000000 0x00 0x00800000>, /* MSMC RAM */
1328c2ecf20Sopenharmony_ci			 <0x00 0x18000000 0x00 0x18000000 0x00 0x08000000>, /* PCIe1 DAT0 */
1338c2ecf20Sopenharmony_ci			 <0x41 0x00000000 0x41 0x00000000 0x01 0x00000000>, /* PCIe1 DAT1 */
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_ci			 /* MCUSS_WKUP Range */
1368c2ecf20Sopenharmony_ci			 <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>,
1378c2ecf20Sopenharmony_ci			 <0x00 0x40200000 0x00 0x40200000 0x00 0x00998400>,
1388c2ecf20Sopenharmony_ci			 <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>,
1398c2ecf20Sopenharmony_ci			 <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>,
1408c2ecf20Sopenharmony_ci			 <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>,
1418c2ecf20Sopenharmony_ci			 <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00100000>,
1428c2ecf20Sopenharmony_ci			 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>,
1438c2ecf20Sopenharmony_ci			 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>,
1448c2ecf20Sopenharmony_ci			 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>,
1458c2ecf20Sopenharmony_ci			 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>,
1468c2ecf20Sopenharmony_ci			 <0x00 0x50000000 0x00 0x50000000 0x00 0x10000000>,
1478c2ecf20Sopenharmony_ci			 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>,
1488c2ecf20Sopenharmony_ci			 <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>;
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ci		cbass_mcu_wakeup: bus@28380000 {
1518c2ecf20Sopenharmony_ci			compatible = "simple-bus";
1528c2ecf20Sopenharmony_ci			#address-cells = <2>;
1538c2ecf20Sopenharmony_ci			#size-cells = <2>;
1548c2ecf20Sopenharmony_ci			ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, /* MCU NAVSS*/
1558c2ecf20Sopenharmony_ci				 <0x00 0x40200000 0x00 0x40200000 0x00 0x00998400>, /* First peripheral window */
1568c2ecf20Sopenharmony_ci				 <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>, /* CTRL_MMR0 */
1578c2ecf20Sopenharmony_ci				 <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>, /* MCU R5F Core0 */
1588c2ecf20Sopenharmony_ci				 <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>, /* MCU R5F Core1 */
1598c2ecf20Sopenharmony_ci				 <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00100000>, /* MCU SRAM */
1608c2ecf20Sopenharmony_ci				 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>, /* WKUP peripheral window */
1618c2ecf20Sopenharmony_ci				 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>, /* MMRs, remaining NAVSS */
1628c2ecf20Sopenharmony_ci				 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>, /* CPSW */
1638c2ecf20Sopenharmony_ci				 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>, /* OSPI register space */
1648c2ecf20Sopenharmony_ci				 <0x00 0x50000000 0x00 0x50000000 0x00 0x10000000>, /* FSS OSPI0/1 data region 0 */
1658c2ecf20Sopenharmony_ci				 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS OSPI0 data region 3 */
1668c2ecf20Sopenharmony_ci				 <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>; /* FSS OSPI1 data region 3 */
1678c2ecf20Sopenharmony_ci		};
1688c2ecf20Sopenharmony_ci	};
1698c2ecf20Sopenharmony_ci};
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci/* Now include the peripherals for each bus segments */
1728c2ecf20Sopenharmony_ci#include "k3-j7200-main.dtsi"
1738c2ecf20Sopenharmony_ci#include "k3-j7200-mcu-wakeup.dtsi"
174