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 }; 23 24 aliases { 25 sw0 = &button0; 26 i2c-0 = &i2c0; 27 watchdog0 = &wdt0; 28 }; 29 30 gpio_keys { 31 compatible = "gpio-keys"; 32 button0: button0 { 33 label = "BTN"; 34 gpios = <&gpio0 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 35 zephyr,code = <INPUT_KEY_0>; 36 }; 37 }; 38}; 39 40&cpu0 { 41 clock-frequency = <ESP32_CLK_CPU_160M>; 42}; 43 44&uart0 { 45 status = "okay"; 46 current-speed = <115200>; 47 pinctrl-0 = <&uart0_default>; 48 pinctrl-names = "default"; 49}; 50 51&usb_serial { 52 status = "okay"; 53}; 54 55&i2c0 { 56 status = "okay"; 57 clock-frequency = <I2C_BITRATE_STANDARD>; 58 pinctrl-0 = <&i2c0_default>; 59 pinctrl-names = "default"; 60}; 61 62&trng0 { 63 status = "okay"; 64}; 65 66&spi2 { 67 #address-cells = <1>; 68 #size-cells = <0>; 69 status = "okay"; 70 pinctrl-0 = <&spim2_default>; 71 pinctrl-names = "default"; 72}; 73 74&gpio0 { 75 status = "okay"; 76}; 77 78&wdt0 { 79 status = "okay"; 80}; 81 82&timer0 { 83 status = "disabled"; 84}; 85 86&timer1 { 87 status = "disabled"; 88}; 89 90&twai { 91 /* requires external CAN transceiver or jumper on RX and TX pins for loopback testing */ 92 status = "disabled"; 93 pinctrl-0 = <&twai_default>; 94 pinctrl-names = "default"; 95 bus-speed = <125000>; 96}; 97 98&flash0 { 99 status = "okay"; 100 partitions { 101 compatible = "fixed-partitions"; 102 #address-cells = <1>; 103 #size-cells = <1>; 104 105 /* Reserve 60kB for the bootloader */ 106 boot_partition: partition@0 { 107 label = "mcuboot"; 108 reg = <0x00000000 0x0000F000>; 109 read-only; 110 }; 111 112 /* Reserve 1024kB for the application in slot 0 */ 113 slot0_partition: partition@10000 { 114 label = "image-0"; 115 reg = <0x00010000 0x00100000>; 116 }; 117 118 /* Reserve 1024kB for the application in slot 1 */ 119 slot1_partition: partition@110000 { 120 label = "image-1"; 121 reg = <0x00110000 0x00100000>; 122 }; 123 124 /* Reserve 256kB for the scratch partition */ 125 scratch_partition: partition@210000 { 126 label = "image-scratch"; 127 reg = <0x00210000 0x00040000>; 128 }; 129 130 storage_partition: partition@250000 { 131 label = "storage"; 132 reg = <0x00250000 0x00006000>; 133 }; 134 }; 135}; 136