|
| 1 | +/* |
| 2 | + * Copyright (c) 2025 Nuvoton Technology Corporation. |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +/dts-v1/; |
| 8 | + |
| 9 | +#include <nuvoton/m5531h2l.dtsi> |
| 10 | +#include "numaker_m5531-pinctrl.dtsi" |
| 11 | +#include <zephyr/dt-bindings/input/input-event-codes.h> |
| 12 | + |
| 13 | +/ { |
| 14 | + model = "Nuvoton NuMaker M5531 board"; |
| 15 | + compatible = "nuvoton,numaker-m5531"; |
| 16 | + |
| 17 | + aliases { |
| 18 | + led0 = &green_led; |
| 19 | + led1 = &yellow_led; |
| 20 | + sw0 = &btn0; |
| 21 | + sw1 = &btn1; |
| 22 | + }; |
| 23 | + |
| 24 | + chosen { |
| 25 | + zephyr,console = &uart0; |
| 26 | + zephyr,shell-uart = &uart0; |
| 27 | + zephyr,sram = &sram0; |
| 28 | + zephyr,dtcm = &dtcm; |
| 29 | + zephyr,itcm = &itcm; |
| 30 | + zephyr,flash = &flash0; |
| 31 | + zephyr,code-partition = &slot0_partition; |
| 32 | + zephyr,canbus = &canfd0; |
| 33 | + }; |
| 34 | + |
| 35 | + leds { |
| 36 | + compatible = "gpio-leds"; |
| 37 | + |
| 38 | + green_led: led_0 { |
| 39 | + gpios = <&gpiod 5 GPIO_ACTIVE_LOW>; |
| 40 | + label = "User LD0"; |
| 41 | + }; |
| 42 | + |
| 43 | + yellow_led: led_1 { |
| 44 | + gpios = <&gpiod 6 GPIO_ACTIVE_LOW>; |
| 45 | + label = "User LD1"; |
| 46 | + }; |
| 47 | + }; |
| 48 | + |
| 49 | + gpio_keys { |
| 50 | + compatible = "gpio-keys"; |
| 51 | + |
| 52 | + btn0: btn0 { |
| 53 | + label = "BTN0"; |
| 54 | + gpios = <&gpioi 11 GPIO_ACTIVE_LOW>; |
| 55 | + zephyr,code = <INPUT_KEY_0>; |
| 56 | + }; |
| 57 | + |
| 58 | + btn1: btn1 { |
| 59 | + label = "BTN1"; |
| 60 | + gpios = <&gpioh 1 GPIO_ACTIVE_LOW>; |
| 61 | + zephyr,code = <INPUT_KEY_1>; |
| 62 | + }; |
| 63 | + }; |
| 64 | +}; |
| 65 | + |
| 66 | +&gpiod { |
| 67 | + status = "okay"; |
| 68 | +}; |
| 69 | + |
| 70 | +&gpioh { |
| 71 | + status = "okay"; |
| 72 | +}; |
| 73 | + |
| 74 | +&gpioi { |
| 75 | + status = "okay"; |
| 76 | +}; |
| 77 | + |
| 78 | +&flash0 { |
| 79 | + partitions { |
| 80 | + compatible = "fixed-partitions"; |
| 81 | + #address-cells = <1>; |
| 82 | + #size-cells = <1>; |
| 83 | + |
| 84 | + boot_partition: partition@0 { |
| 85 | + label = "mcuboot"; |
| 86 | + reg = <0x0 0x8000>; |
| 87 | + }; |
| 88 | + |
| 89 | + slot0_partition: partition@8000 { |
| 90 | + label = "image-0"; |
| 91 | + reg = <0x8000 0xf8000>; |
| 92 | + }; |
| 93 | + |
| 94 | + slot1_partition: partition@100000 { |
| 95 | + label = "image-1"; |
| 96 | + reg = <0x100000 0xf8000>; |
| 97 | + }; |
| 98 | + |
| 99 | + storage_partition: partition@1f8000 { |
| 100 | + label = "storage"; |
| 101 | + reg = <0x1f8000 0x8000>; |
| 102 | + }; |
| 103 | + }; |
| 104 | +}; |
| 105 | + |
| 106 | +&sram0 { |
| 107 | + reg = <0x20100000 DT_SIZE_K(1344)>; |
| 108 | +}; |
| 109 | + |
| 110 | +&uart0 { |
| 111 | + current-speed = <115200>; |
| 112 | + pinctrl-0 = <&uart0_default>; |
| 113 | + pinctrl-names = "default"; |
| 114 | + status = "okay"; |
| 115 | +}; |
| 116 | + |
| 117 | +/* On enabled, usbd is required to be clocked in 48MHz. */ |
| 118 | +zephyr_udc0: &usbd { |
| 119 | + pinctrl-0 = <&usbd_default>; |
| 120 | + pinctrl-names = "default"; |
| 121 | + status = "okay"; |
| 122 | +}; |
0 commit comments