/* * Copyright (c) 2023 Martin Kiepfer * Copyright (c) 2025 Jakub Novák * * SPDX-License-Identifier: Apache-2.0 */ /dts-v1/; #include #include "m5stack_fire-pinctrl.dtsi" #include "grove_connectors.dtsi" #include "m5stack_mbus_connectors.dtsi" #include #include #include / { 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 = ; }; button1: button_1 { gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; label = "button middle"; zephyr,code = ; }; button2: button_2 { gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; label = "button right"; zephyr,code = ; }; button3: button_3 { gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; label = "button 2"; zephyr,code = ; }; }; 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 = ; display-inversion; width = <320>; height = <240>; rotation = <0>; }; }; }; &flash0 { reg = <0x0 DT_SIZE_M(16)>; }; &psram0 { size = ; }; &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 = ; 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"; };