1/dts-v1/;
2#include <ambiq/ambiq_apollo4p.dtsi>
3#include <zephyr/dt-bindings/input/input-event-codes.h>
4
5#include "apollo4p_evb-pinctrl.dtsi"
6
7/ {
8	model = "Ambiq Apollo4 Plus evaluation board";
9	compatible = "ambiq,apollo4p_evb";
10
11	chosen {
12		zephyr,itcm = &tcm;
13		zephyr,sram = &sram0;
14		zephyr,flash = &flash0;
15		zephyr,console = &uart0;
16		zephyr,shell-uart = &uart0;
17		zephyr,uart-pipe = &uart0;
18		zephyr,flash-controller = &flash;
19	};
20
21	aliases {
22		watchdog0 = &wdt0;
23		led0 = &led0;
24		led1 = &led1;
25		led2 = &led2;
26		sw0 = &button0;
27		sw1 = &button1;
28		rtc = &rtc0;
29	};
30
31	leds {
32		compatible = "gpio-leds";
33		led0: led_0 {
34			gpios = <&gpio0_31 30 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
35			label = "LED 0";
36		};
37		led1: led_1 {
38			gpios = <&gpio64_95 26 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
39			label = "LED 1";
40		};
41		led2: led_2 {
42			gpios = <&gpio96_127 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
43			label = "LED 2";
44		};
45	};
46
47	buttons {
48		compatible = "gpio-keys";
49		polling-mode;
50		button0: button_0 {
51			gpios = <&gpio0_31 18 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
52			label = "BTN0";
53			zephyr,code = <INPUT_KEY_0>;
54			status = "okay";
55		};
56		button1: button_1 {
57			gpios = <&gpio0_31 19 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
58			label = "BTN1";
59			zephyr,code = <INPUT_KEY_1>;
60			status = "okay";
61		};
62	};
63};
64
65&uart0 {
66	current-speed = <115200>;
67	pinctrl-0 = <&uart0_default>;
68	pinctrl-names = "default";
69	status = "okay";
70};
71
72&itm {
73	pinctrl-0 = <&itm_default>;
74	pinctrl-names = "default";
75	status = "okay";
76};
77
78&adc0 {
79	compatible = "ambiq,adc";
80	pinctrl-0 = <&adc0_default>;
81	pinctrl-names = "default";
82	status = "okay";
83};
84
85&counter0 {
86	status = "okay";
87};
88
89&rtc0 {
90	status = "okay";
91	clock = "XTAL";
92};
93
94&wdt0 {
95	status = "okay";
96};
97
98&iom0_i2c {
99	compatible = "ambiq,i2c";
100	pinctrl-0 = <&i2c0_default>;
101	pinctrl-names = "default";
102	clock-frequency = <I2C_BITRATE_STANDARD>;
103	scl-gpios = <&gpio0_31 5 (GPIO_OPEN_DRAIN | GPIO_PULL_UP)>;
104	sda-gpios = <&gpio0_31 6 (GPIO_OPEN_DRAIN | GPIO_PULL_UP)>;
105	status = "okay";
106};
107
108&iom1_spi {
109	compatible = "ambiq,spi";
110	pinctrl-0 = <&spi1_default>;
111	pinctrl-names = "default";
112	cs-gpios = <&gpio0_31 11 GPIO_ACTIVE_LOW>;
113	clock-frequency = <1000000>;
114	status = "okay";
115};
116
117&mspi0 {
118	pinctrl-0 = <&mspi0_default>;
119	pinctrl-names = "default";
120	status = "okay";
121};
122
123&mspi1 {
124	pinctrl-0 = <&mspi1_default>;
125	pinctrl-names = "default";
126	status = "okay";
127};
128
129&mspi2 {
130	pinctrl-0 = <&mspi2_default>;
131	pinctrl-names = "default";
132	status = "okay";
133};
134
135&flash0 {
136	erase-block-size = <2048>;
137	write-block-size = <16>;
138
139	partitions {
140		compatible = "fixed-partitions";
141		#address-cells = <1>;
142		#size-cells = <1>;
143
144		/* Set 16KB of storage at the end of the 1952KB of flash */
145		storage_partition: partition@1e4000 {
146			label = "storage";
147			reg = <0x001e4000 0x4000>;
148		};
149	};
150};
151
152&stimer0 {
153	clk-source = <3>;
154};
155
156zephyr_udc0: &usb {
157	vddusb33-gpios = <&gpio96_127 7 (GPIO_PULL_UP)>;
158	vddusb0p9-gpios = <&gpio96_127 5 (GPIO_PULL_UP)>;
159	status = "okay";
160};
161
162&gpio0_31 {
163	status = "okay";
164};
165
166&gpio32_63 {
167	status = "okay";
168};
169
170&gpio64_95 {
171	status = "okay";
172};
173
174&gpio96_127 {
175	status = "okay";
176};
177