18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Device Tree Source for AM6 SoC Family
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2016-2018 Texas Instruments Incorporated - https://www.ti.com/
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#include <dt-bindings/gpio/gpio.h>
98c2ecf20Sopenharmony_ci#include <dt-bindings/interrupt-controller/irq.h>
108c2ecf20Sopenharmony_ci#include <dt-bindings/interrupt-controller/arm-gic.h>
118c2ecf20Sopenharmony_ci#include <dt-bindings/pinctrl/k3.h>
128c2ecf20Sopenharmony_ci#include <dt-bindings/soc/ti,sci_pm_domain.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/ {
158c2ecf20Sopenharmony_ci	model = "Texas Instruments K3 AM654 SoC";
168c2ecf20Sopenharmony_ci	compatible = "ti,am654";
178c2ecf20Sopenharmony_ci	interrupt-parent = <&gic500>;
188c2ecf20Sopenharmony_ci	#address-cells = <2>;
198c2ecf20Sopenharmony_ci	#size-cells = <2>;
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci	aliases {
228c2ecf20Sopenharmony_ci		serial0 = &wkup_uart0;
238c2ecf20Sopenharmony_ci		serial1 = &mcu_uart0;
248c2ecf20Sopenharmony_ci		serial2 = &main_uart0;
258c2ecf20Sopenharmony_ci		serial3 = &main_uart1;
268c2ecf20Sopenharmony_ci		serial4 = &main_uart2;
278c2ecf20Sopenharmony_ci		i2c0 = &wkup_i2c0;
288c2ecf20Sopenharmony_ci		i2c1 = &mcu_i2c0;
298c2ecf20Sopenharmony_ci		i2c2 = &main_i2c0;
308c2ecf20Sopenharmony_ci		i2c3 = &main_i2c1;
318c2ecf20Sopenharmony_ci		i2c4 = &main_i2c2;
328c2ecf20Sopenharmony_ci		i2c5 = &main_i2c3;
338c2ecf20Sopenharmony_ci		ethernet0 = &cpsw_port1;
348c2ecf20Sopenharmony_ci	};
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci	chosen { };
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci	firmware {
398c2ecf20Sopenharmony_ci		optee {
408c2ecf20Sopenharmony_ci			compatible = "linaro,optee-tz";
418c2ecf20Sopenharmony_ci			method = "smc";
428c2ecf20Sopenharmony_ci		};
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci		psci: psci {
458c2ecf20Sopenharmony_ci			compatible = "arm,psci-1.0";
468c2ecf20Sopenharmony_ci			method = "smc";
478c2ecf20Sopenharmony_ci		};
488c2ecf20Sopenharmony_ci	};
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci	a53_timer0: timer-cl0-cpu0 {
518c2ecf20Sopenharmony_ci		compatible = "arm,armv8-timer";
528c2ecf20Sopenharmony_ci		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, /* cntpsirq */
538c2ecf20Sopenharmony_ci			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, /* cntpnsirq */
548c2ecf20Sopenharmony_ci			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, /* cntvirq */
558c2ecf20Sopenharmony_ci			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; /* cnthpirq */
568c2ecf20Sopenharmony_ci	};
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci	pmu: pmu {
598c2ecf20Sopenharmony_ci		compatible = "arm,armv8-pmuv3";
608c2ecf20Sopenharmony_ci		/* Recommendation from GIC500 TRM Table A.3 */
618c2ecf20Sopenharmony_ci		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
628c2ecf20Sopenharmony_ci	};
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci	cbass_main: bus@100000 {
658c2ecf20Sopenharmony_ci		compatible = "simple-bus";
668c2ecf20Sopenharmony_ci		#address-cells = <2>;
678c2ecf20Sopenharmony_ci		#size-cells = <2>;
688c2ecf20Sopenharmony_ci		ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
698c2ecf20Sopenharmony_ci			 <0x00 0x00600000 0x00 0x00600000 0x00 0x00001100>, /* GPIO */
708c2ecf20Sopenharmony_ci			 <0x00 0x00900000 0x00 0x00900000 0x00 0x00012000>, /* serdes */
718c2ecf20Sopenharmony_ci			 <0x00 0x01000000 0x00 0x01000000 0x00 0x0af02400>, /* Most peripherals */
728c2ecf20Sopenharmony_ci			 <0x00 0x30800000 0x00 0x30800000 0x00 0x0bc00000>, /* MAIN NAVSS */
738c2ecf20Sopenharmony_ci			 <0x00 0x70000000 0x00 0x70000000 0x00 0x00200000>, /* MSMC SRAM */
748c2ecf20Sopenharmony_ci			 <0x00 0x10000000 0x00 0x10000000 0x00 0x10000000>, /* PCIe DAT */
758c2ecf20Sopenharmony_ci			 /* MCUSS Range */
768c2ecf20Sopenharmony_ci			 <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>,
778c2ecf20Sopenharmony_ci			 <0x00 0x40200000 0x00 0x40200000 0x00 0x00900100>,
788c2ecf20Sopenharmony_ci			 <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>, /* CTRL_MMR0 */
798c2ecf20Sopenharmony_ci			 <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>,
808c2ecf20Sopenharmony_ci			 <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>,
818c2ecf20Sopenharmony_ci			 <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00080000>,
828c2ecf20Sopenharmony_ci			 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>,
838c2ecf20Sopenharmony_ci			 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>,
848c2ecf20Sopenharmony_ci			 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>,
858c2ecf20Sopenharmony_ci			 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>,
868c2ecf20Sopenharmony_ci			 <0x00 0x50000000 0x00 0x50000000 0x00 0x8000000>,
878c2ecf20Sopenharmony_ci			 <0x00 0x6f000000 0x00 0x6f000000 0x00 0x00310000>, /* A53 PERIPHBASE */
888c2ecf20Sopenharmony_ci			 <0x00 0x70000000 0x00 0x70000000 0x00 0x200000>,
898c2ecf20Sopenharmony_ci			 <0x05 0x00000000 0x05 0x00000000 0x01 0x0000000>,
908c2ecf20Sopenharmony_ci			 <0x07 0x00000000 0x07 0x00000000 0x01 0x0000000>;
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci		cbass_mcu: bus@28380000 {
938c2ecf20Sopenharmony_ci			compatible = "simple-bus";
948c2ecf20Sopenharmony_ci			#address-cells = <2>;
958c2ecf20Sopenharmony_ci			#size-cells = <2>;
968c2ecf20Sopenharmony_ci			ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, /* MCU NAVSS*/
978c2ecf20Sopenharmony_ci				 <0x00 0x40200000 0x00 0x40200000 0x00 0x00900100>, /* First peripheral window */
988c2ecf20Sopenharmony_ci				 <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>, /* CTRL_MMR0 */
998c2ecf20Sopenharmony_ci				 <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>, /* MCU R5F Core0 */
1008c2ecf20Sopenharmony_ci				 <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>, /* MCU R5F Core1 */
1018c2ecf20Sopenharmony_ci				 <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00080000>, /* MCU SRAM */
1028c2ecf20Sopenharmony_ci				 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>, /* WKUP */
1038c2ecf20Sopenharmony_ci				 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>, /* MMRs, remaining NAVSS */
1048c2ecf20Sopenharmony_ci				 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>, /* CPSW */
1058c2ecf20Sopenharmony_ci				 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>, /* OSPI space 1 */
1068c2ecf20Sopenharmony_ci				 <0x00 0x50000000 0x00 0x50000000 0x00 0x8000000>, /*  FSS OSPI0 data region 1 */
1078c2ecf20Sopenharmony_ci				 <0x05 0x00000000 0x05 0x00000000 0x01 0x0000000>, /* FSS OSPI0 data region 3*/
1088c2ecf20Sopenharmony_ci				 <0x07 0x00000000 0x07 0x00000000 0x01 0x0000000>; /* FSS OSPI1 data region 3*/
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci			cbass_wakeup: bus@42040000 {
1118c2ecf20Sopenharmony_ci				compatible = "simple-bus";
1128c2ecf20Sopenharmony_ci				#address-cells = <1>;
1138c2ecf20Sopenharmony_ci				#size-cells = <1>;
1148c2ecf20Sopenharmony_ci				/* WKUP  Basic peripherals */
1158c2ecf20Sopenharmony_ci				ranges = <0x42040000 0x00 0x42040000 0x03ac2400>;
1168c2ecf20Sopenharmony_ci			};
1178c2ecf20Sopenharmony_ci		};
1188c2ecf20Sopenharmony_ci	};
1198c2ecf20Sopenharmony_ci};
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci/* Now include the peripherals for each bus segments */
1228c2ecf20Sopenharmony_ci#include "k3-am65-main.dtsi"
1238c2ecf20Sopenharmony_ci#include "k3-am65-mcu.dtsi"
1248c2ecf20Sopenharmony_ci#include "k3-am65-wakeup.dtsi"
125