1/* SPDX-License-Identifier: Apache-2.0 */
2
3/dts-v1/;
4
5#include <nxp/nxp_k6x.dtsi>
6#include <zephyr/dt-bindings/pwm/pwm.h>
7#include "hexiwear_mk64f12-pinctrl.dtsi"
8
9/ {
10	model = "Hexiwear K64 board";
11	compatible = "nxp,hexiwear", "nxp,k64f", "nxp,k6x";
12
13	aliases {
14		led0 = &green_led;
15		led1 = &blue_led;
16		led2 = &red_led;
17		pwm-led0 = &green_pwm_led;
18		red-pwm-led = &red_pwm_led;
19		green-pwm-led = &green_pwm_led;
20		blue-pwm-led = &blue_pwm_led;
21		magn0 = &fxos8700;
22		accel0 = &fxos8700;
23	};
24
25	chosen {
26		zephyr,sram = &sram0;
27		zephyr,flash = &flash0;
28		zephyr,code-partition = &slot0_partition;
29		zephyr,uart-mcumgr = &uart0;
30		zephyr,console = &uart0;
31		zephyr,shell-uart = &uart0;
32		zephyr,bt-hci = &bt_hci_uart;
33	};
34
35	leds {
36		compatible = "gpio-leds";
37		red_led: led_0 {
38			gpios = <&gpioc 8 GPIO_ACTIVE_LOW>;
39			label = "User LD1";
40		};
41		green_led: led_1 {
42			gpios = <&gpiod 0 GPIO_ACTIVE_LOW>;
43			label = "User LD2";
44		};
45		blue_led: led_2 {
46			gpios = <&gpioc 9 GPIO_ACTIVE_LOW>;
47			label = "User LD3";
48		};
49	};
50
51	pwmleds {
52		compatible = "pwm-leds";
53
54		red_pwm_led: red_pwm_led {
55			pwms = <&ftm3 4 15625000 PWM_POLARITY_INVERTED>;
56		};
57		green_pwm_led: green_pwm_led {
58			pwms = <&ftm3 0 15625000 PWM_POLARITY_INVERTED>;
59		};
60		blue_pwm_led: blue_pwm_led {
61			pwms = <&ftm3 5 15625000 PWM_POLARITY_INVERTED>;
62		};
63	};
64
65	en_bat_sens: enable-battery-sense {
66		compatible = "regulator-fixed";
67		regulator-name = "en_bat_sens";
68		enable-gpios = <&gpioc 14 GPIO_ACTIVE_LOW>;
69		regulator-boot-on;
70	};
71
72	en_ldo: enable-ldo {
73		compatible = "regulator-fixed";
74		regulator-name = "en_ldo";
75		enable-gpios = <&gpioa 29 GPIO_ACTIVE_HIGH>;
76		regulator-boot-on;
77	};
78
79	en_3v3b: enable-3v3b {
80		compatible = "regulator-fixed";
81		regulator-name = "en_3v3b";
82		enable-gpios = <&gpiob 12 GPIO_ACTIVE_LOW>;
83		regulator-boot-on;
84	};
85};
86
87&sim {
88	pllfll-select = <KINETIS_SIM_PLLFLLSEL_MCGPLLCLK>;
89	er32k-select = <KINETIS_SIM_ER32KSEL_RTC>;
90};
91
92&cpu0 {
93	clock-frequency = <120000000>;
94};
95
96&adc0 {
97	status = "okay";
98};
99
100&adc1 {
101	status = "okay";
102};
103
104&ftm3 {
105	status = "okay";
106	compatible = "nxp,ftm-pwm";
107	#pwm-cells = <3>;
108	pinctrl-0 = <&ftm3_default>;
109	pinctrl-names = "default";
110	clock-source = "fixed";
111};
112
113&i2c0 {
114	status = "okay";
115	pinctrl-0 = <&i2c0_default>;
116	pinctrl-names = "default";
117
118	max30101@57 {
119		status = "disabled";
120		compatible = "maxim,max30101";
121		reg = <0x57>;
122	};
123};
124
125&i2c1 {
126	status = "okay";
127	pinctrl-0 = <&i2c1_default>;
128	pinctrl-names = "default";
129
130	fxos8700: fxos8700@1e {
131		compatible = "nxp,fxos8700";
132		reg = <0x1e>;
133		int1-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>;
134		int2-gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
135	};
136
137	fxas21002@20 {
138		compatible = "nxp,fxas21002";
139		reg = <0x20>;
140		int1-gpios = <&gpiod 1 GPIO_ACTIVE_LOW>;
141		int2-gpios = <&gpioc 18 GPIO_ACTIVE_LOW>;
142	};
143};
144
145&uart0 {
146	status = "okay";
147	current-speed = <115200>;
148	pinctrl-0 = <&uart0_default>;
149	pinctrl-names = "default";
150};
151
152&uart4 {
153	status = "okay";
154	current-speed = <115200>;
155	pinctrl-0 = <&uart4_default>;
156	pinctrl-names = "default";
157
158	bt_hci_uart: bt_hci_uart {
159		compatible = "zephyr,bt-hci-uart";
160		status = "okay";
161	};
162};
163
164&gpioa {
165	status = "okay";
166};
167
168&gpiob {
169	status = "okay";
170};
171
172&gpioc {
173	status = "okay";
174};
175
176&gpiod {
177	status = "okay";
178};
179
180&gpioe {
181	status = "okay";
182};
183
184&flash0 {
185
186	partitions {
187		compatible = "fixed-partitions";
188		#address-cells = <1>;
189		#size-cells = <1>;
190		boot_partition: partition@0 {
191			label = "mcuboot";
192			reg = <0x00000000 DT_SIZE_K(64)>;
193			read-only;
194		};
195		/* The MCUBoot swap-move algorithm uses the last 2 sectors
196		 * of the primary slot0 for swap status and move.
197		 */
198		slot0_partition: partition@10000 {
199			label = "image-0";
200			reg = <0x00010000 (DT_SIZE_K(416) + DT_SIZE_K(8))>;
201		};
202		slot1_partition: partition@7a000 {
203			label = "image-1";
204			reg = <0x0007a000 DT_SIZE_K(416)>;
205		};
206		storage_partition: partition@e2000 {
207			label = "storage";
208			reg = <0x000e2000 DT_SIZE_K(120)>;
209		};
210	};
211};
212