blob: 6375c643dc2e8fd289a52266211611d403b6d5e8 [file] [log] [blame]
/*
* Copyright 2024-2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <nxp/nxp_mcxn23x.dtsi>
#include "frdm_mcxn236-pinctrl.dtsi"
#include <zephyr/dt-bindings/i2c/i2c.h>
#include <zephyr/dt-bindings/gpio/arduino-header-r3.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/gpio/dvp-20pin-connector.h>
/ {
model = "NXP FRDM_N236 board";
compatible = "nxp,mcxn236", "nxp,mcx";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash;
zephyr,flash-controller = &fmu;
zephyr,code-partition = &slot0_partition;
zephyr,uart-mcumgr = &flexcomm4_lpuart4;
zephyr,console = &flexcomm4_lpuart4;
zephyr,shell-uart = &flexcomm4_lpuart4;
zephyr,canbus = &flexcan1;
};
aliases {
watchdog0 = &wwdt0;
pwm-0 = &flexpwm1_pwm0;
rtc = &rtc;
die-temp0 = &temp0;
led0 = &red_led;
led1 = &green_led;
led2 = &blue_led;
sw0 = &user_button_2;
sw1 = &user_button_3;
mcuboot-button0 = &user_button_2;
};
leds {
compatible = "gpio-leds";
green_led: led_1 {
gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
label = "Green LED";
};
blue_led: led_2 {
gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
label = "Blue LED";
};
red_led: led_3 {
gpios = <&gpio4 18 GPIO_ACTIVE_LOW>;
label = "Red LED";
};
};
gpio_keys {
compatible = "gpio-keys";
user_button_2: button_0 {
label = "User SW2";
gpios = <&gpio0 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_WAKEUP>;
};
user_button_3: button_1 {
label = "User SW3";
gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_0>;
};
};
arduino_header: arduino-connector {
compatible = "arduino-header-r3";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <ARDUINO_HEADER_R3_A0 0 &gpio4 6 0>,
<ARDUINO_HEADER_R3_A1 0 &gpio4 15 0>,
<ARDUINO_HEADER_R3_A2 0 &gpio4 16 0>,
<ARDUINO_HEADER_R3_A3 0 &gpio4 17 0>,
<ARDUINO_HEADER_R3_A4 0 &gpio4 12 0>,
<ARDUINO_HEADER_R3_A5 0 &gpio4 13 0>,
<ARDUINO_HEADER_R3_D0 0 &gpio4 3 0>,
<ARDUINO_HEADER_R3_D1 0 &gpio4 2 0>,
<ARDUINO_HEADER_R3_D2 0 &gpio2 0 0>,
<ARDUINO_HEADER_R3_D3 0 &gpio3 12 0>,
<ARDUINO_HEADER_R3_D4 0 &gpio0 21 0>,
<ARDUINO_HEADER_R3_D5 0 &gpio2 7 0>,
<ARDUINO_HEADER_R3_D6 0 &gpio3 17 0>,
<ARDUINO_HEADER_R3_D7 0 &gpio0 22 0>,
<ARDUINO_HEADER_R3_D8 0 &gpio0 23 0>,
<ARDUINO_HEADER_R3_D9 0 &gpio3 14 0>,
<ARDUINO_HEADER_R3_D10 0 &gpio1 3 0>,
<ARDUINO_HEADER_R3_D11 0 &gpio1 0 0>,
<ARDUINO_HEADER_R3_D12 0 &gpio1 2 0>,
<ARDUINO_HEADER_R3_D13 0 &gpio1 1 0>,
<ARDUINO_HEADER_R3_D14 0 &gpio1 16 0>,
<ARDUINO_HEADER_R3_D15 0 &gpio1 17 0>;
};
/*
* This node describes the GPIO pins of the LCD-PAR-S035 panel 8080 interface.
*/
nxp_lcd_8080_connector: lcd-8080-connector {
compatible = "nxp,lcd-8080";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <9 0 &gpio0 23 0>, /* Pin 9, LCD touch INT */
<10 0 &gpio4 6 0>, /* Pin 10, LCD backlight control */
<11 0 &gpio4 7 0>; /* Pin 11, LCD and touch reset */
};
dvp_20pin_connector: dvp-20pin-connector {
compatible = "arducam,dvp-20pin-connector";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0x0 GPIO_DT_FLAGS_MASK>;
gpio-map = <DVP_20PIN_PEN 0 &gpio1 19 0>,
<DVP_20PIN_PDN 0 &gpio1 18 0>;
};
};
&sram0 {
compatible = "mmio-sram";
reg = <0x20000000 DT_SIZE_K(192)>;
};
&gpio4 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpio0 {
status = "okay";
};
&green_led {
status = "okay";
};
&red_led {
status = "okay";
};
&user_button_2 {
status = "okay";
};
&edma0 {
status = "okay";
};
&flexcomm2 {
status = "okay";
};
/*
* LPFLEXCOMM supports UART and I2C on the same instance, enable this for
* LFLEXCOMM2
*/
&flexcomm2_lpuart2 {
status = "okay";
};
&flexcomm2_lpi2c2 {
status = "okay";
};
&flexcomm3 {
status = "okay";
};
&flexcomm3_lpspi3 {
status = "okay";
};
&flexcomm4 {
status = "okay";
};
&flexcomm4_lpuart4 {
status = "okay";
};
&flexcomm5 {
status = "okay";
};
&flexcomm5_lpi2c5 {
status = "okay";
};
&wwdt0 {
status = "okay";
};
&flexpwm1_pwm0 {
status = "okay";
};
&flexcan1 {
status = "okay";
};
&ctimer0 {
status = "okay";
};
&vref {
status = "okay";
};
&lpadc0 {
status = "okay";
};
zephyr_udc0: &usb1 {
status = "okay";
phy-handle = <&usbphy1>;
};
&usbphy1 {
status = "okay";
tx-d-cal = <4>;
tx-cal-45-dp-ohms = <7>;
tx-cal-45-dm-ohms = <7>;
};
&lpcmp0 {
status = "okay";
};
&i3c1 {
status = "okay";
};
&flexio0 {
status = "okay";
};
&lptmr0 {
status = "okay";
};
&mrt0_channel0 {
status = "okay";
};
&rtc {
status = "okay";
};
&flexcomm0_lpuart0 {
current-speed = <115200>;
pinctrl-0 = <&pinmux_flexcomm0_lpuart>;
pinctrl-names = "default";
};
&flexcomm2_lpuart2 {
current-speed = <115200>;
pinctrl-0 = <&pinmux_flexcomm2_lpuart>;
pinctrl-names = "default";
};
&flexcomm2_lpi2c2 {
pinctrl-0 = <&pinmux_flexcomm2_lpi2c>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_STANDARD>;
};
nxp_8080_touch_panel_i2c: &flexcomm2_lpi2c2 {
pinctrl-0 = <&pinmux_flexcomm2_lpi2c>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_STANDARD>;
};
&flexcomm3_lpspi3 {
pinctrl-0 = <&pinmux_flexcomm3_lpspi>;
pinctrl-names = "default";
};
&flexcomm4_lpuart4 {
current-speed = <115200>;
pinctrl-0 = <&pinmux_flexcomm4_lpuart>;
pinctrl-names = "default";
};
&flexcomm5_lpi2c5 {
pinctrl-0 = <&pinmux_flexcomm5_lpi2c>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_STANDARD>;
};
/*
* MCXN236 board uses OS timer as the kernel timer
* In case we need to switch to SYSTICK timer, then
* replace &os_timer with &systick
*/
&os_timer {
status = "disabled";
};
&systick {
status = "okay";
};
&flash {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/*
* Partition sizes must be aligned
* to the flash memory sector size of 8KB.
*/
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(80)>;
};
/* For the MCUBoot "upgrade only" method,
* the slot sizes must be equal.
*/
slot0_partition: partition@14000 {
label = "image-0";
reg = <0x00014000 DT_SIZE_K(440)>;
};
slot1_partition: partition@84000 {
label = "image-1";
reg = <0x0084000 DT_SIZE_K(440)>;
};
storage_partition: partition@F0000 {
label = "storage";
reg = <0x000F0000 DT_SIZE_K(64)>;
};
};
};
&flexpwm1_pwm0 {
pinctrl-0 = <&pinmux_flexpwm1_pwm0>;
pinctrl-names = "default";
};
&lpadc0 {
pinctrl-0 = <&pinmux_lpadc0>;
pinctrl-names = "default";
};
&lpcmp0 {
pinctrl-0 = <&pinmux_lpcmp0>;
pinctrl-names = "default";
};
&flexcan1 {
pinctrl-0 = <&pinmux_flexcan1>;
pinctrl-names = "default";
};
zephyr_mipi_dbi_parallel: &flexio0_lcd {
/* DMA channels 0, muxed to FlexIO TX */
dmas = <&edma0 0 61>;
dma-names = "tx";
shifters-count = <8>;
timers-count = <1>;
enwr-pin = <28>;
rd-pin = <27>;
data-pin-start = <4>;
reset-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>;
cs-gpios = <&gpio4 14 GPIO_ACTIVE_HIGH>;
rs-gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&pinmux_flexio_lcd>;
pinctrl-names = "default";
};
&i3c1 {
pinctrl-0 = <&pinmux_i3c1>;
pinctrl-names = "default";
};
p3t1755dp_ard_i3c_interface: &i3c1 {};
p3t1755dp_ard_i2c_interface: &flexcomm5_lpi2c5 {};
/* SmartDMA is used for video driver on this board */
&smartdma {
/* Shields do not enable video-sdma parent node so enable it by default */
status = "okay";
program-mem = <0x4000000>;
video_sdma: video-sdma {
status = "disabled";
compatible = "nxp,video-smartdma";
pinctrl-0 = <&pinmux_smartdma_camera>;
pinctrl-names = "default";
vsync-pin = <4>;
hsync-pin = <5>;
pclk-pin = <7>;
};
};
dvp_20pin_i2c: &flexcomm2_lpi2c2 {};
dvp_20pin_interface: &video_sdma {};
&sai0 {
status = "okay";
pinctrl-0 = <&pinmux_sai0>;
pinctrl-names = "default";
};
&sai1 {
status = "okay";
pinctrl-0 = <&pinmux_sai1>;
pinctrl-names = "default";
};