1/*
2 * Copyright 2025 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <nxp/nxp_mcxa266.dtsi>
10#include "frdm_mcxa266-pinctrl.dtsi"
11#include <zephyr/dt-bindings/input/input-event-codes.h>
12#include <freq.h>
13
14/ {
15	model = "NXP FRDM_MCXA266 board";
16	compatible = "nxp,mcxa266", "nxp,mcx";
17
18	aliases{
19		led0 = &red_led;
20		led1 = &green_led;
21		led2 = &red_led;
22		sw0 = &user_button_2;
23		sw1 = &user_button_3;
24		watchdog0 = &wwdt0;
25		ambient-temp0 = &p3t1755;
26		die-temp0 = &temp0;
27	};
28
29	chosen {
30		zephyr,sram = &sram0;
31		zephyr,flash = &flash;
32		zephyr,flash-controller = &fmu;
33		zephyr,code-partition = &slot0_partition;
34		zephyr,console = &lpuart2;
35		zephyr,shell-uart = &lpuart2;
36	};
37
38	leds {
39		compatible = "gpio-leds";
40
41		red_led: led_0 {
42			gpios = <&gpio3 18 GPIO_ACTIVE_LOW>;
43			label = "Red LED";
44		};
45
46		green_led: led_1 {
47			gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
48			label = "Green LED";
49		};
50
51		blue_led: led_2 {
52			gpios = <&gpio3 21 GPIO_ACTIVE_LOW>;
53			label = "Blue LED";
54		};
55	};
56
57	gpio_keys {
58		compatible = "gpio-keys";
59
60		user_button_2: button_2 {
61			label = "User SW2";
62			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
63			zephyr,code = <INPUT_KEY_0>;
64		};
65
66		user_button_3: button_3 {
67			label = "User SW3";
68			gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
69			zephyr,code = <INPUT_KEY_1>;
70		};
71	};
72
73};
74
75&porta {
76	status = "okay";
77};
78
79&portb {
80	status = "okay";
81};
82
83&portc {
84	status = "okay";
85};
86
87&portd {
88	status = "okay";
89};
90
91&porte {
92	status = "okay";
93};
94
95&gpio0 {
96	status = "okay";
97};
98
99&gpio1 {
100	status = "okay";
101};
102
103&gpio2 {
104	status = "okay";
105};
106
107&gpio3 {
108	status = "okay";
109};
110
111&gpio4 {
112	status = "okay";
113};
114
115&lpuart2 {
116	status = "okay";
117	current-speed = <115200>;
118	pinctrl-0 = <&pinmux_lpuart2>;
119	pinctrl-names = "default";
120};
121
122&edma0 {
123	status = "okay";
124};
125
126&i3c0 {
127	status = "okay";
128	pinctrl-0 = <&pinmux_i3c0>;
129	pinctrl-names = "default";
130
131	i2c-scl-hz = <DT_FREQ_K(400)>;
132	i3c-scl-hz = <DT_FREQ_M(4)>;
133	i3c-od-scl-hz = <DT_FREQ_K(1500)>;
134
135	p3t1755: p3t1755@4800000236152a0090 {
136		compatible = "nxp,p3t1755";
137		reg = <0x48 0x0236 0x152a0090>;
138		status = "okay";
139	};
140};
141
142&lpadc0 {
143	status = "okay";
144	pinctrl-0 = <&pinmux_lpadc0>;
145	pinctrl-names = "default";
146};
147
148&lpcmp0 {
149	pinctrl-0 = <&pinmux_lpcmp0>;
150	pinctrl-names = "default";
151};
152
153&lpi2c1 {
154	status = "okay";
155	pinctrl-0 = <&pinmux_lpi2c1>;
156	pinctrl-names = "default";
157};
158
159&lpi2c3 {
160	status = "okay";
161	pinctrl-0 = <&pinmux_lpi2c3>;
162	pinctrl-names = "default";
163};
164
165&lpspi0 {
166	status = "okay";
167	pinctrl-0 = <&pinmux_lpspi0>;
168	pinctrl-names = "default";
169};
170
171&flash {
172	partitions {
173		compatible = "fixed-partitions";
174		#address-cells = <1>;
175		#size-cells = <1>;
176
177		boot_partition: partition@0 {
178			label = "mcuboot";
179			reg = <0x00000000 DT_SIZE_K(64)>;
180			read-only;
181		};
182		slot0_partition: partition@10000 {
183			label = "image-0";
184			reg = <0x00010000 DT_SIZE_K(400)>;
185		};
186		slot1_partition: partition@74000 {
187			label = "image-1";
188			reg = <0x00074000 DT_SIZE_K(400)>;
189		};
190		storage_partition: partition@d8000 {
191			label = "storage";
192			reg = <0x000d8000 DT_SIZE_K(112)>;
193		};
194	};
195};
196
197&wwdt0 {
198	status = "okay";
199};
200
201&ctimer0 {
202	status = "okay";
203};
204
205&lptmr0 {
206	status = "okay";
207};
208
209&lpuart3 {
210	current-speed = <115200>;
211	pinctrl-0 = <&pinmux_lpuart3>;
212	pinctrl-names = "default";
213};
214