zephyr/boards/m5stack/m5stack_fire/m5stack_fire_procpu.dts
Jakub Novák 342c737a70 boards: m5stack: add support for M5Stack Fire
Adds support for the M5Stack Fire. Board files are adapted from those
used for the M5Stack Core2.

Aside from the 2 newest revisions the device also contains a BMM150
magnetometer which is not supported.

The LED strips on the sides are also not supported because Zephyr
does not support fast GPIO switching, see: #11917.

The IP5306 charger works by itself but doesn't have a driver written for
it thus it's not able to be interfaced with.

Signed-off-by: Jakub Novák <jakubnovak.cz@outlook.cz>
2025-06-04 17:02:47 +02:00

223 lines
3.9 KiB
Plaintext

/*
* Copyright (c) 2023 Martin Kiepfer <mrmarteng@teleschirm.org>
* Copyright (c) 2025 Jakub Novák <jakubnovak.cz@outlook.cz>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <espressif/esp32/esp32_d0wd_v3.dtsi>
#include "m5stack_fire-pinctrl.dtsi"
#include "grove_connectors.dtsi"
#include "m5stack_mbus_connectors.dtsi"
#include <zephyr/dt-bindings/display/ili9xxx.h>
#include <espressif/partitions_0x1000_amp.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "M5Stack Fire PROCPU";
compatible = "m5stack,fire";
aliases {
uart-0 = &uart0;
i2c-0 = &i2c0;
watchdog0 = &wdt0;
accel0 = &mpu6886;
sw0 = &button0;
pwm0 = &ledc0;
lcd-bg = &lcd_bg;
};
chosen {
zephyr,sram = &sram1;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,display = &ili9342c;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};
pwm {
compatible = "pwm-leds";
lcd_bg: lcd_bg {
label = "PWM LED0";
/* The cycle duration is taken from the ILI9342c spec section 8.3.15 */
pwms = <&ledc0 7 PWM_KHZ(16000 / 256) PWM_POLARITY_NORMAL>;
};
speaker: speaker {
label = "PWM speaker";
pwms = <&ledc0 8 1000 PWM_POLARITY_NORMAL>;
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
label = "button left";
zephyr,code = <INPUT_KEY_0>;
};
button1: button_1 {
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
label = "button middle";
zephyr,code = <INPUT_KEY_1>;
};
button2: button_2 {
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
label = "button right";
zephyr,code = <INPUT_KEY_2>;
};
button3: button_3 {
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
label = "button 2";
zephyr,code = <INPUT_KEY_3>;
};
};
mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
dc-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 1 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
spi-dev = <&spi3>;
write-only;
#address-cells = <1>;
#size-cells = <0>;
ili9342c: ili9342c@0 {
status = "okay";
compatible = "ilitek,ili9342c";
mipi-max-frequency = <30000000>;
reg = <0>;
pixel-format = <ILI9XXX_PIXEL_FORMAT_RGB565>;
display-inversion;
width = <320>;
height = <240>;
rotation = <0>;
};
};
};
&flash0 {
reg = <0x0 DT_SIZE_M(16)>;
};
&psram0 {
size = <DT_SIZE_M(8)>;
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_tx_gpio1 &uart0_rx_gpio3>;
pinctrl-names = "default";
};
&uart1 {
status = "disabled";
current-speed = <115200>;
pinctrl-0 = <&uart1_rx_gpio33 &uart1_tx_gpio32>;
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
sda-gpios = <&gpio0 21 GPIO_OPEN_DRAIN>;
scl-gpios = <&gpio0 22 GPIO_OPEN_DRAIN>;
pinctrl-0 = <&i2c0_default>;
scl-timeout-us = <0>;
pinctrl-names = "default";
mpu6886: mpu6886@68 {
status = "okay";
compatible = "invensense,mpu6050";
reg = <0x68>;
};
};
&spi3 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&spim3_default>;
pinctrl-names = "default";
dma-enabled;
clock-frequency = <20000000>;
cs-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>, <&gpio0 4 GPIO_ACTIVE_LOW>;
sd0: sd@1 {
status = "okay";
compatible = "zephyr,sdhc-spi-slot";
reg = <1>;
spi-max-frequency = <20000000>;
mmc {
status = "okay";
compatible = "zephyr,sdmmc-disk";
disk-name = "SD";
};
};
};
&ledc0 {
pinctrl-0 = <&ledc0_default>;
pinctrl-names = "default";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
hispeed0@7 {
reg = <0x7>;
timer = <0>;
};
hispeed1@8 {
reg = <0x8>;
timer = <0>;
};
};
&timer0 {
status = "okay";
};
&timer1 {
status = "okay";
};
&timer2 {
status = "okay";
};
&timer3 {
status = "okay";
};
&trng0 {
status = "okay";
};
&esp32_bt_hci {
status = "okay";
};
&wifi {
status = "okay";
};