1/dts-v1/;
2#include <ambiq/ambiq_apollo3_blue.dtsi>
3
4#include "apollo3_evb-pinctrl.dtsi"
5#include <zephyr/dt-bindings/input/input-event-codes.h>
6
7/ {
8	model = "Ambiq Apollo3 Blue evaluation board";
9	compatible = "ambiq,apollo3_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-mcumgr = &uart0;
18		zephyr,uart-pipe = &uart0;
19		zephyr,flash-controller = &flash;
20		zephyr,bt_hci = &bt_hci_apollo;
21		zephyr,code-partition = &slot0_partition;
22	};
23
24	aliases {
25		watchdog0 = &wdt0;
26		led0 = &led0;
27		led1 = &led1;
28		led2 = &led2;
29		sw0 = &button0;
30		sw1 = &button1;
31		bootloader-led0 = &led0;
32		mcuboot-led0 = &led0;
33		rtc = &rtc0;
34	};
35
36	leds {
37		compatible = "gpio-leds";
38		led0: led_0 {
39			gpios = <&gpio0_31 10 GPIO_ACTIVE_LOW>;
40			label = "LED 0";
41		};
42		led1: led_1 {
43			gpios = <&gpio0_31 30 GPIO_ACTIVE_LOW>;
44			label = "LED 1";
45		};
46		led2: led_2 {
47			gpios = <&gpio0_31 15 GPIO_ACTIVE_LOW>;
48			label = "LED 2";
49		};
50		led3: led_3 {
51			gpios = <&gpio0_31 14 GPIO_ACTIVE_LOW>;
52			label = "LED 3";
53		};
54		led4: led_4 {
55			gpios = <&gpio0_31 17 GPIO_ACTIVE_LOW>;
56			label = "LED 4";
57		};
58	};
59
60	buttons {
61		compatible = "gpio-keys";
62		button0: button_0 {
63			gpios = <&gpio0_31 16 GPIO_ACTIVE_LOW>;
64			label = "BTN0";
65			zephyr,code = <INPUT_KEY_0>;
66		};
67		button1: button_1 {
68			gpios = <&gpio0_31 18 GPIO_ACTIVE_LOW>;
69			label = "BTN1";
70			zephyr,code = <INPUT_KEY_1>;
71		};
72		button2: button_2 {
73			gpios = <&gpio0_31 19 GPIO_ACTIVE_LOW>;
74			label = "BTN2";
75			zephyr,code = <INPUT_KEY_2>;
76		};
77	};
78};
79
80&flash0 {
81	erase-block-size = <8192>;
82	write-block-size = <4>;
83
84	partitions {
85		compatible = "fixed-partitions";
86		#address-cells = <1>;
87		#size-cells = <1>;
88
89		internal_boot_partition: partition@0 {
90			label = "internal_bootloader";
91			reg = <0x00000000 0xc000>;
92		};
93
94		boot_partition: partition@c000 {
95			label = "mcuboot";
96			reg = <0x0000c000 0xc000>;
97		};
98		slot0_partition: partition@18000 {
99			label = "image-0";
100			reg = <0x00018000 0x72000>;
101		};
102		slot1_partition: partition@8a000 {
103			label = "image-1";
104			reg = <0x0008a000 0x72000>;
105		};
106
107		/* Set 16KB of storage at the end of the 1024KB of flash */
108		storage_partition: partition@fc000 {
109			label = "storage";
110			reg = <0x000fc000 0x4000>;
111		};
112	};
113};
114
115&stimer0 {
116	clk-source = <3>;
117};
118
119&bleif {
120	pinctrl-0 = <&bleif_default>;
121	pinctrl-names = "default";
122	status = "okay";
123};
124
125&uart0 {
126	current-speed = <115200>;
127	pinctrl-0 = <&uart0_default>;
128	pinctrl-names = "default";
129	status = "okay";
130};
131
132&itm {
133	pinctrl-0 = <&itm_default>;
134	pinctrl-names = "default";
135	status = "okay";
136};
137
138&wdt0 {
139	status = "okay";
140};
141
142&spi0 {
143	compatible = "ambiq,spi";
144	pinctrl-0 = <&spi0_default>;
145	pinctrl-names = "default";
146	cs-gpios = <&gpio0_31 11 GPIO_ACTIVE_LOW>;
147	clock-frequency = <DT_FREQ_M(1)>;
148	status = "okay";
149};
150
151&i2c3 {
152	compatible = "ambiq,i2c";
153	pinctrl-0 = <&i2c3_default>;
154	pinctrl-names = "default";
155	clock-frequency = <I2C_BITRATE_STANDARD>;
156	scl-gpios = <&gpio32_63 10 (GPIO_OPEN_DRAIN | GPIO_PULL_UP)>;
157	sda-gpios = <&gpio32_63 11 (GPIO_OPEN_DRAIN | GPIO_PULL_UP)>;
158	status = "okay";
159};
160
161&counter0 {
162	status = "okay";
163};
164
165&counter1 {
166	status = "okay";
167};
168
169&counter2 {
170	status = "okay";
171};
172
173&counter3 {
174	status = "okay";
175};
176
177&counter4 {
178	status = "okay";
179};
180
181&counter5 {
182	status = "okay";
183};
184
185&counter6 {
186	status = "okay";
187};
188
189&counter7 {
190	status = "okay";
191};
192
193&rtc0 {
194	status = "okay";
195	clock = "XTAL";
196};
197
198&adc0 {
199	compatible = "ambiq,adc";
200	pinctrl-0 = <&adc0_default>;
201	pinctrl-names = "default";
202	status = "disabled";
203};
204
205&gpio0_31 {
206	status = "okay";
207};
208
209&gpio32_63 {
210	status = "okay";
211};
212