1/* 2 * Copyright (c) 2022 metraTec 3 * Copyright 2022-2023 NXP 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8#include "lpcxpresso55s06-pinctrl.dtsi" 9#include <zephyr/dt-bindings/input/input-event-codes.h> 10 11/ { 12 chosen { 13 zephyr,sram = &sram0; 14 zephyr,flash = &flash0; 15 zephyr,code-partition = &slot0_partition; 16 zephyr,console = &flexcomm0; 17 zephyr,shell-uart = &flexcomm0; 18 zephyr,entropy = &rng; 19 zephyr,flash-controller = &iap; 20 zephyr,canbus = &can0; 21 }; 22 23 aliases { 24 led0 = &blue_led; 25 led1 = &red_led; 26 led2 = &green_led; 27 sw0 = &btn_wk; 28 sw1 = &btn_usr; 29 sw2 = &btn_isp; 30 usart-0 = &flexcomm0; 31 }; 32 33 leds { 34 compatible = "gpio-leds"; 35 blue_led: led_0 { 36 gpios = <&gpio0 22 0>; 37 label = "Blue LED"; 38 }; 39 red_led: led_1 { 40 gpios = <&gpio0 21 0>; 41 label = "Red LED"; 42 }; 43 green_led: led_2 { 44 gpios = <&gpio0 18 0>; 45 label = "Green LED"; 46 }; 47 }; 48 49 gpio_keys { 50 compatible = "gpio-keys"; 51 btn_wk: button_0 { 52 label = "Wakeup button"; 53 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; 54 zephyr,code = <INPUT_KEY_WAKEUP>; 55 }; 56 btn_usr: button_1 { 57 label = "User button"; 58 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; 59 zephyr,code = <INPUT_KEY_0>; 60 }; 61 btn_isp: button_2 { 62 label = "ISP button"; 63 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; 64 zephyr,code = <INPUT_KEY_1>; 65 }; 66 }; 67 68 mikrobus_header: mikrobus-connector { 69 compatible = "mikro-bus"; 70 #gpio-cells = <2>; 71 gpio-map-mask = <0xffffffff 0xffffffc0>; 72 gpio-map-pass-thru = <0 0x3f>; 73 gpio-map = <0 0 &gpio0 16 0>, /* AN */ 74 /* Not a GPIO */ /* RST */ 75 <2 0 &gpio1 1 0>, /* CS */ 76 <3 0 &gpio1 2 0>, /* SCK */ 77 <4 0 &gpio1 3 0>, /* MISO */ 78 <5 0 &gpio0 26 0>, /* MOSI */ 79 /* +3.3V */ 80 /* GND */ 81 <6 0 &gpio1 5 0>, /* PWM */ 82 <7 0 &gpio0 28 0>, /* INT */ 83 <8 0 &gpio1 10 0>, /* RX */ 84 <9 0 &gpio1 11 0>, /* TX */ 85 <10 0 &gpio0 24 0>, /* SCL */ 86 <11 0 &gpio0 25 0>; /* SDA */ 87 /* +5V */ 88 /* GND */ 89 }; 90 91 arduino_header: arduino-connector { 92 compatible = "arduino-header-r3"; 93 #gpio-cells = <2>; 94 gpio-map-mask = <0xffffffff 0xffffffc0>; 95 gpio-map-pass-thru = <0 0x3f>; 96 gpio-map = <0 0 &gpio0 16 0>, /* A0 */ 97 <1 0 &gpio0 23 0>, /* A1 */ 98 <2 0 &gpio0 9 0>, /* A2 */ 99 <3 0 &gpio0 0 0>, /* A3 */ 100 <4 0 &gpio0 13 0>, /* A4 */ 101 <5 0 &gpio0 14 0>, /* A5 */ 102 <6 0 &gpio1 10 0>, /* D0 */ 103 <7 0 &gpio1 11 0>, /* D1 */ 104 <8 0 &gpio0 15 0>, /* D2 */ 105 <9 0 &gpio0 23 0>, /* D3 */ 106 <10 0 &gpio0 22 0>, /* D4 */ 107 <11 0 &gpio0 19 0>, /* D5 */ 108 <12 0 &gpio0 18 0>, /* D6 */ 109 <13 0 &gpio0 2 0>, /* D7 */ 110 <14 0 &gpio0 10 0>, /* D8 */ 111 <15 0 &gpio0 25 0>, /* D9 */ 112 <16 0 &gpio1 1 0>, /* D10 */ 113 <17 0 &gpio0 26 0>, /* D11 */ 114 <18 0 &gpio1 3 0>, /* D12 */ 115 <19 0 &gpio1 2 0>; /* D13 */ 116 }; 117}; 118 119&flash0 { 120 partitions { 121 compatible = "fixed-partitions"; 122 #address-cells = <1>; 123 #size-cells = <1>; 124 boot_partition: partition@0 { 125 label = "mcuboot"; 126 reg = <0x0 DT_SIZE_K(32)>; 127 }; 128 slot0_partition: partition@8000 { 129 label = "image-0"; 130 reg = <0x00008000 DT_SIZE_K(96)>; 131 }; 132 slot1_partition: partition@20000 { 133 label = "image-1"; 134 reg = <0x00020000 DT_SIZE_K(96)>; 135 }; 136 storage_partition: partition@38000 { 137 label = "storage"; 138 reg = <0x00038000 DT_SIZE_K(20)>; 139 }; 140 /* The last 12KB are reserved for PFR on the 256KB flash. */ 141 }; 142}; 143 144&flexcomm0 { 145 status = "okay"; 146 compatible = "nxp,lpc-usart"; 147 current-speed = <115200>; 148 pinctrl-0 = <&pinmux_flexcomm0_usart>; 149 pinctrl-names = "default"; 150}; 151 152&can0 { 153 status = "okay"; 154 pinctrl-0 = <&pinmux_can0>; 155 pinctrl-names = "default"; 156 157 can-transceiver { 158 max-bitrate = <5000000>; 159 }; 160}; 161