18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Device Tree Source for J721E SoC Family
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2016-2019 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 J721E SoC";
158c2ecf20Sopenharmony_ci	compatible = "ti,j721e";
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		ethernet0 = &cpsw_port1;
348c2ecf20Sopenharmony_ci	};
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci	chosen { };
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci	cpus {
398c2ecf20Sopenharmony_ci		#address-cells = <1>;
408c2ecf20Sopenharmony_ci		#size-cells = <0>;
418c2ecf20Sopenharmony_ci		cpu-map {
428c2ecf20Sopenharmony_ci			cluster0: cluster0 {
438c2ecf20Sopenharmony_ci				core0 {
448c2ecf20Sopenharmony_ci					cpu = <&cpu0>;
458c2ecf20Sopenharmony_ci				};
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci				core1 {
488c2ecf20Sopenharmony_ci					cpu = <&cpu1>;
498c2ecf20Sopenharmony_ci				};
508c2ecf20Sopenharmony_ci			};
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci		};
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci		cpu0: cpu@0 {
558c2ecf20Sopenharmony_ci			compatible = "arm,cortex-a72";
568c2ecf20Sopenharmony_ci			reg = <0x000>;
578c2ecf20Sopenharmony_ci			device_type = "cpu";
588c2ecf20Sopenharmony_ci			enable-method = "psci";
598c2ecf20Sopenharmony_ci			i-cache-size = <0xC000>;
608c2ecf20Sopenharmony_ci			i-cache-line-size = <64>;
618c2ecf20Sopenharmony_ci			i-cache-sets = <256>;
628c2ecf20Sopenharmony_ci			d-cache-size = <0x8000>;
638c2ecf20Sopenharmony_ci			d-cache-line-size = <64>;
648c2ecf20Sopenharmony_ci			d-cache-sets = <256>;
658c2ecf20Sopenharmony_ci			next-level-cache = <&L2_0>;
668c2ecf20Sopenharmony_ci		};
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci		cpu1: cpu@1 {
698c2ecf20Sopenharmony_ci			compatible = "arm,cortex-a72";
708c2ecf20Sopenharmony_ci			reg = <0x001>;
718c2ecf20Sopenharmony_ci			device_type = "cpu";
728c2ecf20Sopenharmony_ci			enable-method = "psci";
738c2ecf20Sopenharmony_ci			i-cache-size = <0xC000>;
748c2ecf20Sopenharmony_ci			i-cache-line-size = <64>;
758c2ecf20Sopenharmony_ci			i-cache-sets = <256>;
768c2ecf20Sopenharmony_ci			d-cache-size = <0x8000>;
778c2ecf20Sopenharmony_ci			d-cache-line-size = <64>;
788c2ecf20Sopenharmony_ci			d-cache-sets = <256>;
798c2ecf20Sopenharmony_ci			next-level-cache = <&L2_0>;
808c2ecf20Sopenharmony_ci		};
818c2ecf20Sopenharmony_ci	};
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci	L2_0: l2-cache0 {
848c2ecf20Sopenharmony_ci		compatible = "cache";
858c2ecf20Sopenharmony_ci		cache-level = <2>;
868c2ecf20Sopenharmony_ci		cache-size = <0x100000>;
878c2ecf20Sopenharmony_ci		cache-line-size = <64>;
888c2ecf20Sopenharmony_ci		cache-sets = <1024>;
898c2ecf20Sopenharmony_ci		next-level-cache = <&msmc_l3>;
908c2ecf20Sopenharmony_ci	};
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci	msmc_l3: l3-cache0 {
938c2ecf20Sopenharmony_ci		compatible = "cache";
948c2ecf20Sopenharmony_ci		cache-level = <3>;
958c2ecf20Sopenharmony_ci	};
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci	firmware {
988c2ecf20Sopenharmony_ci		optee {
998c2ecf20Sopenharmony_ci			compatible = "linaro,optee-tz";
1008c2ecf20Sopenharmony_ci			method = "smc";
1018c2ecf20Sopenharmony_ci		};
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci		psci: psci {
1048c2ecf20Sopenharmony_ci			compatible = "arm,psci-1.0";
1058c2ecf20Sopenharmony_ci			method = "smc";
1068c2ecf20Sopenharmony_ci		};
1078c2ecf20Sopenharmony_ci	};
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci	a72_timer0: timer-cl0-cpu0 {
1108c2ecf20Sopenharmony_ci		compatible = "arm,armv8-timer";
1118c2ecf20Sopenharmony_ci		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, /* cntpsirq */
1128c2ecf20Sopenharmony_ci			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, /* cntpnsirq */
1138c2ecf20Sopenharmony_ci			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, /* cntvirq */
1148c2ecf20Sopenharmony_ci			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; /* cnthpirq */
1158c2ecf20Sopenharmony_ci	};
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci	pmu: pmu {
1188c2ecf20Sopenharmony_ci		compatible = "arm,armv8-pmuv3";
1198c2ecf20Sopenharmony_ci		/* Recommendation from GIC500 TRM Table A.3 */
1208c2ecf20Sopenharmony_ci		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
1218c2ecf20Sopenharmony_ci	};
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci	cbass_main: bus@100000 {
1248c2ecf20Sopenharmony_ci		compatible = "simple-bus";
1258c2ecf20Sopenharmony_ci		#address-cells = <2>;
1268c2ecf20Sopenharmony_ci		#size-cells = <2>;
1278c2ecf20Sopenharmony_ci		ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
1288c2ecf20Sopenharmony_ci			 <0x00 0x00600000 0x00 0x00600000 0x00 0x00031100>, /* GPIO */
1298c2ecf20Sopenharmony_ci			 <0x00 0x00900000 0x00 0x00900000 0x00 0x00012000>, /* serdes */
1308c2ecf20Sopenharmony_ci			 <0x00 0x00a40000 0x00 0x00a40000 0x00 0x00000800>, /* timesync router */
1318c2ecf20Sopenharmony_ci			 <0x00 0x06000000 0x00 0x06000000 0x00 0x00400000>, /* USBSS0 */
1328c2ecf20Sopenharmony_ci			 <0x00 0x06400000 0x00 0x06400000 0x00 0x00400000>, /* USBSS1 */
1338c2ecf20Sopenharmony_ci			 <0x00 0x01000000 0x00 0x01000000 0x00 0x0af02400>, /* Most peripherals */
1348c2ecf20Sopenharmony_ci			 <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>, /* MAIN NAVSS */
1358c2ecf20Sopenharmony_ci			 <0x00 0x0d000000 0x00 0x0d000000 0x00 0x01800000>, /* PCIe Core*/
1368c2ecf20Sopenharmony_ci			 <0x00 0x0e000000 0x00 0x0e000000 0x00 0x01800000>, /* PCIe Core*/
1378c2ecf20Sopenharmony_ci			 <0x00 0x10000000 0x00 0x10000000 0x00 0x10000000>, /* PCIe DAT */
1388c2ecf20Sopenharmony_ci			 <0x00 0x64800000 0x00 0x64800000 0x00 0x00800000>, /* C71 */
1398c2ecf20Sopenharmony_ci			 <0x00 0x6f000000 0x00 0x6f000000 0x00 0x00310000>, /* A72 PERIPHBASE */
1408c2ecf20Sopenharmony_ci			 <0x44 0x00000000 0x44 0x00000000 0x00 0x08000000>, /* PCIe2 DAT */
1418c2ecf20Sopenharmony_ci			 <0x44 0x10000000 0x44 0x10000000 0x00 0x08000000>, /* PCIe3 DAT */
1428c2ecf20Sopenharmony_ci			 <0x4d 0x80800000 0x4d 0x80800000 0x00 0x00800000>, /* C66_0 */
1438c2ecf20Sopenharmony_ci			 <0x4d 0x81800000 0x4d 0x81800000 0x00 0x00800000>, /* C66_1 */
1448c2ecf20Sopenharmony_ci			 <0x4e 0x20000000 0x4e 0x20000000 0x00 0x00080000>, /* GPU */
1458c2ecf20Sopenharmony_ci			 <0x00 0x70000000 0x00 0x70000000 0x00 0x00800000>, /* MSMC RAM */
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ci			 /* MCUSS_WKUP Range */
1488c2ecf20Sopenharmony_ci			 <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>,
1498c2ecf20Sopenharmony_ci			 <0x00 0x40200000 0x00 0x40200000 0x00 0x00998400>,
1508c2ecf20Sopenharmony_ci			 <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>,
1518c2ecf20Sopenharmony_ci			 <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>,
1528c2ecf20Sopenharmony_ci			 <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>,
1538c2ecf20Sopenharmony_ci			 <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00100000>,
1548c2ecf20Sopenharmony_ci			 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>,
1558c2ecf20Sopenharmony_ci			 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>,
1568c2ecf20Sopenharmony_ci			 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>,
1578c2ecf20Sopenharmony_ci			 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>,
1588c2ecf20Sopenharmony_ci			 <0x00 0x50000000 0x00 0x50000000 0x00 0x10000000>,
1598c2ecf20Sopenharmony_ci			 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>,
1608c2ecf20Sopenharmony_ci			 <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>;
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ci		cbass_mcu_wakeup: bus@28380000 {
1638c2ecf20Sopenharmony_ci			compatible = "simple-bus";
1648c2ecf20Sopenharmony_ci			#address-cells = <2>;
1658c2ecf20Sopenharmony_ci			#size-cells = <2>;
1668c2ecf20Sopenharmony_ci			ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, /* MCU NAVSS*/
1678c2ecf20Sopenharmony_ci				 <0x00 0x40200000 0x00 0x40200000 0x00 0x00998400>, /* First peripheral window */
1688c2ecf20Sopenharmony_ci				 <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>, /* CTRL_MMR0 */
1698c2ecf20Sopenharmony_ci				 <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>, /* MCU R5F Core0 */
1708c2ecf20Sopenharmony_ci				 <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>, /* MCU R5F Core1 */
1718c2ecf20Sopenharmony_ci				 <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00100000>, /* MCU SRAM */
1728c2ecf20Sopenharmony_ci				 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>, /* WKUP peripheral window */
1738c2ecf20Sopenharmony_ci				 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>, /* MMRs, remaining NAVSS */
1748c2ecf20Sopenharmony_ci				 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>, /* CPSW */
1758c2ecf20Sopenharmony_ci				 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>, /* OSPI register space */
1768c2ecf20Sopenharmony_ci				 <0x00 0x50000000 0x00 0x50000000 0x00 0x10000000>, /* FSS OSPI0/1 data region 0 */
1778c2ecf20Sopenharmony_ci				 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS OSPI0 data region 3 */
1788c2ecf20Sopenharmony_ci				 <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>; /* FSS OSPI1 data region 3*/
1798c2ecf20Sopenharmony_ci		};
1808c2ecf20Sopenharmony_ci	};
1818c2ecf20Sopenharmony_ci};
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci/* Now include the peripherals for each bus segments */
1848c2ecf20Sopenharmony_ci#include "k3-j721e-main.dtsi"
1858c2ecf20Sopenharmony_ci#include "k3-j721e-mcu-wakeup.dtsi"
186