1/* 2 * Copyright (c) 2020-2023, NXP 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8 9#include <nxp/nxp_rt6xx.dtsi> 10#include <zephyr/dt-bindings/pwm/pwm.h> 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13#include "mimxrt685_evk_cm33-pinctrl.dtsi" 14 15/ { 16 model = "NXP MIMXRT685-EVK board"; 17 compatible = "nxp,mimxrt685"; 18 19 aliases { 20 sw0 = &user_button_1; 21 sw1 = &user_button_2; 22 led0 = &green_led; 23 led1 = &blue_led; 24 led2 = &red_led; 25 usart-0 = &flexcomm0; 26 /* For pwm test suites */ 27 pwm-0 = &sc_timer; 28 pwm-led0 = &green_pwm_led; 29 green-pwm-led = &green_pwm_led; 30 blue-pwm-led = &blue_pwm_led; 31 red-pwm-led = &red_pwm_led; 32 watchdog0 = &wwdt0; 33 magn0 = &fxos8700; 34 accel0 = &fxos8700; 35 sdhc0 = &usdhc0; 36 }; 37 38 chosen { 39 zephyr,flash-controller = &mx25um51345g; 40 zephyr,flash = &mx25um51345g; 41 zephyr,code-partition = &slot0_partition; 42 zephyr,sram = &sram0; 43 zephyr,console = &flexcomm0; 44 zephyr,shell-uart = &flexcomm0; 45 }; 46 47 gpio_keys { 48 compatible = "gpio-keys"; 49 user_button_1: button_0 { 50 label = "User SW1"; 51 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; 52 zephyr,code = <INPUT_KEY_0>; 53 }; 54 user_button_2: button_1 { 55 label = "User SW2"; 56 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; 57 zephyr,code = <INPUT_KEY_1>; 58 }; 59 }; 60 61 leds: leds { 62 compatible = "gpio-leds"; 63 green_led: led_1 { 64 gpios = <&gpio0 14 0>; 65 label = "User LED_GREEN"; 66 }; 67 blue_led: led_2 { 68 gpios = <&gpio0 26 0>; 69 label = "User LED_BLUE"; 70 }; 71 red_led: led_3 { 72 gpios = <&gpio0 31 0>; 73 label = "User LED_RED"; 74 }; 75 }; 76 77 pwmleds { 78 compatible = "pwm-leds"; 79 green_pwm_led: green_pwm_led { 80 pwms = <&sc_timer 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 81 label = "Green PWM LED"; 82 status = "okay"; 83 }; 84 blue_pwm_led: blue_pwm_led { 85 pwms = <&sc_timer 6 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 86 label = "Blue PWM LED"; 87 status = "okay"; 88 }; 89 red_pwm_led: red_pwm_led { 90 pwms = <&sc_timer 6 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 91 label = "Red PWM LED"; 92 status = "disabled"; 93 }; 94 }; 95 96 arduino_header: arduino-connector { 97 compatible = "arduino-header-r3"; 98 #gpio-cells = <2>; 99 gpio-map-mask = <0xffffffff 0xffffffc0>; 100 gpio-map-pass-thru = <0 0x3f>; 101 gpio-map = <0 0 &gpio0 5 0>, /* A0 */ 102 <1 0 &gpio0 6 0>, /* A1 */ 103 <2 0 &gpio0 19 0>, /* A2 */ 104 <3 0 &gpio0 20 0>, /* A3 */ 105 <4 0 &gpio0 17 0>, /* A4 */ 106 <5 0 &gpio0 18 0>, /* A5 */ 107 <6 0 &gpio0 30 0>, /* D0 */ 108 <7 0 &gpio0 29 0>, /* D1 */ 109 <8 0 &gpio0 28 0>, /* D2 */ 110 <9 0 &gpio0 27 0>, /* D3 */ 111 <10 0 &gpio1 0 0>, /* D4 */ 112 <11 0 &gpio1 10 0>, /* D5 */ 113 <12 0 &gpio1 2 0>, /* D6 */ 114 <13 0 &gpio1 8 0>, /* D7 */ 115 <14 0 &gpio1 9 0>, /* D8 */ 116 <15 0 &gpio1 7 0>, /* D9 */ 117 <16 0 &gpio1 6 0>, /* D10 */ 118 <17 0 &gpio1 5 0>, /* D11 */ 119 <18 0 &gpio1 4 0>, /* D12 */ 120 <19 0 &gpio1 3 0>, /* D13 */ 121 <20 0 &gpio0 17 0>, /* D14 */ 122 <21 0 &gpio0 18 0>; /* D15 */ 123 }; 124}; 125 126/* 127 * RT600 EVK board uses OS timer as the kernel timer 128 * In case we need to switch to SYSTICK timer, then 129 * replace &os_timer with &systick 130 */ 131&os_timer { 132 status = "okay"; 133 wakeup-source; 134}; 135 136&rtc { 137 status = "okay"; 138}; 139 140&flexcomm0 { 141 compatible = "nxp,lpc-usart"; 142 status = "okay"; 143 current-speed = <115200>; 144 pinctrl-0 = <&pinmux_flexcomm0_usart>; 145 pinctrl-names = "default"; 146 dmas = <&dma0 0>, <&dma0 1>; 147 dma-names = "rx", "tx"; 148}; 149 150arduino_i2c: &flexcomm2 { 151 compatible = "nxp,lpc-i2c"; 152 status = "okay"; 153 pinctrl-0 = <&pinmux_flexcomm2_i2c>; 154 pinctrl-names = "default"; 155 clock-frequency = <I2C_BITRATE_FAST>; 156 #address-cells = <1>; 157 #size-cells = <0>; 158 159 fxos8700: fxos8700@1e { 160 compatible = "nxp,fxos8700"; 161 reg = <0x1e>; 162 int1-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; 163 reset-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; 164 }; 165}; 166 167arduino_serial: &flexcomm4 { 168 compatible = "nxp,lpc-usart"; 169 status = "okay"; 170 current-speed = <115200>; 171 pinctrl-0 = <&pinmux_flexcomm4_usart>; 172 pinctrl-names = "default"; 173 dmas = <&dma0 8>, <&dma0 9>; 174 dma-names = "rx", "tx"; 175}; 176 177arduino_spi: &flexcomm5 { 178 compatible = "nxp,lpc-spi"; 179 status = "okay"; 180 #address-cells = <1>; 181 #size-cells = <0>; 182 dmas = <&dma0 10>, <&dma0 11>; 183 dma-names = "rx", "tx"; 184 pinctrl-0 = <&pinmux_flexcomm5_spi>; 185 pinctrl-names = "default"; 186}; 187 188/* I2S receive channel */ 189i2s0: &flexcomm1 { 190 status = "okay"; 191 compatible = "nxp,lpc-i2s"; 192 #address-cells = <1>; 193 #size-cells = <0>; 194 dmas = <&dma0 2>; 195 dma-names = "rx"; 196 pinctrl-0 = <&pinmux_flexcomm1_i2s>; 197 pinctrl-names = "default"; 198}; 199 200/* I2S transmit channel */ 201i2s1: &flexcomm3 { 202 status = "okay"; 203 compatible = "nxp,lpc-i2s"; 204 #address-cells = <1>; 205 #size-cells = <0>; 206 dmas = <&dma0 7>; 207 dma-names = "tx"; 208 pinctrl-0 = <&pinmux_flexcomm3_i2s>; 209 pinctrl-names = "default"; 210}; 211 212/* PCA9420 PMIC */ 213&pmic_i2c { 214 status = "okay"; 215 compatible = "nxp,lpc-i2c"; 216 clock-frequency = <I2C_BITRATE_FAST>; 217 #address-cells = <1>; 218 #size-cells = <0>; 219 pinctrl-0 = <&pinmux_pmic_i2c>; 220 pinctrl-names = "default"; 221 222 pca9420: pca9420@61 { 223 compatible = "nxp,pca9420"; 224 reg = <0x61>; 225 nxp,enable-modesel-pins; 226 227 buck1: BUCK1 { 228 regulator-boot-on; 229 }; 230 231 buck2: BUCK2 { 232 regulator-boot-on; 233 }; 234 235 ldo1: LDO1 { 236 regulator-boot-on; 237 }; 238 239 ldo2: LDO2 { 240 regulator-boot-on; 241 }; 242 243 244 }; 245}; 246 247&flexspi { 248 pinctrl-0 = <&pinmux_flexspi>; 249 pinctrl-names = "default"; 250 status = "okay"; 251 mx25um51345g: mx25um51345g@2 { 252 compatible = "nxp,imx-flexspi-mx25um51345g"; 253 /* MX25UM51245G is 64MB, 512MBit flash part */ 254 size = <DT_SIZE_M(64 * 8)>; 255 reg = <2>; 256 spi-max-frequency = <200000000>; 257 status = "okay"; 258 jedec-id = [c2 81 3a]; 259 erase-block-size = <4096>; 260 write-block-size = <16>; 261 262 partitions { 263 compatible = "fixed-partitions"; 264 #address-cells = <1>; 265 #size-cells = <1>; 266 267 boot_partition: partition@0 { 268 label = "mcuboot"; 269 reg = <0x00000000 DT_SIZE_K(128)>; 270 }; 271 slot0_partition: partition@20000 { 272 label = "image-0"; 273 reg = <0x00020000 DT_SIZE_K(3076)>; 274 }; 275 slot1_partition: partition@321000 { 276 label = "image-1"; 277 reg = <0x00321000 DT_SIZE_K(3072)>; 278 }; 279 storage_partition: partition@621000 { 280 label = "storage"; 281 reg = <0x00621000 DT_SIZE_M(57)>; 282 }; 283 }; 284 }; 285}; 286 287&gpio0 { 288 status = "okay"; 289}; 290 291&gpio1 { 292 status = "okay"; 293}; 294 295&gpio2 { 296 status = "okay"; 297}; 298 299&dma0 { 300 status = "okay"; 301}; 302 303&wwdt0 { 304 status = "okay"; 305}; 306 307&user_button_1 { 308 status = "okay"; 309}; 310 311&user_button_2 { 312 status = "okay"; 313}; 314 315&green_led { 316 status = "okay"; 317}; 318 319&blue_led { 320 status = "okay"; 321}; 322 323&red_led { 324 status = "okay"; 325}; 326 327&sc_timer { 328 status = "okay"; 329 pinctrl-0 = <&pinmux_sctimer>; 330 pinctrl-names = "default"; 331}; 332 333&usdhc0 { 334 status = "okay"; 335 /* Quick fix for 1.8V SD cards on RT600- disable 1.8V negotiation */ 336 no-1-8-v; 337 pwr-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; 338 cd-gpios = <&gpio2 9 GPIO_ACTIVE_LOW>; 339 sdmmc { 340 compatible = "zephyr,sdmmc-disk"; 341 status = "okay"; 342 }; 343 pinctrl-0 = <&pinmux_usdhc>; 344 pinctrl-names = "default"; 345}; 346 347&lpadc0 { 348 status = "okay"; 349 pinctrl-0 = <&pinmux_lpadc0>; 350 pinctrl-names = "default"; 351}; 352 353zephyr_udc0: &usbhs { 354 status = "okay"; 355}; 356 357&ctimer0 { 358 status = "okay"; 359}; 360 361&ctimer1 { 362 status = "okay"; 363}; 364 365&ctimer2 { 366 status = "okay"; 367}; 368 369&ctimer3 { 370 status = "okay"; 371}; 372 373&ctimer4 { 374 status = "okay"; 375}; 376 377&i3c0 { 378 pinctrl-0 = <&pinmux_i3c>; 379 pinctrl-names = "default"; 380 381 status = "okay"; 382}; 383 384/* Disable this node if not using USB and need another MPU region */ 385&sram1 { 386 status = "okay"; 387}; 388