1/* 2 * Copyright (c) 2023 Martin Kiepfer <mrmarteng@teleschirm.org> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6/dts-v1/; 7 8#include <espressif/esp32s3/esp32s3_fn8.dtsi> 9#include "m5stack_stamps3-pinctrl.dtsi" 10#include "m5stack_stamps3_connectors.dtsi" 11#include <zephyr/dt-bindings/pwm/pwm.h> 12#include <dt-bindings/led/led.h> 13#include <dt-bindings/led/worldsemi_ws2812c.h> 14#include <zephyr/dt-bindings/input/input-event-codes.h> 15#include <espressif/partitions_0x0_amp.dtsi> 16 17/ { 18 model = "M5Stack StampS3 PROCPU"; 19 compatible = "m5stack,stamps3"; 20 21 chosen { 22 zephyr,sram = &sram1; 23 zephyr,console = &usb_serial; 24 zephyr,shell-uart = &usb_serial; 25 zephyr,flash = &flash0; 26 zephyr,code-partition = &slot0_partition; 27 zephyr,bt-hci = &esp32_bt_hci; 28 }; 29 30 aliases { 31 sw0 = &user_button_0; 32 watchdog0 = &wdt0; 33 //pwm-0 = &ledc0; 34 i2c-0 = &i2c0; 35 led-strip = &status_rgb_led; 36 }; 37 38 gpio_keys { 39 compatible = "gpio-keys"; 40 41 /* This is the button that's underneath the LCD display */ 42 user_button_0: button_0 { 43 label = "User button 0"; 44 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; 45 zephyr,code = <INPUT_KEY_0>; 46 }; 47 }; 48}; 49 50&usb_serial { 51 status = "okay"; 52}; 53 54&uart0 { 55 status = "okay"; 56 current-speed = <115200>; 57 pinctrl-0 = <&uart0_default>; 58 pinctrl-names = "default"; 59}; 60 61&i2c0 { 62 status = "okay"; 63 clock-frequency = <I2C_BITRATE_STANDARD>; 64 pinctrl-0 = <&i2c0_default>; 65 pinctrl-names = "default"; 66}; 67 68&i2c1 { 69 status = "okay"; 70 clock-frequency = <I2C_BITRATE_STANDARD>; 71 pinctrl-0 = <&i2c1_default>; 72 pinctrl-names = "default"; 73}; 74 75&trng0 { 76 status = "okay"; 77}; 78 79&mcpwm0 { 80 status = "okay"; 81 pinctrl-0 = <&mcpwm0_default>; 82 pinctrl-names = "default"; 83 prescale = <255>; 84 prescale-timer0 = <100>; 85 prescale-timer1 = <100>; 86}; 87 88&ledc0 { 89 pinctrl-0 = <&ledc0_default>; 90 pinctrl-names = "default"; 91 status = "disabled"; 92 #address-cells = <1>; 93 #size-cells = <0>; 94 channel0@0 { 95 reg = <0x0>; 96 timer = <0>; 97 }; 98 channel0@1 { 99 reg = <0x1>; 100 timer = <0>; 101 }; 102}; 103 104 105&spi2 { 106 #address-cells = <1>; 107 #size-cells = <0>; 108 status = "okay"; 109 pinctrl-0 = <&spim2_default>; 110 pinctrl-names = "default"; 111}; 112 113&spi3 { 114 #address-cells = <1>; 115 #size-cells = <0>; 116 status = "okay"; 117 line-idle-low; 118 pinctrl-0 = <&spim3_default>; 119 pinctrl-names = "default"; 120 121 status_rgb_led: ws2812@0 { 122 compatible = "worldsemi,ws2812-spi"; 123 reg = <0x0>; 124 spi-max-frequency = <WS2812C_SPI_FREQ>; 125 126 chain-length = <1>; 127 color-mapping = <LED_COLOR_ID_GREEN>, 128 <LED_COLOR_ID_RED>, 129 <LED_COLOR_ID_BLUE>; 130 spi-one-frame = <WS2812C_ONE_FRAME>; 131 spi-zero-frame = <WS2812C_ZERO_FRAME>; 132 reset-delay = <250>; 133 }; 134}; 135 136&gpio0 { 137 status = "okay"; 138}; 139 140&gpio1 { 141 status = "okay"; 142}; 143 144&wdt0 { 145 status = "okay"; 146}; 147 148&timer0 { 149 status = "okay"; 150}; 151 152&timer1 { 153 status = "okay"; 154}; 155 156&esp32_bt_hci { 157 status = "okay"; 158}; 159