1/* SPDX-License-Identifier: Apache-2.0 */ 2 3/dts-v1/; 4 5#include <nxp/nxp_k6x.dtsi> 6#include "frdm_k64f-pinctrl.dtsi" 7#include <zephyr/dt-bindings/input/input-event-codes.h> 8 9/ { 10 model = "NXP Freedom MK64F board"; 11 compatible = "nxp,mk64f12", "nxp,k64f", "nxp,k6x"; 12 13 aliases { 14 led0 = &green_led; 15 led1 = &blue_led; 16 led2 = &red_led; 17 sw0 = &user_button_3; 18 sw1 = &user_button_2; 19 magn0 = &fxos8700; 20 accel0 = &fxos8700; 21 }; 22 23 chosen { 24 zephyr,sram = &sram0; 25 zephyr,flash = &flash0; 26 zephyr,code-partition = &slot0_partition; 27 zephyr,console = &uart0; 28 zephyr,shell-uart = &uart0; 29 zephyr,uart-pipe = &uart0; 30 zephyr,canbus = &flexcan0; 31 zephyr,uart-mcumgr = &uart0; 32 }; 33 34 leds { 35 compatible = "gpio-leds"; 36 red_led: led_0 { 37 gpios = <&gpiob 22 GPIO_ACTIVE_LOW>; 38 label = "User LD1"; 39 }; 40 green_led: led_1 { 41 gpios = <&gpioe 26 GPIO_ACTIVE_LOW>; 42 label = "User LD2"; 43 }; 44 blue_led: led_2 { 45 gpios = <&gpiob 21 GPIO_ACTIVE_LOW>; 46 label = "User LD3"; 47 }; 48 }; 49 50 gpio_keys { 51 compatible = "gpio-keys"; 52 user_button_2: button_0 { 53 label = "User SW2"; 54 gpios = <&gpioc 6 GPIO_ACTIVE_LOW>; 55 zephyr,code = <INPUT_KEY_0>; 56 }; 57 user_button_3: button_1 { 58 label = "User SW3"; 59 gpios = <&gpioa 4 GPIO_ACTIVE_LOW>; 60 zephyr,code = <INPUT_KEY_1>; 61 }; 62 }; 63 64 arduino_header: connector { 65 compatible = "arduino-header-r3"; 66 #gpio-cells = <2>; 67 gpio-map-mask = <0xffffffff 0xffffffc0>; 68 gpio-map-pass-thru = <0 0x3f>; 69 gpio-map = <0 0 &gpiob 2 0>, /* A0 */ 70 <1 0 &gpiob 3 0>, /* A1 */ 71 <2 0 &gpiob 10 0>, /* A2 */ 72 <3 0 &gpiob 11 0>, /* A3 */ 73 <4 0 &gpioc 11 0>, /* A4 */ 74 <5 0 &gpioc 10 0>, /* A5 */ 75 <6 0 &gpioc 16 0>, /* D0 */ 76 <7 0 &gpioc 17 0>, /* D1 */ 77 <8 0 &gpiob 9 0>, /* D2 */ 78 <9 0 &gpioa 1 0>, /* D3 */ 79 <10 0 &gpiob 23 0>, /* D4 */ 80 <11 0 &gpioa 2 0>, /* D5 */ 81 <12 0 &gpioc 2 0>, /* D6 */ 82 <13 0 &gpioc 3 0>, /* D7 */ 83 /* NOTE: HW Rev D and below use: */ 84 /* <14 0 &gpioa 0 0>, */ 85 /* NOTE: HW Rev E and on use: */ 86 <14 0 &gpioc 12 0>, /* D8 */ 87 <15 0 &gpioc 4 0>, /* D9 */ 88 <16 0 &gpiod 0 0>, /* D10 */ 89 <17 0 &gpiod 2 0>, /* D11 */ 90 <18 0 &gpiod 3 0>, /* D12 */ 91 <19 0 &gpiod 1 0>, /* D13 */ 92 <20 0 &gpioe 25 0>, /* D14 */ 93 <21 0 &gpioe 24 0>; /* D15 */ 94 }; 95}; 96 97&sim { 98 pllfll-select = <KINETIS_SIM_PLLFLLSEL_MCGPLLCLK>; 99 er32k-select = <KINETIS_SIM_ER32KSEL_RTC>; 100}; 101 102arduino_serial: &uart3 { 103 status = "okay"; 104 current-speed = <115200>; 105 pinctrl-0 = <&uart3_default>; 106 pinctrl-names = "default"; 107}; 108 109&cpu0 { 110 clock-frequency = <120000000>; 111}; 112 113&adc0 { 114 status = "okay"; 115 pinctrl-0 = <&adc0_default>; 116 pinctrl-names = "default"; 117}; 118 119&adc1 { 120 status = "okay"; 121 pinctrl-0 = <&adc1_default>; 122 pinctrl-names = "default"; 123}; 124 125&temp1 { 126 status = "okay"; 127}; 128 129&dac0 { 130 status = "okay"; 131 voltage-reference = <2>; 132}; 133 134arduino_i2c: &i2c0 { 135 status = "okay"; 136 pinctrl-0 = <&i2c0_default>; 137 pinctrl-names = "default"; 138 139 fxos8700: fxos8700@1d { 140 compatible = "nxp,fxos8700"; 141 reg = <0x1d>; 142 int1-gpios = <&gpioc 6 GPIO_ACTIVE_LOW>; 143 int2-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; 144 }; 145}; 146 147arduino_spi: &spi0 { 148 status = "okay"; 149 pinctrl-0 = <&spi0_default>; 150 pinctrl-names = "default"; 151}; 152 153&spi1 { 154 status = "okay"; 155 pinctrl-0 = <&spi1_default>; 156 pinctrl-names = "default"; 157 cs-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>; 158 159 sdhc0: sdhc@0 { 160 compatible = "zephyr,sdhc-spi-slot"; 161 reg = <0>; 162 status = "okay"; 163 sdmmc { 164 compatible = "zephyr,sdmmc-disk"; 165 status = "okay"; 166 }; 167 spi-max-frequency = <24000000>; 168 }; 169}; 170 171&ftm0 { 172 status = "okay"; 173 compatible = "nxp,kinetis-ftm-pwm"; 174 #pwm-cells = <3>; 175 pinctrl-0 = <&ftm0_default>; 176 pinctrl-names = "default"; 177}; 178 179&ftm3 { 180 status = "okay"; 181 compatible = "nxp,kinetis-ftm-pwm"; 182 #pwm-cells = <3>; 183 pinctrl-0 = <&ftm3_default>; 184 pinctrl-names = "default"; 185}; 186 187&uart0 { 188 status = "okay"; 189 current-speed = <115200>; 190 pinctrl-0 = <&uart0_default>; 191 pinctrl-names = "default"; 192}; 193 194&uart2 { 195 pinctrl-0 = <&uart2_default>; 196 pinctrl-names = "default"; 197}; 198 199zephyr_udc0: &usbotg { 200 compatible = "nxp,kinetis-usbd"; 201 status = "okay"; 202 num-bidir-endpoints = <8>; 203}; 204 205&gpioa { 206 status = "okay"; 207}; 208 209&gpiob { 210 status = "okay"; 211}; 212 213&gpioc { 214 status = "okay"; 215}; 216 217&gpiod { 218 status = "okay"; 219}; 220 221&gpioe { 222 status = "okay"; 223}; 224 225&flash0 { 226 227 partitions { 228 compatible = "fixed-partitions"; 229 #address-cells = <1>; 230 #size-cells = <1>; 231 232 boot_partition: partition@0 { 233 label = "mcuboot"; 234 reg = <0x00000000 0x00010000>; 235 read-only; 236 }; 237 238 /* 239 * The flash starting at 0x00010000 and ending at 240 * 0x0001ffff (sectors 16-31) is reserved for use 241 * by the application. 242 */ 243 storage_partition: partition@1e000 { 244 label = "storage"; 245 reg = <0x0001e000 0x00002000>; 246 }; 247 248 slot0_partition: partition@20000 { 249 label = "image-0"; 250 reg = <0x00020000 0x00060000>; 251 }; 252 slot1_partition: partition@80000 { 253 label = "image-1"; 254 reg = <0x00080000 0x00060000>; 255 }; 256 scratch_partition: partition@e0000 { 257 label = "image-scratch"; 258 reg = <0x000e0000 0x00020000>; 259 }; 260 }; 261}; 262 263&enet { 264 status = "okay"; 265 pinctrl-0 = <&enet_default>; 266 pinctrl-names = "default"; 267 ptp { 268 /* Be aware that PTC16 and PTC17 are also used for uart3 */ 269 status = "disabled"; 270 pinctrl-0 = <&ptp_default>; 271 pinctrl-names = "default"; 272 }; 273}; 274 275&flexcan0 { 276 status = "okay"; 277 pinctrl-0 = <&flexcan0_default>; 278 pinctrl-names = "default"; 279 bus-speed = <125000>; 280}; 281 282&edma0 { 283 status = "okay"; 284}; 285 286&pit0 { 287 status = "okay"; 288}; 289