Skip to content

Commit f3a82fc

Browse files
peterwangszkartben
authored andcommitted
boards: frdm_mcxa266, frdm_mcxa346: create common dtsi for soc and board
1. nxp_mcxa266_a346_a366_common.dtsi created for soc dts 2. frdm_mcxa266_a346_a366_common.dtsi.dtsi created for board dts Signed-off-by: Peter Wang <[email protected]>
1 parent b7ff3e1 commit f3a82fc

File tree

6 files changed

+717
-1346
lines changed

6 files changed

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

0 commit comments

Comments
 (0)