1/* 2 * Copyright (c) 2023 Nuvoton Technology Corporation. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8 9#include <nuvoton/m46x.dtsi> 10#include "numaker_pfm_m467-pinctrl.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "Nuvoton PFM M467 board"; 15 compatible = "nuvoton,pfm-m467", "nuvoton,m467"; 16 17 aliases { 18 led0 = &green_led; 19 led1 = &blue_led; 20 led2 = &red_led; 21 sw0 = &user_button_1; 22 sw1 = &user_button_2; 23 }; 24 25 26 chosen { 27 zephyr,console = &uart0; 28 zephyr,shell-uart = &uart0; 29 zephyr,sram = &sram0; 30 zephyr,flash = &flash0; 31 zephyr,code-partition = &slot0_partition; 32 zephyr,canbus = &canfd0; 33 }; 34 35 36 leds { 37 compatible = "gpio-leds"; 38 red_led: led_0 { 39 gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; 40 label = "User LD1"; 41 }; 42 green_led: led_1 { 43 gpios = <&gpioh 6 GPIO_ACTIVE_LOW>; 44 label = "User LD2"; 45 }; 46 blue_led: led_2 { 47 gpios = <&gpioh 5 GPIO_ACTIVE_LOW>; 48 label = "User LD3"; 49 }; 50 }; 51 52 gpio_keys { 53 compatible = "gpio-keys"; 54 user_button_1: button_1 { 55 label = "User SW2"; 56 gpios = <&gpioh 1 GPIO_ACTIVE_LOW>; 57 zephyr,code = <INPUT_KEY_0>; 58 }; 59 user_button_2: button_2 { 60 label = "User SW3"; 61 gpios = <&gpioh 0 GPIO_ACTIVE_LOW>; 62 zephyr,code = <INPUT_KEY_1>; 63 }; 64 }; 65}; 66 67&scc { 68 core-clock = <192000000>; 69}; 70 71&gpiob { 72 status = "okay"; 73}; 74 75&gpioh { 76 status = "okay"; 77}; 78 79&flash0 { 80 partitions { 81 compatible = "fixed-partitions"; 82 #address-cells = <1>; 83 #size-cells = <1>; 84 85 slot0_partition: partition@0 { 86 label = "image-0"; 87 reg = <0x00000000 0x00080000>; 88 }; 89 slot1_partition: partition@80000 { 90 label = "image-1"; 91 reg = <0x00080000 0x0007e000>; 92 }; 93 storage_partition: partition@fe000 { 94 label = "storage"; 95 reg = <0x000fe000 0x00002000>; 96 }; 97 }; 98}; 99 100&sram0 { 101 reg = <0x20000000 DT_SIZE_K(512)>; 102}; 103 104&uart0 { 105 current-speed = <115200>; 106 pinctrl-0 = <&uart0_default>; 107 pinctrl-names = "default"; 108 status = "okay"; 109}; 110 111&canfd0 { 112 pinctrl-0 = <&canfd0_default>; 113 pinctrl-names = "default"; 114 status = "okay"; 115}; 116 117&emac { 118 pinctrl-0 = <&emac_default>; 119 pinctrl-names = "default"; 120 status = "okay"; 121}; 122 123/* On enabled, usbd is required to be clocked in 48MHz. */ 124zephyr_udc0: &usbd { 125 pinctrl-0 = <&usbd_default>; 126 pinctrl-names = "default"; 127 status = "okay"; 128}; 129