diff --git a/boards/shields/m5stack_core2_ext/Kconfig.shield b/boards/shields/m5stack_core2_ext/Kconfig.shield new file mode 100644 index 00000000000..2710087cd1e --- /dev/null +++ b/boards/shields/m5stack_core2_ext/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2023 Martin Kiepfer +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_M5STACK_CORE2_EXT + def_bool $(shields_list_contains,m5stack_core2_ext) diff --git a/boards/shields/m5stack_core2_ext/doc/img/m5stack_core2_ext.webp b/boards/shields/m5stack_core2_ext/doc/img/m5stack_core2_ext.webp new file mode 100644 index 00000000000..f0de7a3d5bf Binary files /dev/null and b/boards/shields/m5stack_core2_ext/doc/img/m5stack_core2_ext.webp differ diff --git a/boards/shields/m5stack_core2_ext/doc/index.rst b/boards/shields/m5stack_core2_ext/doc/index.rst new file mode 100644 index 00000000000..691ad98f4a2 --- /dev/null +++ b/boards/shields/m5stack_core2_ext/doc/index.rst @@ -0,0 +1,56 @@ +.. _m5stack_core2_ext: + +M5Stack-Core2 base shield +#################################### + +Overview +******** + +`M5Stack-Core2`_ comes with a base shield that is connected to the M5Stack +extension connector. It features an MPU6886 6-axis motion tracker (6DOF IMU) +and a SPM1423 microphone. + +.. figure:: img/m5stack_core2_ext.webp + :align: center + :alt: M5Stack-Core2-EXT + :width: 400 px + + M5Stack-Core2-Extension module + +.. note:: + The SPM1423 microphone functionality is not implemented yet. + +Pins Assignments +================ + ++----------------------+--------------+ +| Shield Connector Pin | Function | ++======================+==============+ +| 0 | GND | ++----------------------+--------------+ +| 11 | 3.3V | ++----------------------+--------------+ +| 16 | I2C - intSDA | ++----------------------+--------------+ +| 17 | I2C - intSCL | ++----------------------+--------------+ + +Programming +*********** + +Set ``-DSHIELD=m5stack_core2_ext`` when you invoke ``west build``. +For example: + +.. zephyr-app-commands:: + :zephyr-app: samples/sensor/mpu6050 + :board: m5stack_core2 + :shield: m5stack_core2_ext + :goals: build + +References +********** + +.. target-notes:: + +.. _M5Stack-Core2: + https://docs.m5stack.com/en/core/core2 diff --git a/boards/shields/m5stack_core2_ext/m5stack_core2_ext.overlay b/boards/shields/m5stack_core2_ext/m5stack_core2_ext.overlay new file mode 100644 index 00000000000..8403fd4da9e --- /dev/null +++ b/boards/shields/m5stack_core2_ext/m5stack_core2_ext.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Martin Kiepfer + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + aliases { + accel0 = &mpu6886_m5stack_core2_ext; + }; +}; + +&m5stack_mbus_i2c0 { + status = "okay"; + + mpu6886_m5stack_core2_ext: mbus_mpu6886@68 { + status = "okay"; + compatible = "invensense,mpu6050"; + reg = <0x68>; + }; +}; diff --git a/boards/xtensa/m5stack_core2/doc/index.rst b/boards/xtensa/m5stack_core2/doc/index.rst index 2a5c25f7deb..4ca27c546f5 100644 --- a/boards/xtensa/m5stack_core2/doc/index.rst +++ b/boards/xtensa/m5stack_core2/doc/index.rst @@ -72,8 +72,9 @@ of the M5Stack Core2 board. || LCD screen || Built-in LCD TFT display \(`LCD-ILI9342C`_, 2", 320x240 px\) | || || controlled via SPI interface | +------------------+--------------------------------------------------------------------------+ -|| 3-axis || The `MPU-6886`_ is a 6-axis MotionTracking device that combines a | -|| gyrosopce || 3-axis gyroscope and a 3-axis accelerometer. | +|| 6-axis IMU || The `MPU-6886`_ is a 6-axis motion tracker (6DOF IMU) device that | +|| MPU6886 || combines a 3-axis gyroscope and a 3-axis accelerometer. | +|| || For details please refer to :ref:`m5stack_core2_ext` | +------------------+--------------------------------------------------------------------------+ || Built-in || The `SPM-1423`_ I2S driven microphone. | || microphone || |