1/*
2 * Copyright (c) 2018-2019 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <mem.h>
10#include <arm/armv8-m.dtsi>
11#include <zephyr/dt-bindings/i2c/i2c.h>
12#include <zephyr/dt-bindings/input/input-event-codes.h>
13
14/ {
15	compatible = "arm,mps2";
16	#address-cells = <1>;
17	#size-cells = <1>;
18
19	aliases {
20		led0 = &led_0;
21		led1 = &led_1;
22		sw0 = &user_button_0;
23		sw1 = &user_button_1;
24		uart-1 = &uart1;
25		watchdog0 = &wdog0;
26	};
27
28	chosen {
29		zephyr,console = &uart0;
30		zephyr,shell-uart = &uart0;
31
32		/*
33		 * These SRAM and flash settings give the entire available
34		 * code and data memories to this secure firmware image.
35		 * This may conflict with mps2_an521_remote firmware. Use
36		 * caution when using both targets simultaneously.
37		 */
38		zephyr,sram = &ssram2_3;
39		zephyr,flash = &ssram1;
40	};
41
42	leds {
43		compatible = "gpio-leds";
44		led_0: led_0 {
45			gpios = <&gpio_led0 0>;
46			label = "USERLED0";
47		};
48		led_1: led_1 {
49			gpios = <&gpio_led0 1>;
50			label = "USERLED1";
51		};
52	};
53
54	gpio_keys {
55		compatible = "gpio-keys";
56		user_button_0: button_0 {
57			label = "USERPB0";
58			gpios = <&gpio_button 0>;
59			zephyr,code = <INPUT_KEY_0>;
60		};
61		user_button_1: button_1 {
62			label = "USERPB1";
63			gpios = <&gpio_button 1>;
64			zephyr,code = <INPUT_KEY_1>;
65		};
66	};
67
68	cpus {
69		#address-cells = <1>;
70		#size-cells = <0>;
71
72		cpu@0 {
73			device_type = "cpu";
74			compatible = "arm,cortex-m33";
75			reg = <0>;
76			#address-cells = <1>;
77			#size-cells = <1>;
78
79			mpu: mpu@e000ed90 {
80				compatible = "arm,armv8m-mpu";
81				reg = <0xe000ed90 0x40>;
82				arm,num-mpu-regions = <16>;
83			};
84		};
85	};
86
87	/*
88	 * The memory regions defined below are according to AN521:
89	 * https://documentation-service.arm.com/static/5fa12fe9b1a7c5445f29017f
90	 *
91	 * Please see tables mentioned in individual comments below for details.
92	 */
93
94	ssram1: memory@10000000 {
95		/* Table 3-2, row 6. */
96		compatible = "zephyr,memory-region", "mmio-sram";
97		reg = <0x10000000 DT_SIZE_M(4)>;
98		zephyr,memory-region = "SSRAM1";
99	};
100
101	ssram2_3: memory@38000000 {
102		/* Table 3-4, rows 16 and 17. */
103		compatible = "zephyr,memory-region", "mmio-sram";
104		reg = <0x38000000 DT_SIZE_M(4)>;
105		zephyr,memory-region = "SSRAM2_3";
106	};
107
108	psram: memory@80000000 {
109		/* Table 3-6, row 1. */
110		device_type = "memory";
111		reg = <0x80000000 DT_SIZE_M(16)>;
112	};
113
114	soc {
115		peripheral@50000000 {
116			#address-cells = <1>;
117			#size-cells = <1>;
118			ranges = <0x0 0x50000000 0x10000000>;
119
120			#include "mps2_an521-common.dtsi"
121		};
122	};
123};
124
125&nvic {
126	arm,num-irq-priority-bits = <3>;
127};
128
129&uart1 {
130	status = "okay";
131};
132