1/* 2 * Copyright 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8 9#include <espressif/esp32c3/esp32c3_fx4.dtsi> 10#include "stamp_c3-pinctrl.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "M5Stack STAMP-C3"; 15 compatible = "m5stack,stamp_c3"; 16 17 chosen { 18 zephyr,sram = &sram0; 19 zephyr,console = &uart0; 20 zephyr,shell-uart = &uart0; 21 zephyr,flash = &flash0; 22 zephyr,code-partition = &slot0_partition; 23 zephyr,bt-hci = &esp32_bt_hci; 24 }; 25 26 aliases { 27 sw0 = &button0; 28 i2c-0 = &i2c0; 29 watchdog0 = &wdt0; 30 }; 31 32 gpio_keys { 33 compatible = "gpio-keys"; 34 button0: button0 { 35 label = "BTN"; 36 gpios = <&gpio0 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 37 zephyr,code = <INPUT_KEY_0>; 38 }; 39 }; 40}; 41 42&uart0 { 43 status = "okay"; 44 current-speed = <115200>; 45 pinctrl-0 = <&uart0_default>; 46 pinctrl-names = "default"; 47}; 48 49&usb_serial { 50 status = "okay"; 51}; 52 53&i2c0 { 54 status = "okay"; 55 clock-frequency = <I2C_BITRATE_STANDARD>; 56 pinctrl-0 = <&i2c0_default>; 57 pinctrl-names = "default"; 58}; 59 60&trng0 { 61 status = "okay"; 62}; 63 64&spi2 { 65 #address-cells = <1>; 66 #size-cells = <0>; 67 status = "okay"; 68 pinctrl-0 = <&spim2_default>; 69 pinctrl-names = "default"; 70}; 71 72&gpio0 { 73 status = "okay"; 74}; 75 76&wdt0 { 77 status = "okay"; 78}; 79 80&timer0 { 81 status = "disabled"; 82}; 83 84&timer1 { 85 status = "disabled"; 86}; 87 88&twai { 89 /* requires external CAN transceiver or jumper on RX and TX pins for loopback testing */ 90 status = "disabled"; 91 pinctrl-0 = <&twai_default>; 92 pinctrl-names = "default"; 93}; 94 95&flash0 { 96 status = "okay"; 97 partitions { 98 compatible = "fixed-partitions"; 99 #address-cells = <1>; 100 #size-cells = <1>; 101 102 /* Reserve 60kB for the bootloader */ 103 boot_partition: partition@0 { 104 label = "mcuboot"; 105 reg = <0x00000000 0x0000F000>; 106 read-only; 107 }; 108 109 /* Reserve 1024kB for the application in slot 0 */ 110 slot0_partition: partition@10000 { 111 label = "image-0"; 112 reg = <0x00010000 0x00100000>; 113 }; 114 115 /* Reserve 1024kB for the application in slot 1 */ 116 slot1_partition: partition@110000 { 117 label = "image-1"; 118 reg = <0x00110000 0x00100000>; 119 }; 120 121 /* Reserve 256kB for the scratch partition */ 122 scratch_partition: partition@210000 { 123 label = "image-scratch"; 124 reg = <0x00210000 0x00040000>; 125 }; 126 127 storage_partition: partition@250000 { 128 label = "storage"; 129 reg = <0x00250000 0x00006000>; 130 }; 131 }; 132}; 133 134&esp32_bt_hci { 135 status = "okay"; 136}; 137