-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
board: m5stack_m5dial: Add support for M5Dial IoT devkit #67065
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# M5Stack M5Dial board configuration | ||
|
||
# Copyright (c) 2023 Martin Kiepfer <mrmarteng@teleschirm.org> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_M5STACK_M5DIAL | ||
bool "M5Stack M5Dial IoT Development Board" | ||
depends on SOC_SERIES_ESP32S3 | ||
|
||
choice SOC_PART_NUMBER | ||
default SOC_ESP32S3_FN8 | ||
endchoice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# M5Stack M5Dial board configuration | ||
# Copyright (c) 2023 Martin Kiepfer <mrmarteng@teleschirm.org> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_M5STACK_M5DIAL | ||
|
||
config BOARD | ||
default "m5stack_m5dial" | ||
depends on BOARD_M5STACK_M5DIAL | ||
|
||
config ENTROPY_GENERATOR | ||
default y | ||
|
||
config HEAP_MEM_POOL_SIZE | ||
default 98304 if WIFI | ||
default 65536 if BT | ||
default 4096 | ||
|
||
config KERNEL_MEM_POOL | ||
default y | ||
|
||
choice BT_HCI_BUS_TYPE | ||
default BT_ESP32 if BT | ||
endchoice | ||
|
||
config INPUT_FT5336_INTERRUPT | ||
default y if INPUT | ||
|
||
config INPUT | ||
default y | ||
|
||
config LV_COLOR_16_SWAP | ||
default y if LVGL | ||
|
||
endif # BOARD_M5STACK_M5DIAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*") | ||
set(OPENOCD OPENOCD-NOTFOUND) | ||
endif() | ||
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH) | ||
|
||
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
.. _m5stack_m5dial: | ||
|
||
M5Stack M5Dial | ||
############## | ||
|
||
Overview | ||
******** | ||
|
||
M5Stack M5Dial is an ESP32-based development board from M5Stack. | ||
|
||
It features the following integrated components: | ||
|
||
- ESP32-S3FN8 chip (240MHz dual core, Wi-Fi/BLE 5.0) | ||
- 512KB of SRAM | ||
- 384KB of ROM | ||
- 8MB of Flash | ||
- LCD IPS TFT 1,28", 240x240 round display | ||
- WS1850S NFC/RFID | ||
- RTC8563 RTC | ||
- Rotary encoder | ||
- Beeper | ||
|
||
.. figure:: img/m5stack_m5dial.webp | ||
:align: center | ||
:alt: M5Stack M5Dial | ||
|
||
M5Stack M5Dial | ||
|
||
|
||
Supported Features | ||
================== | ||
|
||
The Zephyr m5stack_m5dial board configuration supports the following hardware features: | ||
|
||
+-----------+------------+-------------------------------------+ | ||
| Interface | Controller | Driver/Component | | ||
+===========+============+=====================================+ | ||
| NVIC | on-chip | nested vector interrupt controller | | ||
+-----------+------------+-------------------------------------+ | ||
| UART | on-chip | serial port-polling; | | ||
| | | serial port-interrupt | | ||
+-----------+------------+-------------------------------------+ | ||
| PINMUX | on-chip | pinmux | | ||
+-----------+------------+-------------------------------------+ | ||
| GPIO | on-chip | gpio | | ||
+-----------+------------+-------------------------------------+ | ||
| I2C | on-chip | i2c | | ||
+-----------+------------+-------------------------------------+ | ||
| SPI | on-chip | spi | | ||
+-----------+------------+-------------------------------------+ | ||
| CLOCK | on-chip | reset and clock control | | ||
+-----------+------------+-------------------------------------+ | ||
| COUNTER | on-chip | rtc | | ||
+-----------+------------+-------------------------------------+ | ||
| WATCHDOG | on-chip | independent watchdog | | ||
+-----------+------------+-------------------------------------+ | ||
| PWM | on-chip | pwm | | ||
+-----------+------------+-------------------------------------+ | ||
| ADC | on-chip | adc | | ||
+-----------+------------+-------------------------------------+ | ||
| DAC | on-chip | dac | | ||
+-----------+------------+-------------------------------------+ | ||
| die-temp | on-chip | die temperature sensor | | ||
+-----------+------------+-------------------------------------+ | ||
|
||
|
||
Start Application Development | ||
***************************** | ||
|
||
Before powering up your M5Stack M5Dial, please make sure that the board is in good | ||
condition with no obvious signs of damage. | ||
|
||
System requirements | ||
=================== | ||
|
||
Prerequisites | ||
------------- | ||
|
||
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command | ||
below to retrieve those files. | ||
|
||
.. code-block:: shell | ||
|
||
west blobs fetch hal_espressif | ||
|
||
.. note:: | ||
|
||
It is recommended running the command above after :file:`west update`. | ||
|
||
Building & Flashing | ||
------------------- | ||
|
||
Build and flash applications as usual (see :ref:`build_an_application` and | ||
:ref:`application_run` for more details). | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: m5stack_m5dial | ||
:goals: build | ||
|
||
The usual ``flash`` target will work with the ``m5stack_m5dial`` board | ||
configuration. Here is an example for the :ref:`hello_world` | ||
application. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: m5stack_m5dial | ||
:goals: flash | ||
|
||
The baud rate of 921600bps is set by default. If experiencing issues when flashing, | ||
try using different values by using ``--esp-baud-rate <BAUD>`` option during | ||
``west flash`` (e.g. ``west flash --esp-baud-rate 115200``). | ||
|
||
You can also open the serial monitor using the following command: | ||
|
||
.. code-block:: shell | ||
|
||
west espressif monitor | ||
|
||
After the board has automatically reset and booted, you should see the following | ||
message in the monitor: | ||
|
||
.. code-block:: console | ||
|
||
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx ***** | ||
Hello World! m5stack_m5dial | ||
|
||
Debugging | ||
--------- | ||
|
||
M5Stack M5Dial debugging is not supported due to pinout limitations. | ||
|
||
Related Documents | ||
***************** | ||
|
||
- `M5Stack M5Dial schematic <https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/products/core/M5Dial/Sch_M5Dial.pdf>`_ | ||
- `ESP32S3 Datasheet <https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (c) 2023 Martin Kiepfer <mrmarteng@teleschirm.org> | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
grove_header: grove_header { | ||
compatible = "grove-header"; | ||
#gpio-cells = <2>; | ||
gpio-map-mask = <0xffffffff 0xffffffc0>; | ||
gpio-map-pass-thru = <0 0x3f>; | ||
gpio-map = <0 0 &gpio0 1 0>, | ||
<1 0 &gpio0 2 0>; | ||
}; | ||
}; | ||
|
||
grove_i2c1: &i2c1 {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright (c) 2023 Martin Kiepfer <mrmarteng@teleschirm.org> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h> | ||
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h> | ||
#include <zephyr/dt-bindings/pinctrl/esp32s3-gpio-sigmap.h> | ||
|
||
&pinctrl { | ||
uart0_default: uart0_default { | ||
group1 { | ||
pinmux = <UART0_TX_GPIO43>; | ||
output-high; | ||
}; | ||
group2 { | ||
pinmux = <UART0_RX_GPIO44>; | ||
bias-pull-up; | ||
}; | ||
}; | ||
|
||
i2c0_default: i2c0_default { | ||
group1 { | ||
pinmux = <I2C0_SDA_GPIO13>, | ||
<I2C0_SCL_GPIO15>; | ||
bias-pull-up; | ||
drive-open-drain; | ||
output-high; | ||
}; | ||
}; | ||
|
||
i2c1_default: i2c1_default { | ||
group1 { | ||
pinmux = <I2C1_SDA_GPIO11>, | ||
<I2C1_SCL_GPIO12>; | ||
bias-pull-up; | ||
drive-open-drain; | ||
output-high; | ||
}; | ||
}; | ||
|
||
spim2_default: spim2_default { | ||
group1 { | ||
pinmux = <SPIM2_SCLK_GPIO6>, | ||
<SPIM2_CSEL_GPIO7>; | ||
}; | ||
group2 { | ||
pinmux = <SPIM2_MOSI_GPIO5>; | ||
output-low; | ||
}; | ||
|
||
}; | ||
|
||
ledc0_default: ledc0_default { | ||
group1 { | ||
pinmux = <LEDC_CH0_GPIO9>; | ||
output-enable; | ||
}; | ||
group2 { | ||
pinmux = <LEDC_CH1_GPIO3>; | ||
output-enable; | ||
}; | ||
}; | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.