1/*
2 * Copyright (c) 2021 metraTec GmbH
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <nxp/nxp_lpc51u68.dtsi>
10#include "lpcxpresso51u68-pinctrl.dtsi"
11#include <zephyr/dt-bindings/input/input-event-codes.h>
12
13/ {
14	model = "NXP LPCXPRESSO51U68 board";
15	compatible = "nxp,lpc51xxx","nxp,lpc";
16
17	chosen {
18		zephyr,sram = &sram0;
19		zephyr,flash = &flash0;
20		zephyr,console = &flexcomm0;
21		zephyr,shell-uart = &flexcomm0;
22	};
23
24	aliases {
25		led0 = &blue_led;
26		led1 = &green_led;
27		led2 = &red_led;
28		sw0 = &btn_wk;
29		sw1 = &isp0_button;
30		sw2 = &isp1_button;
31		usart-0 = &flexcomm0;
32	};
33
34	leds {
35		compatible = "gpio-leds";
36		blue_led: led_0 {
37			gpios = <&gpio1 9 0>;
38			label = "Blue LED";
39		};
40		green_led: led_1 {
41			gpios = <&gpio1 10 0>;
42			label = "Green LED";
43		};
44		red_led: led_2 {
45			gpios = <&gpio0 29 0>;
46			label = "Red LED";
47		};
48	};
49
50	gpio-keys {
51		compatible = "gpio-keys";
52		btn_wk: button_0 {
53			label = "Wakeup button";
54			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
55			zephyr,code = <INPUT_KEY_WAKEUP>;
56		};
57		isp0_button: button_1 {
58			label = "ISP0 button";
59			gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
60			zephyr,code = <INPUT_KEY_0>;
61		};
62		isp1_button: button_2 {
63			label = "ISP1 button";
64			gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
65			zephyr,code = <INPUT_KEY_1>;
66		};
67	};
68};
69
70&flexcomm0 {
71	status = "okay";
72	compatible = "nxp,lpc-usart";
73	current-speed = <115200>;
74	pinctrl-0 = <&pinmux_flexcomm0_uart>;
75	pinctrl-names = "default";
76};
77
78&flexcomm4 {
79	status = "okay";
80	compatible = "nxp,lpc-i2c";
81	clock-frequency = <I2C_BITRATE_STANDARD>;
82	pinctrl-0 = <&pinmux_flexcomm4_i2c>;
83	pinctrl-names = "default";
84	#address-cells = <1>;
85	#size-cells = <0>;
86};
87
88&flexcomm5 {
89	status = "okay";
90	compatible = "nxp,lpc-spi";
91	pinctrl-0 = <&pinmux_flexcomm5_spi>;
92	pinctrl-names = "default";
93	#address-cells = <1>;
94	#size-cells = <0>;
95};
96